mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
feat: Add docsify version to $window.docsify object (#641)
Fix #521 Please makes sure these boxes are checked before submitting your PR, thank you! * [ x ] Make sure you are merging your commits to `master` branch. * [ x ] Add some descriptions and refer relative issues for you PR. * [ x ] DO NOT include files inside `lib` directory.
This commit is contained in:
parent
9e860177cb
commit
94bc415534
@ -8,12 +8,14 @@ const isProd = process.env.NODE_ENV === 'production'
|
||||
const version = process.env.VERSION || require('../package.json').version
|
||||
const chokidar = require('chokidar')
|
||||
const path = require('path')
|
||||
const json = require('rollup-plugin-json')
|
||||
|
||||
const build = function(opts) {
|
||||
rollup
|
||||
.rollup({
|
||||
input: opts.input,
|
||||
plugins: (opts.plugins || []).concat([
|
||||
json(),
|
||||
buble(),
|
||||
commonjs(),
|
||||
nodeResolve(),
|
||||
|
||||
8060
package-lock.json
generated
8060
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -65,6 +65,7 @@
|
||||
"rollup-plugin-async": "^1.2.0",
|
||||
"rollup-plugin-buble": "^0.18.0",
|
||||
"rollup-plugin-commonjs": "^8.2.6",
|
||||
"rollup-plugin-json": "^3.1.0",
|
||||
"rollup-plugin-node-resolve": "^3.0.0",
|
||||
"rollup-plugin-replace": "^2.0.0",
|
||||
"rollup-plugin-uglify": "^2.0.1",
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import {merge, hyphenate, isPrimitive, hasOwn} from './util/core'
|
||||
import {version as pkgVersion} from './../../package.json'
|
||||
|
||||
export default function () {
|
||||
const config = merge(
|
||||
@ -64,6 +65,7 @@ export default function () {
|
||||
}
|
||||
}
|
||||
|
||||
config.version = pkgVersion
|
||||
window.$docsify = config
|
||||
|
||||
return config
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user