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