mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-12-02 03:59:19 +08:00
25 lines
511 B
JavaScript
25 lines
511 B
JavaScript
|
var rollup = require('rollup')
|
||
|
var buble = require('rollup-plugin-buble')
|
||
|
|
||
|
var build = function (entry, moduleName) {
|
||
|
rollup
|
||
|
.rollup({
|
||
|
entry: 'src/' + entry,
|
||
|
plugins: [buble()]
|
||
|
})
|
||
|
.then(function (bundle) {
|
||
|
bundle.write({
|
||
|
globals: {
|
||
|
marked: 'marked',
|
||
|
prismjs: 'Prism'
|
||
|
},
|
||
|
format: 'umd',
|
||
|
moduleName: moduleName,
|
||
|
dest: 'lib/' + entry
|
||
|
})
|
||
|
})
|
||
|
}
|
||
|
|
||
|
build('docsify.js', 'Docsify')
|
||
|
build('plugins/nav.js', 'Docsify.Nav')
|