Skip to content

Commit

Permalink
fix: remove global browserify transforms, so parent packages don't br…
Browse files Browse the repository at this point in the history
…eak (#48)
  • Loading branch information
brandonocasey authored Apr 3, 2017
1 parent 3c76053 commit aa74853
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
"videojs",
"videojs-plugin"
],
"browserify": {
"transform": [
"browserify-shim",
"browserify-versionify"
]
},
"browserify-shim": {
"qunit": "global:QUnit",
"sinon": "global:sinon",
Expand All @@ -38,7 +32,7 @@
"build:js": "npm-run-all build:js:babel build:js:browserify build:js:bannerize build:js:uglify",
"build:js:babel": "babel src -d es5",
"build:js:bannerize": "bannerize dist/videojs-overlay.js --banner=scripts/banner.ejs",
"build:js:browserify": "browserify . -s videojs-overlay -o dist/videojs-overlay.js",
"build:js:browserify": "browserify . -s videojs-overlay -g browserify-shim -t browserify-versionify -o dist/videojs-overlay.js",
"build:js:uglify": "uglifyjs dist/videojs-overlay.js --comments --mangle --compress -o dist/videojs-overlay.min.js",
"build:test": "babel-node scripts/build-test.js",
"build:test:browserify": "browserify `find test -name '*.test.js'` -t babelify -o dist-test/videojs-overlay.js",
Expand Down
2 changes: 2 additions & 0 deletions scripts/build-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ glob('test/**/*.test.js', (err, files) => {
}
browserify(files)
.transform('babelify')
.transform('browserify-shim', {global: true})
.transform('browserify-versionify')
.bundle()
.pipe(fs.createWriteStream('test/dist/bundle.js'));
});
4 changes: 2 additions & 2 deletions scripts/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const bundlers = {
standalone: nameify('%s'),
transform: [
'babelify',
'browserify-shim',
['browserify-shim', {global: true}],
'browserify-versionify'
]
}),
Expand All @@ -45,7 +45,7 @@ const bundlers = {
entries: srces.tests,
transform: [
'babelify',
'browserify-shim',
['browserify-shim', {global: true}],
'browserify-versionify'
]
})
Expand Down

0 comments on commit aa74853

Please sign in to comment.