chore(frame-runner): Remove frame-runner

This commit is contained in:
Stuart Taylor
2018-07-31 10:47:56 +01:00
committed by mrugesh mohapatra
parent af8030c1d1
commit 8bfeed75ca
2 changed files with 1 additions and 98 deletions

View File

@ -27,7 +27,6 @@ const Rx = require('rx'),
webpackDevMiddleware = require('webpack-dev-middleware'),
webpackHotMiddleware = require('webpack-hot-middleware'),
webpackConfig = require('./webpack.config.js'),
webpackFrameConfig = require('./webpack.frame-runner.js'),
// server process
nodemon = require('gulp-nodemon'),
@ -247,7 +246,7 @@ gulp.task('dev-server', syncDepenedents, function() {
});
gulp.task('pack-client', function() {
if (!__DEV__) { console.log('\n\nbundling production\n\n'); }
if (!__DEV__) { console.log('\n\nbundling www - production\n\n'); }
const dest = webpackConfig.output.path;
@ -257,18 +256,6 @@ gulp.task('pack-client', function() {
.pipe(gulp.dest(dest));
});
gulp.task('pack-frame-runner', function() {
if (!__DEV__) { console.log('\n\nbundling frame production\n\n'); }
const dest = webpackFrameConfig.output.path;
return gulp.src(webpackFrameConfig.entry)
.pipe(plumber({ errorHandler }))
.pipe(webpackStream(webpackFrameConfig))
.pipe(gulp.dest(dest));
});
const webpackManifestFiles = [ 'react-manifest.json', 'chunk-manifest.json' ];
gulp.task('move-webpack-manifest', ['pack-client'], function() {
const files = webpackManifestFiles.map(function(filename) {
@ -404,7 +391,6 @@ gulp.task('build', [
'less',
'js',
'pack-client',
'pack-frame-runner',
'move-webpack-manifest',
'clean-webpack-manifest',
'build-manifest',
@ -415,14 +401,12 @@ const watchDependents = [
'less',
'js',
'serve',
'pack-frame-runner',
'dev-server'
];
gulp.task('watch', watchDependents, function() {
gulp.watch(paths.lessFiles, ['less']);
gulp.watch(paths.vendorChallenges, ['js']);
gulp.watch(webpackFrameConfig.entry, ['pack-frame-runner']);
});
gulp.task('default', [
@ -430,6 +414,5 @@ gulp.task('default', [
'serve',
'watch',
'dev-server',
'pack-frame-runner',
'generate-migration-map'
]);

View File

@ -1,80 +0,0 @@
const webpack = require('webpack');
const path = require('path');
const UglifyPlugin = require('uglifyjs-webpack-plugin');
const __DEV__ = process.env.NODE_ENV !== 'production';
module.exports = {
entry: './client/frame-runner.js',
devtool: __DEV__ ? 'inline-source-map' : 'source-map',
node: {
// Mock Node.js modules that Babel require()s but that we don't
// particularly care about.
fs: 'empty',
module: 'empty',
net: 'empty'
},
output: {
filename: __DEV__ ? 'frame-runner.js' : 'frame-runner-[hash].js',
path: path.join(__dirname, '/public/js'),
publicPath: '/js'
},
stats: {
// Examine all modules
maxModules: Infinity,
// Display bailout reasons
optimizationBailout: true
},
module: {
rules: [{
test: /\.jsx?$/,
include: [ path.join(__dirname, 'client/') ],
use: {
loader: 'babel-loader',
options: {
babelrc: false,
presets: [
[ 'es2015', { modules: false }],
[ 'stage-3' ]
],
plugins: [
'transform-runtime',
'lodash'
]
}
}
}]
},
externals: {
rx: 'Rx'
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(__DEV__ ? 'development' : 'production')
},
__DEVTOOLS__: !__DEV__
}),
// Use browser version of visionmedia-debug
new webpack.NormalModuleReplacementPlugin(
/debug\/node/,
'debug/src/browser'
),
new webpack.optimize.ModuleConcatenationPlugin()
]
};
if (__DEV__) {
module.exports.plugins.push(
// prevents build on error
new webpack.NoEmitOnErrorsPlugin()
);
} else {
module.exports.plugins.push(
new UglifyPlugin({
test: /\.js($|\?)/i,
cache: true,
sourceMap: true
})
);
}