mirror of
https://github.com/yldio/copilot.git
synced 2024-12-01 07:30:07 +02:00
33 lines
655 B
Plaintext
33 lines
655 B
Plaintext
|
#!/usr/bin/env node
|
||
|
|
||
|
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
||
|
const webpack = require('webpack');
|
||
|
const MemoryFS = require('memory-fs');
|
||
|
const config = require('../webpack');
|
||
|
|
||
|
const mfs = new MemoryFS();
|
||
|
const compiler = webpack(Object.assign(config, {
|
||
|
plugins: config.plugins.concat([
|
||
|
new StyleLintPlugin({
|
||
|
configFile: '.stylelintrc',
|
||
|
files: [
|
||
|
'**/*.css'
|
||
|
],
|
||
|
failOnError: true
|
||
|
})
|
||
|
])
|
||
|
}));
|
||
|
|
||
|
mfs.mkdirpSync(config.output.path);
|
||
|
compiler.outputFileSystem = mfs;
|
||
|
|
||
|
compiler.run((err, stats) => {
|
||
|
if (err) {
|
||
|
throw err;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
process.on('unhandledRejection', () => {
|
||
|
process.exit(1);
|
||
|
});
|