Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Module build config must now be provided in a "build" object.
Missing build config is now defaulted. nwb 0.8 is backwards-compatible with the old config format. #44
- Loading branch information
Showing
14 changed files
with
190 additions
and
81 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
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
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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
module.exports = { | ||
// Let nwb know this is a React app when generic build commands are used | ||
type: 'react-app' | ||
} |
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 |
---|---|---|
@@ -1,21 +1,11 @@ | ||
module.exports = { | ||
// Let nwb know this is a React component module when generic build commands | ||
// are used. | ||
type: 'react-component', | ||
|
||
// Should nwb create a UMD build for this module? | ||
umd: {{umd}}, | ||
// The name of the global variable the UMD build of this module will export | ||
global: '{{globalVariable}}', | ||
// Mapping from the npm package names of this module's peerDependencies to the | ||
// global variables they're expected to be available as for use by the UMD | ||
// build. | ||
externals: { | ||
'react': 'React' | ||
}, | ||
|
||
// Should nwb create a build with untranspiled ES6 modules for tree-shaking | ||
// module bundlers? If you change your mind later, add or remove this line in | ||
// package.json: "jsnext:main": "es6/index.js" | ||
jsNext: {{jsNext}} | ||
build: { | ||
externals: { | ||
'react': 'React' | ||
}, | ||
global: '{{globalVariable}}', | ||
jsNext: {{jsNext}}, | ||
umd: {{umd}} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
module.exports = { | ||
// Let nwb know this is a web app when generic build commands are used | ||
type: 'web-app' | ||
} |
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 |
---|---|---|
@@ -1,18 +1,9 @@ | ||
module.exports = { | ||
// Let nwb know this is a web module when generic build commands are used | ||
type: 'web-module', | ||
|
||
// Should nwb create a UMD build for this module? | ||
umd: {{umd}}, | ||
// The name of the global variable the UMD build of this module will export | ||
global: '{{globalVariable}}', | ||
// A mapping from the npm package names of this module's peerDependencies - if | ||
// it has any - to the global variables they're expected to be available as | ||
// for use by the UMD build, e.g. {'react': 'React'} | ||
externals: {}, | ||
|
||
// Should nwb create a build with untranspiled ES6 modules for tree-shaking | ||
// module bundlers? If you change your mind later, add or remove this line in | ||
// package.json: "jsnext:main": "es6/index.js" | ||
jsNext: {{jsNext}} | ||
build: { | ||
externals: {}, | ||
global: '{{globalVariable}}', | ||
jsNext: {{jsNext}}, | ||
umd: {{umd}}, | ||
} | ||
} |
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,7 @@ | ||
module.exports = { | ||
type: 'react-component', | ||
externals: {react: 'React'}, | ||
global: 'Test', | ||
jsNext: true, | ||
umd: true | ||
} |
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 @@ | ||
module.exports = { | ||
type: 'web-module', | ||
build: { | ||
umd: true, | ||
global: 'Test' | ||
} | ||
} |
Oops, something went wrong.