mirror of
https://github.com/element-hq/element-web
synced 2024-11-21 16:55:34 +03:00
Build to the 'webapp' directory instead
People may have config files in vector/ so it would be nonideal if we started overwriting them / blowing them away.
This commit is contained in:
parent
a4c16b896b
commit
5b7f629996
4 changed files with 15 additions and 14 deletions
|
@ -160,7 +160,7 @@ electron.app.on('ready', () => {
|
|||
icon: `${__dirname}/../img/riot.ico`,
|
||||
width: 1024, height: 768,
|
||||
});
|
||||
mainWindow.loadURL(`file://${__dirname}/../../vector/index.html`);
|
||||
mainWindow.loadURL(`file://${__dirname}/../../webapp/index.html`);
|
||||
electron.Menu.setApplicationMenu(VectorMenu);
|
||||
|
||||
mainWindow.on('closed', () => {
|
||||
|
|
18
package.json
18
package.json
|
@ -27,9 +27,9 @@
|
|||
"matrix-react-parent": "matrix-react-sdk",
|
||||
"scripts": {
|
||||
"reskindex": "reskindex -h src/header",
|
||||
"build:res": "cpx \"{src/skins/vector/fonts,src/skins/vector/img}/**\" vector/ && cpx \"{res/media,res/vector-icons}/**\" vector/",
|
||||
"build:config": "cpx config.json vector/",
|
||||
"build:emojione": "cpx \"node_modules/emojione/assets/svg/*\" vector/emojione/svg/",
|
||||
"build:res": "cpx \"{src/skins/vector/fonts,src/skins/vector/img}/**\" webapp/ && cpx \"{res/media,res/vector-icons}/**\" webapp/",
|
||||
"build:config": "cpx config.json webapp/",
|
||||
"build:emojione": "cpx \"node_modules/emojione/assets/svg/*\" webapp/emojione/svg/",
|
||||
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
|
||||
"build:css": "mkdirp build && catw \"src/skins/vector/css/**/*.css\" -o build/components.css --no-watch",
|
||||
"build:compile": "babel --source-maps -d lib src",
|
||||
|
@ -39,15 +39,15 @@
|
|||
"build": "node scripts/babelcheck.js && npm run build:res && npm run build:config && npm run build:emojione && npm run build:css && npm run build:bundle",
|
||||
"build:dev": "npm run build:emojione && npm run build:css && npm run build:bundle:dev",
|
||||
"dist": "scripts/package.sh",
|
||||
"start:res": "parallelshell \"cpx -w \\\"{src/skins/vector/fonts,src/skins/vector/img}/**\\\" vector/\" \"cpx -w \\\"{res/media,res/vector-icons}/**\\\" vector/\"",
|
||||
"start:config": "cpx -w config.json vector/",
|
||||
"start:emojione": "cpx \"node_modules/emojione/assets/svg/*\" vector/emojione/svg/ -w",
|
||||
"start:res": "parallelshell \"cpx -w \\\"{src/skins/vector/fonts,src/skins/vector/img}/**\\\" webapp/\" \"cpx -w \\\"{res/media,res/vector-icons}/**\\\" webapp/\"",
|
||||
"start:config": "cpx -w config.json webapp/",
|
||||
"start:emojione": "cpx \"node_modules/emojione/assets/svg/*\" webapp/emojione/svg/ -w",
|
||||
"start:js": "webpack-dev-server -w --progress",
|
||||
"start:js:prod": "NODE_ENV=production webpack-dev-server -w --progress",
|
||||
"start:skins:css": "mkdirp build && catw \"src/skins/vector/css/**/*.css\" -o build/components.css",
|
||||
"start": "node scripts/babelcheck.js && parallelshell \"npm run start:emojione\" \"npm run start:res\" \"npm run start:config\" \"npm run start:js\" \"npm run start:skins:css\"",
|
||||
"start:prod": "parallelshell \"npm run start:emojione\" \"npm run start:js:prod\" \"npm run start:skins:css\"",
|
||||
"clean": "rimraf build lib vector",
|
||||
"clean": "rimraf build lib webapp",
|
||||
"prepublish": "npm run build:compile",
|
||||
"test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false",
|
||||
"test:multi": "karma start"
|
||||
|
@ -132,12 +132,12 @@
|
|||
"//asar=false": "https://github.com/electron-userland/electron-builder/issues/675",
|
||||
"asar": false,
|
||||
"dereference": true,
|
||||
"//files": "We bundle everything, so we only need to include vector/",
|
||||
"//files": "We bundle everything, so we only need to include webapp/",
|
||||
"files": [
|
||||
"!**/*",
|
||||
"electron/src/**",
|
||||
"electron/img/**",
|
||||
"vector/**",
|
||||
"webapp/**",
|
||||
"package.json"
|
||||
],
|
||||
"squirrelWindows": {
|
||||
|
|
|
@ -8,9 +8,10 @@ else
|
|||
version=`git describe --dirty --tags || echo unknown`
|
||||
fi
|
||||
|
||||
npm run clean
|
||||
npm run build
|
||||
mkdir -p dist
|
||||
cp -r vector vector-$version
|
||||
cp -r webapp vector-$version
|
||||
echo $version > vector-$version/version
|
||||
tar chvzf dist/vector-$version.tar.gz vector-$version
|
||||
rm -r vector-$version
|
||||
|
|
|
@ -39,7 +39,7 @@ module.exports = {
|
|||
],
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, "vector"),
|
||||
path: path.join(__dirname, "webapp"),
|
||||
filename: "[name].[chunkhash].js",
|
||||
devtoolModuleFilenameTemplate: function(info) {
|
||||
// Reading input source maps gives only relative paths here for
|
||||
|
@ -98,8 +98,8 @@ module.exports = {
|
|||
|
||||
// configuration for the webpack-dev-server
|
||||
devServer: {
|
||||
// serve unwebpacked assets from vector.
|
||||
contentBase: './vector',
|
||||
// serve unwebpacked assets from webapp.
|
||||
contentBase: './webapp',
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue