Update build scripts for new process
We have to convert *something* to TypeScript so it doesn't complain that there's nothing to compile, so this converts the easiest utility library. Many of the scripts are copied from the react-sdk.
This commit is contained in:
parent
4482cac9b4
commit
ec66069e96
6 changed files with 1425 additions and 575 deletions
66
package.json
66
package.json
|
@ -11,56 +11,53 @@
|
|||
},
|
||||
"license": "Apache-2.0",
|
||||
"files": [
|
||||
"AUTHORS.rst",
|
||||
"CONTRIBUTING.rst",
|
||||
"deploy",
|
||||
"docs",
|
||||
"karma.conf.js",
|
||||
"lib",
|
||||
"release.sh",
|
||||
"scripts",
|
||||
"res",
|
||||
"src",
|
||||
"test",
|
||||
"webpack.config.js"
|
||||
"webpack.config.js",
|
||||
"scripts",
|
||||
"docs",
|
||||
"release.sh",
|
||||
"karma.conf.js",
|
||||
"deploy",
|
||||
"CHANGELOG.md",
|
||||
"CONTRIBUTING.rst",
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"AUTHORS.rst",
|
||||
"package.json"
|
||||
],
|
||||
"style": "bundle.css",
|
||||
"scripts": {
|
||||
"reskindex": "reskindex -h src/header",
|
||||
"reskindex:watch": "reskindex -h src/header -w",
|
||||
"i18n": "matrix-gen-i18n",
|
||||
"prunei18n": "matrix-prune-i18n",
|
||||
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && node scripts/compare-file.js src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
|
||||
"reskindex": "reskindex -h src/header",
|
||||
"reskindex:watch": "reskindex -h src/header -w",
|
||||
"clean": "rimraf lib webapp electron_app/dist",
|
||||
"build": "yarn clean && yarn build:res && yarn build:compile && yarn build:types && yarn build:bundle",
|
||||
"build:res": "node scripts/copy-res.js",
|
||||
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
|
||||
"build:compile": "yarn reskindex && babel --source-maps -d lib src",
|
||||
"build:compile": "yarn reskindex && babel -d lib --verbose --extensions \".ts,.js\" src",
|
||||
"build:bundle": "cross-env NODE_ENV=production webpack -p --progress --bail --mode production",
|
||||
"build:bundle:dev": "webpack --progress --bail --mode development",
|
||||
"build:electron": "yarn clean && yarn build && yarn install:electron && electron-builder -wml --ia32 --x64",
|
||||
"build:electron": "yarn build && yarn install:electron && electron-builder -wml --ia32 --x64",
|
||||
"build:electron:linux": "yarn build && electron-builder -l --x64",
|
||||
"build:electron:macos": "yarn build && electron-builder -m --x64",
|
||||
"build:electron:windows": "yarn build && electron-builder -w --ia32 --x64",
|
||||
"build:react-sdk": "node scripts/yarn-sub.js matrix-react-sdk build",
|
||||
"build:js-sdk": "node scripts/yarn-sub.js matrix-js-sdk start:init",
|
||||
"build": "yarn build:js-sdk && yarn build:react-sdk && yarn reskindex && yarn build:res && yarn build:bundle",
|
||||
"build:dev": "yarn build:js-sdk && yarn build:react-sdk && yarn reskindex && yarn build:res && yarn build:bundle:dev",
|
||||
"dist": "scripts/package.sh",
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"install:electron": "electron-builder install-app-deps",
|
||||
"electron": "yarn install:electron && electron .",
|
||||
"dist": "scripts/package.sh",
|
||||
"start": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n reskindex,res,riot-js \"yarn reskindex:watch\" \"yarn start:res\" \"yarn start:js\"",
|
||||
"start:res": "node scripts/copy-res.js -w",
|
||||
"start:js": "webpack-dev-server --host=0.0.0.0 --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --progress --mode development",
|
||||
"start:js:prod": "cross-env NODE_ENV=production webpack-dev-server -w --progress --mode production",
|
||||
"start:js-sdk": "node scripts/yarn-sub.js matrix-js-sdk start:watch",
|
||||
"start:js-sdk:prod": "cross-env NODE_ENV=production node scripts/yarn-sub.js matrix-js-sdk start:watch",
|
||||
"start:react-sdk": "node scripts/yarn-sub.js matrix-react-sdk start:all",
|
||||
"start:react-sdk:prod": "cross-env NODE_ENV=production node scripts/yarn-sub.js matrix-react-sdk start:all",
|
||||
"start": "yarn build:js-sdk && yarn build:react-sdk && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n js-sdk,react-sdk,reskindex,res,riot-js \"yarn start:js-sdk\" \"yarn start:react-sdk\" \"yarn reskindex:watch\" \"yarn start:res\" \"yarn start:js\"",
|
||||
"start:prod": "yarn build:js-sdk && yarn build:react-sdk && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n js-sdk,react-sdk,reskindex,res,riot-js \"yarn start:js-sdk:prod\" \"yarn start:react-sdk:prod\" \"yarn reskindex:watch\" \"yarn start:res\" \"yarn start:js:prod\"",
|
||||
"lint": "eslint src/",
|
||||
"lintall": "eslint src/ test/",
|
||||
"clean": "rimraf lib webapp electron_app/dist",
|
||||
"prepare": "yarn clean && yarn build:compile",
|
||||
"electron": "yarn build && yarn install:electron && electron .",
|
||||
"lint": "yarn lint:types && yarn lint:ts && yarn lint:js && yarn lint:style",
|
||||
"lint:js": "eslint src test",
|
||||
"lint:ts": "echo 'We don't actually have a typescript linter at this layer because tslint is being removed from our stack. Presumably your TS is fine.'",
|
||||
"lint:types": "tsc --noEmit",
|
||||
"lint:style": "stylelint 'res/css/**/*.scss'",
|
||||
"test": "karma start --single-run=true --autoWatch=false --browsers VectorChromeHeadless",
|
||||
"test-multi": "karma start"
|
||||
"test:multi": "karma start"
|
||||
},
|
||||
"dependencies": {
|
||||
"browser-request": "^0.3.3",
|
||||
|
@ -97,7 +94,7 @@
|
|||
"@babel/preset-typescript": "^7.7.4",
|
||||
"@babel/register": "^7.7.4",
|
||||
"@babel/runtime": "^7.7.6",
|
||||
"@types/react": "^16.9.16",
|
||||
"@types/react": "^16.9.17",
|
||||
"@types/react-dom": "^16.9.4",
|
||||
"autoprefixer": "^9.7.3",
|
||||
"babel-eslint": "^10.0.3",
|
||||
|
@ -105,7 +102,7 @@
|
|||
"chokidar": "^2.0.4",
|
||||
"concurrently": "^4.0.1",
|
||||
"cpx": "^1.3.2",
|
||||
"cross-env": "^4.0.0",
|
||||
"cross-env": "^6.0.3",
|
||||
"css-loader": "^3.3.2",
|
||||
"electron-builder": "^21.2.0",
|
||||
"electron-builder-squirrel-windows": "^21.2.0",
|
||||
|
@ -152,6 +149,7 @@
|
|||
"postcss-strip-inline-comments": "^0.1.5",
|
||||
"rimraf": "^2.4.3",
|
||||
"shell-escape": "^0.2.0",
|
||||
"stylelint": "^12.0.1",
|
||||
"terser-webpack-plugin": "^2.3.0",
|
||||
"typescript": "^3.7.3",
|
||||
"webpack": "^4.41.2",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue