mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-01 19:37:21 -05:00
FIx lint errors
This commit is contained in:
parent
79665e5986
commit
37437636ff
2 changed files with 16 additions and 15 deletions
|
@ -6,7 +6,8 @@ var webpack = require('webpack');
|
||||||
var compiler = webpack(require('../webpack.config.js'));
|
var compiler = webpack(require('../webpack.config.js'));
|
||||||
var handler = require('./handler');
|
var handler = require('./handler');
|
||||||
var log = require('./log');
|
var log = require('./log');
|
||||||
var routes = require('../src/routes.json').concat(require('../src/routes-dev.json')).filter(route => !process.env.VIEW || process.env.VIEW === route.view);
|
var routes = require('../src/routes.json').concat(require('../src/routes-dev.json'))
|
||||||
|
.filter(route => !process.env.VIEW || process.env.VIEW === route.view);
|
||||||
|
|
||||||
// Create server
|
// Create server
|
||||||
var app = express();
|
var app = express();
|
||||||
|
|
|
@ -142,23 +142,23 @@ module.exports = {
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin([
|
||||||
{from: 'static'},
|
{from: 'static'},
|
||||||
{from: 'intl', to: 'js'}
|
{from: 'intl', to: 'js'}
|
||||||
]),
|
])
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
|
|
||||||
'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"',
|
|
||||||
'process.env.API_HOST': '"' + (process.env.API_HOST || 'https://api.scratch.mit.edu') + '"',
|
|
||||||
'process.env.SCRATCH_ENV': '"' + (process.env.SCRATCH_ENV || 'development') + '"'
|
|
||||||
}),
|
|
||||||
new webpack.optimize.CommonsChunkPlugin({
|
|
||||||
name: 'common',
|
|
||||||
filename: 'js/common.bundle.js'
|
|
||||||
})
|
|
||||||
])
|
])
|
||||||
.concat(process.env.NODE_ENV === 'production' ? [
|
.concat(process.env.NODE_ENV === 'production' ? [
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
compress: {
|
sourceMap: true
|
||||||
warnings: false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
] : [])
|
] : [])
|
||||||
|
.concat([
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
|
||||||
|
'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"',
|
||||||
|
'process.env.API_HOST': '"' + (process.env.API_HOST || 'https://api.scratch.mit.edu') + '"',
|
||||||
|
'process.env.SCRATCH_ENV': '"' + (process.env.SCRATCH_ENV || 'development') + '"'
|
||||||
|
}),
|
||||||
|
new webpack.optimize.CommonsChunkPlugin({
|
||||||
|
name: 'common',
|
||||||
|
filename: 'js/common.bundle.js'
|
||||||
|
})
|
||||||
|
])
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue