Skip to content

Commit

Permalink
multiple watches on start is out of my hands has to do with webpack/w…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Pusey authored and Ben Pusey committed Jul 7, 2017
1 parent 273a3b0 commit 98eede8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
9 changes: 4 additions & 5 deletions packages/app/config/base/base.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';
import * as webpack from 'webpack';
const dir = __dirname;
const baseDir = path.join(dir, "../..");

Expand All @@ -16,7 +17,6 @@ export class BaseConfig {
dist: { path: path.join(this.baseDir, 'dist/') },
tsconfig: { path: path.join(this.baseDir, 'tsconfig.json') },
tslint: { path: path.join(this.baseDir, 'config/tslint.json') },
ignored: { path: path.join(this.baseDir, '!(src)') }
};
this.rules = {
tslint: {
Expand Down Expand Up @@ -58,15 +58,14 @@ export class BaseConfig {
this.webpack = {
watch: true,
watchOptions: {
aggregateTimeout: 0,
aggregateTimeout: 200,
poll: 1000,
ignored: this.paths.ignored.path
},
},
devtool: 'inline-source-map',
resolve: { extensions: ['.json', '.ts', '.tsx'] },
module: {
rules: [this.rules.tslint, this.rules.ts]
}
},
};
}
}
6 changes: 2 additions & 4 deletions packages/app/scripts/base/base.gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ export class BaseGulpFile {
@Task('webpack')
tsc() {
return gulp.src(this.config.paths.entry.path)
.pipe(named())
.pipe(named())
.pipe(webpackStream(this.config.webpack, webpack))
.on('error', function(error) {
this.emit('end');
})
.on('error', function(error) {})
.pipe(gulp.dest(this.config.paths.dist.path));
}

Expand Down
4 changes: 3 additions & 1 deletion packages/app/src/Greeter/Greeter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import './HelloWorld';

/**
* this is a simple Greeter Class
*
Expand All @@ -16,5 +18,5 @@ export class Greeter {
}
}

const greeter = new Greeter('heyaaaa');
const greeter = new Greeter('heyaa');
console.log(greeter.greet());
1 change: 1 addition & 0 deletions packages/app/src/Greeter/HelloWorld.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('hello');

0 comments on commit 98eede8

Please sign in to comment.