-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up the "templates" used for bundling.
Mindful of the inevitable shift away from the django dependency, I've stuck with string formatting, rather than a full-blown tempting solution.
- Loading branch information
1 parent
9fd0264
commit 96147d9
Showing
3 changed files
with
102 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
BUNDLE_CONFIG = \ | ||
"""module.exports = {{ | ||
context: '{dir}', | ||
entry: '{file}', | ||
output: {{ | ||
path: '[bundle_dir]/react-components', | ||
filename: '{var}-[hash].js', | ||
libraryTarget: 'umd', | ||
library: '{var}' | ||
}}, | ||
externals: [{{ | ||
'react': {{ | ||
commonjs2: '{path_to_react}', | ||
root: 'React' | ||
}} | ||
}}], | ||
devtool: 'eval'{translate_config} | ||
}}; | ||
""" | ||
|
||
BUNDLE_TRANSLATE_CONFIG = \ | ||
""", | ||
module: {{ | ||
loaders: [{{ | ||
test: /\{ext}$/, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader' | ||
}}] | ||
}}, | ||
resolveLoader: {{ | ||
root: '{node_modules}' | ||
}} | ||
""" |
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