Skip to content

Commit 07fc22f

Browse files
Berkeley MartinezBerkeley Martinez
authored andcommitted
add webpack configs and gulp webpack build tasks
1 parent 85cf79f commit 07fc22f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

gulpfile.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require('babel/register');
1+
require('babel-core/register');
22
var gulp = require('gulp'),
33
path = require('path'),
44

@@ -54,7 +54,7 @@ var paths = {
5454

5555
node: {
5656
src: './client',
57-
dest: 'server/server'
57+
dest: 'common/app'
5858
},
5959

6060
syncWatch: [
@@ -100,15 +100,15 @@ gulp.task('loopback', function() {
100100
});
101101

102102
gulp.task('pack-client', function() {
103-
return gulp.src(paths.client.src)
103+
return gulp.src(webpackConfig.entry)
104104
.pipe(webpack(webpackConfig))
105-
.pipe(gulp.dest(paths.client.dest));
105+
.pipe(gulp.dest(webpackConfig.output.path));
106106
});
107107

108108
gulp.task('pack-node', function() {
109-
return gulp.src(paths.node.src)
109+
return gulp.src(webpackConfigNode.entry)
110110
.pipe(webpack(webpackConfigNode))
111-
.pipe(gulp.dest(paths.node.dest));
111+
.pipe(gulp.dest(webpackConfigNode.output.path));
112112
});
113113

114114
gulp.task('pack', ['pack-client', 'pack-node']);

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
devtool: 'sourcemap',
55
entry: './client',
66
output: {
7-
filename: 'fcc.js',
7+
filename: 'bundle.js',
88
path: path.join(__dirname, '/public/js'),
99
publicPath: 'public/'
1010
},

webpack.config.node.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ var nodeModules = fs.readdirSync('node_modules')
1414
module.exports = {
1515
devtool: 'sourcemap',
1616
target: 'node',
17-
entry: './server/appEntry',
17+
entry: './common/app',
1818
// keeps webpack from bundling modules
1919
externals: nodeModules,
2020
output: {
21-
filename: 'fcc.js',
22-
path: path.join(__dirname, '/public/js'),
21+
filename: 'app-stream.bundle.js',
22+
path: path.join(__dirname, '/server'),
2323
publicPath: 'public/'
2424
},
2525
module: {

0 commit comments

Comments
 (0)