-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate build from snowpack to vite, improve build and lint
- Loading branch information
Showing
166 changed files
with
2,017 additions
and
5,816 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ignores: [ | ||
# These are dependencies for vite and vite plugins that depcheck doesn't recognize as being used | ||
"postcss-scss", | ||
"stylelint-order", | ||
"stylelint-config-recommended-scss", | ||
"stylelint-declaration-strict-value", | ||
"stylelint-scss", | ||
# This is used by commitlint in .commitlintrc.js | ||
" @commitlint/config-conventional", | ||
# These are vite aliases / tsconfig paths that point to specific local directories | ||
# Note the \\ is apparently necessary to escape the # or the ignore doesn't work | ||
"\\#src", | ||
"\\#test", | ||
"\\#types" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Jest | ||
name: Test | ||
|
||
on: [pull_request] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build | ||
coverage | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,23 +7,24 @@ | |
"private": true, | ||
"scripts": { | ||
"prepare": "husky install", | ||
"start": "snowpack dev", | ||
"build": "snowpack build", | ||
"test": "TZ=UTC jest", | ||
"test-watch": "TZ=UTC jest --watch", | ||
"test-coverage": "TZ=UTC jest --coverage", | ||
"start": "vite", | ||
"build": "vite build", | ||
"test": "TZ=UTC vitest run", | ||
"test-watch": "TZ=UTC vitest", | ||
"test-coverage": "TZ=UTC vitest run --coverage", | ||
"i18next": "i18next src/{components,containers,screens}/**/{**/,/}*.tsx && node ./scripts/i18next/generate.js", | ||
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", | ||
"lint": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"", | ||
"format": "prettier --write \"{**/*,*}.{js,ts,jsx,tsx}\"", | ||
"lint": "prettier --check \"{**/*,*}.{js,ts,jsx,tsx}\" && eslint \"{**/*,*}.{js,ts,jsx,tsx}\"", | ||
"lint:styles": "stylelint \"src/**/*.scss\"", | ||
"commit-msg": "commitlint --edit $1", | ||
"pre-commit": "lint-staged && TZ=UTC yarn test --coverage --watchAll=false --ci --bail=1", | ||
"pre-commit": "depcheck && lint-staged && TZ=UTC yarn test --coverage", | ||
"codecept:mobile": "cd test-e2e && codeceptjs -c codecept.mobile.js run --steps", | ||
"codecept:desktop": "cd test-e2e && codeceptjs -c codecept.desktop.js run --steps", | ||
"deploy:github": "node ./scripts/deploy-github.js" | ||
}, | ||
"dependencies": { | ||
"classnames": "^2.3.1", | ||
"history": "^4.10.1", | ||
"i18next": "^20.3.1", | ||
"i18next-browser-languagedetector": "^6.1.1", | ||
"jwt-decode": "^3.1.2", | ||
|
@@ -37,88 +38,82 @@ | |
"react-query": "^3.13.10", | ||
"react-router-dom": "^5.2.0", | ||
"react-virtualized": "^9.22.3", | ||
"tile-dock": "https://github.com/RCVZ/tile-dock-temp", | ||
"wicg-inert": "^3.1.1", | ||
"yup": "^0.32.9" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", | ||
"@babel/plugin-proposal-optional-chaining": "^7.14.5", | ||
"@babel/preset-react": "^7.14.5", | ||
"@babel/preset-typescript": "^7.14.5", | ||
"@codeceptjs/configure": "^0.8.0", | ||
"@commitlint/cli": "^12.1.1", | ||
"@commitlint/config-conventional": "^12.1.1", | ||
"@snowpack/app-scripts-react": "^2.0.1", | ||
"@snowpack/plugin-build-script": "^2.1.0", | ||
"@snowpack/plugin-dotenv": "^2.1.0", | ||
"@snowpack/plugin-postcss": "^1.4.3", | ||
"@snowpack/plugin-react-refresh": "^2.5.0", | ||
"@snowpack/plugin-run-script": "^2.3.0", | ||
"@snowpack/plugin-sass": "^1.4.0", | ||
"@snowpack/plugin-typescript": "^1.2.1", | ||
"@snowpack/plugin-webpack": "^3.0.0", | ||
"@testing-library/jest-dom": "^5.12.0", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
"@testing-library/react": "^11.2.6", | ||
"@types/jest": "^26.0.22", | ||
"@types/jwplayer": "^8.2.7", | ||
"@types/lodash.merge": "^4.6.6", | ||
"@types/node": "^17.0.23", | ||
"@types/react": "^17.0.14", | ||
"@types/react-dom": "^17.0.9", | ||
"@types/react-helmet": "^6.1.2", | ||
"@types/react-router-dom": "^5.1.8", | ||
"@types/react-virtualized": "^9.21.12", | ||
"@types/snowpack-env": "^2.3.4", | ||
"@typescript-eslint/eslint-plugin": "^4.28.3", | ||
"@typescript-eslint/parser": "^4.28.3", | ||
"@typescript-eslint/eslint-plugin": "^5.17.0", | ||
"@typescript-eslint/parser": "^5.17.0", | ||
"@vitejs/plugin-react": "^1.0.7", | ||
"c8": "^7.11.2", | ||
"codeceptjs": "^3.2.3", | ||
"confusing-browser-globals": "^1.0.10", | ||
"depcheck": "^1.4.3", | ||
"eslint": "^7.31.0", | ||
"eslint-config-react": "^1.1.7", | ||
"eslint-plugin-codeceptjs": "^1.3.0", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-react": "^7.24.0", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"eslint-plugin-rulesdir": "^0.2.0", | ||
"eslint-watch": "^7.0.0", | ||
"faker": "^5.5.1", | ||
"husky": "^6.0.0", | ||
"i18next-parser": "^4.2.0", | ||
"jest": "^26.6.3", | ||
"jest-css-modules-transform": "^4.3.0", | ||
"jsdom": "^19.0.0", | ||
"lint-staged": "^10.5.4", | ||
"playwright": "^1.12.3", | ||
"postcss": "^8.3.5", | ||
"postcss-cli": "^8.3.1", | ||
"postcss-import": "^14.0.2", | ||
"postcss-scss": "^4.0.0", | ||
"postcss-scss": "^4.0.4", | ||
"prettier": "^2.3.2", | ||
"snowpack": "^3.8.2", | ||
"start-server-and-test": "^1.12.6", | ||
"react-app-polyfill": "^3.0.0", | ||
"sass": "^1.49.10", | ||
"stylelint": "^13.13.1", | ||
"stylelint-config-recommended-scss": "^4.3.0", | ||
"stylelint-declaration-strict-value": "^1.7.12", | ||
"stylelint-order": "^4.1.0", | ||
"stylelint-scss": "^3.20.0", | ||
"ts-node": "^10.4.0", | ||
"ts-node": "^10.7.0", | ||
"typescript": "^4.3.4", | ||
"workbox-webpack-plugin": "^6.1.5" | ||
"vite": "^2.9.0", | ||
"vite-plugin-eslint": "^1.3.0", | ||
"vite-plugin-html": "^3.2.0", | ||
"vite-plugin-pwa": "^0.11.13", | ||
"vite-plugin-static-copy": "^0.4.4", | ||
"vite-plugin-stylelint": "^2.1.0", | ||
"vitest": "^0.10.0", | ||
"workbox-build": "^6.5.2", | ||
"workbox-window": "^6.5.2" | ||
}, | ||
"peerDependencies": { | ||
"webpack": "^5.34.0" | ||
"react-router": "^5.2.1" | ||
}, | ||
"lint-staged": { | ||
"src/**/*.{js,jsx,ts,tsx}": [ | ||
"prettier --write" | ||
"{**/*,*}.{js,ts,jsx,tsx}": [ | ||
"prettier --check", | ||
"eslint" | ||
], | ||
"src/**/*.scss": [ | ||
"stylelint" | ||
] | ||
}, | ||
"browserslist": [ | ||
"defaults", | ||
"not IE 11" | ||
], | ||
"optionalDependencies": { | ||
"gh-pages": "^3.2.3", | ||
"lighthouse": "^8.6.0" | ||
}, | ||
"resolutions": { | ||
"react-virtualized": "git+https://[email protected]/remorses/react-virtualized-fixed-import.git#9.22.3", | ||
"glob-parent": "^5.1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
env: { | ||
// Browser conf | ||
browser: false, | ||
node: true, | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.