Avoid main.js
being generated in dist
when were generating only the CSS
This commit is contained in:
parent
0e7d64818d
commit
a276a05094
@ -11,12 +11,12 @@
|
|||||||
"README.md"
|
"README.md"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"converse.css": "webpack --type=css --mode=development",
|
"converse.css": "webpack --type=css --mode=development && rm -r tmp",
|
||||||
"converse.min.css": "npm run converse.css && cleancss --skip-rebase dist/converse.css > dist/converse.min.css",
|
"converse.min.css": "npm run converse.css && cleancss --skip-rebase dist/converse.css > dist/converse.min.css",
|
||||||
"converse.js": "webpack --mode=development",
|
"converse.js": "webpack --mode=development",
|
||||||
"converse.min.js": "npm run converse.js && webpack --mode=production",
|
"converse.min.js": "npm run converse.js && webpack --mode=production",
|
||||||
"converse-headless.js": "webpack --mode=development --type=headless",
|
"converse-headless.js": "webpack --mode=development --type=headless",
|
||||||
"converse-headless.min.js": "npm run converse-headless.css && webpack --mode=production --type=headless",
|
"converse-headless.min.js": "npm run converse-headless.js && webpack --mode=production --type=headless",
|
||||||
"clean": "rm -rf node_modules stamp-npm dist *.zip",
|
"clean": "rm -rf node_modules stamp-npm dist *.zip",
|
||||||
"build": "npm run converse.min.css && npm run converse-headless.min.js && npm run converse.min.js",
|
"build": "npm run converse.min.css && npm run converse-headless.min.js && npm run converse.min.js",
|
||||||
"prepare": "npm run build"
|
"prepare": "npm run build"
|
||||||
|
@ -15,7 +15,7 @@ const config = {
|
|||||||
filename: 'converse.js'
|
filename: 'converse.js'
|
||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
plugins: [new MiniCssExtractPlugin({filename: './converse.css'})],
|
plugins: [new MiniCssExtractPlugin({filename: '../dist/converse.css'})],
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
@ -60,7 +60,7 @@ const config = {
|
|||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
options: {
|
options: {
|
||||||
name: '[path][name].[ext]',
|
name: '[path][name].[ext]',
|
||||||
outputPath: './'
|
outputPath: '../dist/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -184,7 +184,10 @@ function parameterize () {
|
|||||||
if (type === 'css') {
|
if (type === 'css') {
|
||||||
console.log("Building only CSS");
|
console.log("Building only CSS");
|
||||||
config.entry = path.resolve(__dirname, 'sass/converse.scss');
|
config.entry = path.resolve(__dirname, 'sass/converse.scss');
|
||||||
config.output = {};
|
config.output = {
|
||||||
|
path: path.resolve(__dirname, 'tmp'),
|
||||||
|
filename: 'css-builder.js'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode === 'production') {
|
if (mode === 'production') {
|
||||||
|
Loading…
Reference in New Issue
Block a user