forked from silviopaganini/physijs-browserify
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(env/refactor): split out webpack and browserify config
- split them into files instead of command-line args in package.json scripts - webpack has a config file ofc, but wanted to keep them consistent initially, so used command-line - decided to use the browserify API as its "config file" - this actually took a decent amount of research to figure out how to output to file (have to pipe to fs stream)
- Loading branch information
Showing
3 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const browserify = require('browserify') | ||
const fs = require('fs') | ||
|
||
browserify({ | ||
entries: './test-utils/browserify/_export-to-window.js', | ||
}).bundle() | ||
.pipe(fs.createWriteStream('./build/browserify.bundle.js')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const path = require('path') | ||
|
||
module.exports = { | ||
entry: './test-utils/webpack/_export-to-window.js', | ||
output: { | ||
path: path.join(__dirname, '/build/'), | ||
filename: 'webpack.bundle.js' | ||
}, | ||
// fast builds, build is only used for testing purposes | ||
mode: 'development' | ||
} |