Move webpack files into dir
This commit is contained in:
parent
93ec6e4e83
commit
351212cd13
6
Makefile
6
Makefile
@ -64,7 +64,7 @@ serve_bg: node_modules
|
|||||||
########################################################################
|
########################################################################
|
||||||
## Translation machinery
|
## Translation machinery
|
||||||
|
|
||||||
dist/converse-no-dependencies.js: src webpack.common.js webpack.nodeps.js @converse/headless node_modules
|
dist/converse-no-dependencies.js: src webpack/webpack.common.js webpack/webpack.nodeps.js @converse/headless node_modules
|
||||||
npm run nodeps
|
npm run nodeps
|
||||||
|
|
||||||
GETTEXT = $(XGETTEXT) --from-code=UTF-8 --language=JavaScript --keyword=__ --keyword=___ --keyword=i18n_ --force-po --output=src/i18n/converse.pot --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=9.0.0 dist/converse-no-dependencies.js -c
|
GETTEXT = $(XGETTEXT) --from-code=UTF-8 --language=JavaScript --keyword=__ --keyword=___ --keyword=i18n_ --force-po --output=src/i18n/converse.pot --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=9.0.0 dist/converse-no-dependencies.js -c
|
||||||
@ -185,10 +185,10 @@ logo/conversejs-filled%.png:: logo/conversejs-filled.svg
|
|||||||
|
|
||||||
@converse/headless: src/headless
|
@converse/headless: src/headless
|
||||||
|
|
||||||
src/headless/dist/converse-headless.js: src webpack.common.js node_modules @converse/headless
|
src/headless/dist/converse-headless.js: src webpack/webpack.common.js node_modules @converse/headless
|
||||||
npm run headless-dev
|
npm run headless-dev
|
||||||
|
|
||||||
src/headless/dist/converse-headless.min.js: src webpack.common.js node_modules @converse/headless
|
src/headless/dist/converse-headless.min.js: src webpack/webpack.common.js node_modules @converse/headless
|
||||||
npm run headless
|
npm run headless
|
||||||
|
|
||||||
dist:: node_modules src/* | dist/converse.js dist/converse.css dist/website.css dist/website.min.css src/headless/dist/converse-headless.min.js src/headless/dist/converse-headless.js
|
dist:: node_modules src/* | dist/converse.js dist/converse.css dist/website.css dist/website.min.css src/headless/dist/converse-headless.min.js src/headless/dist/converse-headless.js
|
||||||
|
14
package.json
14
package.json
@ -26,16 +26,16 @@
|
|||||||
"src/**/*.json"
|
"src/**/*.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "webpack serve --config webpack.serve.js",
|
"serve": "webpack serve --config webpack/webpack.serve.js",
|
||||||
"clean": "rm -rf node_modules dist *.zip src/headless/dist src/headless/node_modules",
|
"clean": "rm -rf node_modules dist *.zip src/headless/dist src/headless/node_modules",
|
||||||
"headless": "webpack --config webpack.headless.js",
|
"headless": "webpack --config webpack/webpack.headless.js",
|
||||||
"headless-dev": "webpack --config webpack.headless.dev.js",
|
"headless-dev": "webpack --config webpack/webpack.headless.dev.js",
|
||||||
"nodeps": "webpack --config webpack.nodeps.js",
|
"nodeps": "webpack --config webpack/webpack.nodeps.js",
|
||||||
"cdn": "ASSET_PATH=https://cdn.conversejs.org/dist/ npm run dev && ASSET_PATH=https://cdn.conversejs.org/dist/ npm run build",
|
"cdn": "ASSET_PATH=https://cdn.conversejs.org/dist/ npm run dev && ASSET_PATH=https://cdn.conversejs.org/dist/ npm run build",
|
||||||
"prod": "webpack --config webpack.prod.js",
|
"prod": "webpack --config webpack/webpack.prod.js",
|
||||||
"build": "npm run dev && npm run prod",
|
"build": "npm run dev && npm run prod",
|
||||||
"dev": "webpack --config webpack.dev.js",
|
"dev": "webpack --config webpack/webpack.dev.js",
|
||||||
"watch": "webpack --watch --config webpack.dev.js",
|
"watch": "webpack --watch --config webpack/webpack.dev.js",
|
||||||
"lerna": "lerna bootstrap --hoist --ignore-scripts",
|
"lerna": "lerna bootstrap --hoist --ignore-scripts",
|
||||||
"prepare": "npm run lerna && npm run build"
|
"prepare": "npm run lerna && npm run build"
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import "@converse/headless/headless";
|
import "@converse/headless/headless";
|
||||||
import "i18n";
|
import "./i18n/index.js";
|
||||||
import "shared/registry.js";
|
import "shared/registry.js";
|
||||||
import { CustomElement } from 'shared/components/element';
|
import { CustomElement } from 'shared/components/element';
|
||||||
import { VIEW_PLUGINS } from './shared/constants.js';
|
import { VIEW_PLUGINS } from './shared/constants.js';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @copyright 2020, the Converse.js contributors
|
* @copyright 2020, the Converse.js contributors
|
||||||
* @license Mozilla Public License (MPLv2)
|
* @license Mozilla Public License (MPLv2)
|
||||||
*/
|
*/
|
||||||
import "shared/components/brand-heading";
|
import "shared/components/brand-heading.js";
|
||||||
import "../chatview/index.js";
|
import "../chatview/index.js";
|
||||||
import './loginform.js';
|
import './loginform.js';
|
||||||
import './navback.js';
|
import './navback.js';
|
||||||
|
@ -11,10 +11,10 @@ if (BOOTSTRAP_IGNORE_MODULES.length > 0) {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'dist'), // Output path for generated bundles
|
path: path.resolve(__dirname, '../dist'), // Output path for generated bundles
|
||||||
chunkFilename: '[name].js'
|
chunkFilename: '[name].js'
|
||||||
},
|
},
|
||||||
entry: path.resolve(__dirname, 'src/entry.js'),
|
entry: path.resolve(__dirname, '../src/entry.js'),
|
||||||
externals: [{
|
externals: [{
|
||||||
"window": "window"
|
"window": "window"
|
||||||
}],
|
}],
|
||||||
@ -62,8 +62,8 @@ module.exports = {
|
|||||||
options: {
|
options: {
|
||||||
sassOptions: {
|
sassOptions: {
|
||||||
includePaths: [
|
includePaths: [
|
||||||
path.resolve(__dirname, 'node_modules/'),
|
path.resolve(__dirname, '../node_modules/'),
|
||||||
path.resolve(__dirname, 'src/')
|
path.resolve(__dirname, '../src/')
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
sourceMap: true
|
sourceMap: true
|
||||||
@ -108,13 +108,13 @@ module.exports = {
|
|||||||
extensions: ['.js'],
|
extensions: ['.js'],
|
||||||
modules: [
|
modules: [
|
||||||
'node_modules',
|
'node_modules',
|
||||||
path.resolve(__dirname, "src")
|
path.resolve(__dirname, "../src")
|
||||||
],
|
],
|
||||||
alias: {
|
alias: {
|
||||||
"IPv6": path.resolve(__dirname, "node_modules/urijs/src/IPv6"),
|
"IPv6": path.resolve(__dirname, "../node_modules/urijs/src/IPv6"),
|
||||||
"SecondLevelDomains": path.resolve(__dirname, "node_modules/urijs/src/SecondLevelDomains"),
|
"SecondLevelDomains": path.resolve(__dirname, "../node_modules/urijs/src/SecondLevelDomains"),
|
||||||
"formdata-polyfill": path.resolve(__dirname, "node_modules/formdata-polyfill/FormData"),
|
"formdata-polyfill": path.resolve(__dirname, "../node_modules/formdata-polyfill/FormData"),
|
||||||
"punycode": path.resolve(__dirname, "node_modules/urijs/src/punycode")
|
"punycode": path.resolve(__dirname, "../node_modules/urijs/src/punycode")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,7 +7,7 @@ module.exports = merge(common, {
|
|||||||
mode: "development",
|
mode: "development",
|
||||||
entry: "@converse/headless/headless.js",
|
entry: "@converse/headless/headless.js",
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'src/headless/dist'), // Output path for generated bundles
|
path: path.resolve(__dirname, '../src/headless/dist'), // Output path for generated bundles
|
||||||
filename: 'converse-headless.js',
|
filename: 'converse-headless.js',
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
@ -6,7 +6,7 @@ const { merge } = require("webpack-merge");
|
|||||||
module.exports = merge(common, {
|
module.exports = merge(common, {
|
||||||
entry: "@converse/headless/headless.js",
|
entry: "@converse/headless/headless.js",
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'src/headless/dist'), // Output path for generated bundles
|
path: path.resolve(__dirname, '../src/headless/dist'), // Output path for generated bundles
|
||||||
filename: 'converse-headless.min.js',
|
filename: 'converse-headless.min.js',
|
||||||
chunkFilename: '[name].js'
|
chunkFilename: '[name].js'
|
||||||
},
|
},
|
@ -48,7 +48,7 @@ module.exports = merge(common, {
|
|||||||
loader: 'sass-loader',
|
loader: 'sass-loader',
|
||||||
options: {
|
options: {
|
||||||
sassOptions: {
|
sassOptions: {
|
||||||
includePaths: [path.resolve(__dirname, 'node_modules/')]
|
includePaths: [path.resolve(__dirname, '../node_modules/')]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -54,7 +54,7 @@ module.exports = merge(common, {
|
|||||||
loader: 'sass-loader',
|
loader: 'sass-loader',
|
||||||
options: {
|
options: {
|
||||||
sassOptions: {
|
sassOptions: {
|
||||||
includePaths: [path.resolve(__dirname, 'node_modules/')]
|
includePaths: [path.resolve(__dirname, '../node_modules/')]
|
||||||
},
|
},
|
||||||
sourceMap: true
|
sourceMap: true
|
||||||
}
|
}
|
@ -8,7 +8,7 @@ module.exports = merge(common, {
|
|||||||
mode: "development",
|
mode: "development",
|
||||||
devtool: "inline-source-map",
|
devtool: "inline-source-map",
|
||||||
devServer: {
|
devServer: {
|
||||||
static: [ path.resolve(__dirname, '') ],
|
static: [ path.resolve(__dirname, '../') ],
|
||||||
port: 3003
|
port: 3003
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
Loading…
Reference in New Issue
Block a user