Skip to content

Commit e9fe744

Browse files
committed
Setup webpack gulp task
1 parent 020ab03 commit e9fe744

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tasks/angular.task.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ var uglify = require('gulp-uglify');
99
var ngAnnotate = require('gulp-ng-annotate');
1010
var notify = require('gulp-notify');
1111
var gulpif = require('gulp-if');
12+
1213
var webpack = require('webpack-stream');
14+
var webpackConfig = require('../webpack.config.js')
1315

1416
var Elixir = require('laravel-elixir');
1517

@@ -21,12 +23,11 @@ Elixir.extend('angular', function(src, output, outputFilename) {
2123

2224
new Task('angular in ' + baseDir, function() {
2325
// Main file has to be included first.
24-
return gulp.src([baseDir + "main.js", baseDir + "**/*.js"])
26+
return gulp.src([baseDir + "index.main.js", baseDir + "**/*.js"])
2527
.pipe(eslint())
2628
.pipe(eslint.format())
2729
.pipe(gulpif(! config.production, sourcemaps.init()))
28-
.pipe(webpack(require('../webpack.config.js')))
29-
// .pipe(concat(outputFilename || 'app.js'))
30+
.pipe(webpack(webpackConfig))
3031
.pipe(ngAnnotate())
3132
.pipe(gulpif(config.production, uglify()))
3233
.pipe(gulpif(! config.production, sourcemaps.write()))

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
// configuration
3-
entry: "index.main.js",
3+
entry: "./angular/index.main.js",
44
output: {
55
filename: "app.js"
66
},

0 commit comments

Comments
 (0)