This repository was archived by the owner on Dec 31, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,6 @@ var replace = require('rollup-plugin-replace')
77var pack = require ( '../package.json' )
88var banner = require ( './banner' )
99
10- // update main file
11- var main = fs
12- . readFileSync ( 'src/index.js' , 'utf-8' )
13- . replace ( / p l u g i n \. v e r s i o n = ' [ \d . ] + ' / , "plugin.version = '" + pack . version + "'" )
14- fs . writeFileSync ( 'src/index.js' , main )
15-
1610// update installation.md
1711var installation = fs
1812 . readFileSync ( './gitbook/installation.md' , 'utf-8' )
@@ -50,7 +44,8 @@ rollup.rollup({
5044 entry : 'src/index.js' ,
5145 plugins : [
5246 replace ( {
53- 'process.env.NODE_ENV' : "'development'"
47+ 'process.env.NODE_ENV' : "'development'" ,
48+ '__VERSION__' : pack . version
5449 } ) ,
5550 babel ( {
5651 presets : [ 'es2015-rollup' ]
@@ -71,7 +66,8 @@ rollup.rollup({
7166 entry : 'src/index.js' ,
7267 plugins : [
7368 replace ( {
74- 'process.env.NODE_ENV' : "'production'"
69+ 'process.env.NODE_ENV' : "'production'" ,
70+ '__VERSION__' : pack . version
7571 } ) ,
7672 babel ( {
7773 presets : [ 'es2015-rollup' ]
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ function setupLangVM (Vue, lang) {
4747 Vue . config . silent = silent
4848}
4949
50- plugin . version = '4.7.4 '
50+ plugin . version = '__VERSION__ '
5151
5252export default plugin
5353
You can’t perform that action at this time.
0 commit comments