spinjs
Version:
<p align="center"><a href="#"><img width="150" src="https://rawgit.com/sysgears/spinjs/master/logo.svg"></a></p>
30 lines (24 loc) • 759 B
text/typescript
import { Configuration } from 'webpack';
import * as merge from 'webpack-merge';
import { Builder } from './Builder';
export default class Spin {
public dev: boolean;
public test: boolean;
public watch: boolean;
public cmd: string;
public cwd: string;
public options: any;
constructor(cwd, cmd) {
this.cmd = cmd;
this.cwd = cwd;
this.dev = this.cmd === 'watch' || this.cmd === 'test';
this.test = this.cmd === 'test';
this.watch = this.cmd === 'watch';
}
public merge(config: any, overrides: any): Configuration {
return merge.smart(config, overrides);
}
public mergeWithStrategy(strategy: any, config: any, overrides: any): Configuration {
return merge.smartStrategy(strategy)(config, overrides);
}
}