
9 changed files with 105 additions and 61 deletions
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
module.exports = { |
||||
plugins: { |
||||
'posthtml-expressions': { |
||||
root: __dirname, |
||||
locals: { |
||||
NODE_ENV: process.env.NODE_ENV |
||||
} |
||||
}, |
||||
'posthtml-include': { |
||||
root: __dirname |
||||
}, |
||||
'posthtml-md': { |
||||
root: __dirname |
||||
} |
||||
} |
||||
}; |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
module.exports = { |
||||
includePaths: [ |
||||
'node_modules' |
||||
] |
||||
}; |
@ -1,20 +1,4 @@
@@ -1,20 +1,4 @@
|
||||
import { |
||||
setRepoContext, |
||||
loadJsonFile |
||||
} from './github'; |
||||
import { ConfigurationComponent } from './configuration-component'; |
||||
|
||||
const context = { |
||||
owner: 'utterance', |
||||
repo: 'utterances', |
||||
branch: 'master' |
||||
}; |
||||
|
||||
setRepoContext(context); |
||||
|
||||
loadJsonFile<string>('README.md', true).then(html => { |
||||
const commentDiv = document.querySelector('.comment') as HTMLDivElement; |
||||
commentDiv.insertAdjacentHTML('beforeend', html); |
||||
commentDiv.querySelector('#user-content-configuration')!.parentElement! |
||||
.insertAdjacentElement('afterend', new ConfigurationComponent().element); |
||||
}); |
||||
document.querySelector('h2#configuration')! |
||||
.insertAdjacentElement('afterend', new ConfigurationComponent().element); |
||||
|
Loading…
Reference in new issue