mirror of
https://github.com/yldio/copilot.git
synced 2024-12-03 00:20:04 +02:00
33 lines
660 B
JavaScript
Executable File
33 lines
660 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
const webpack = require('webpack');
|
|
const MemoryFS = require('memory-fs');
|
|
const config = require('../webpack/base');
|
|
|
|
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);
|
|
});
|