mirror of
https://github.com/react-webpack-generators/generator-react-webpack.git
synced 2025-12-08 18:01:59 +00:00
This subgen creates a new Webpack config environment by - creating conf/webpack/<EnvName>.js - creating src/config/<env_name>.js - requiring and exporting the new env in conf/webpack/index.js The commit introduces a basic config template that is supposed to be populated by the generator's users. Various more fine grained subgen options can be added at a later time (e.g. prompting the user if new run scripts should be added to package.json). The subgen's basic functionality is backed up by unit tests that check - if files are created - if conf/webpack/index.js contains correct import/export
23 lines
446 B
JavaScript
23 lines
446 B
JavaScript
'use strict';
|
|
|
|
const esDefaultOpts = require('esformatter/lib/preset/default.json');
|
|
|
|
const esOpts = Object.assign({}, esDefaultOpts, {
|
|
'lineBreak': {
|
|
'before': {
|
|
'AssignmentExpression': '>=2',
|
|
'ClassDeclaration': 2,
|
|
'EndOfFile': 1
|
|
},
|
|
'after': {
|
|
'ClassClosingBrace': 2,
|
|
'FunctionDeclaration': '>=2',
|
|
'BlockStatementClosingBrace': '>=2'
|
|
}
|
|
}
|
|
});
|
|
|
|
module.exports = {
|
|
esOpts
|
|
};
|