Skip to content

Commit

Permalink
update version judgement
Browse files Browse the repository at this point in the history
  • Loading branch information
LiberJe committed Mar 15, 2018
1 parent 85acdde commit a91013c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "mossad",
"version": "0.1.3",
"version": "0.1.4",
"description": "A mobile rolling performance observation tool",
"main": "src/index.js",
"scripts": {
"test": "node ./example/server.js",
"start": "webpack-dev-server --inline --progress --content-base example/ --config example/webpack.conf.js"
"test": "webpack-dev-server --inline --progress --content-base example/ --config example/webpack.conf.js"
},
"repository": {
"type": "git",
Expand Down
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const fs = require('fs')
const path = require('path')


class MossadWebpackPlugin {
constructor (options = {}) {
let injectScript = fs.readFileSync(__dirname+'/inject.js', 'utf-8')
Expand All @@ -14,8 +15,11 @@ class MossadWebpackPlugin {

compilation.plugin(
'html-webpack-plugin-before-html-processing',
data => {
(data, cb) => {
data.html = data.html.replace(`${injectPos}`, `${this.injection}${injectPos}`)
if (cb) {
cb(null, data)
}
}
)
})
Expand Down

0 comments on commit a91013c

Please sign in to comment.