fix: standardized build scripts

This commit is contained in:
Andrew Bastin 2021-09-17 13:46:23 +05:30
parent 4407f260ae
commit e90b26ebed
3 changed files with 11 additions and 8 deletions

View file

@ -22,6 +22,6 @@ EXPOSE 3000
RUN mv packages/hoppscotch-app/.env.example packages/hoppscotch-app/.env RUN mv packages/hoppscotch-app/.env.example packages/hoppscotch-app/.env
RUN pnpm -r build-prod RUN pnpm run generate
CMD ["pnpm", "run", "start"] CMD ["pnpm", "run", "start"]

View file

@ -7,11 +7,11 @@
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"prepare": "husky install", "prepare": "husky install",
"dev": "pnpm -r dev", "dev": "pnpm -r do-dev",
"build-prod": "pnpm -r build-prod", "generate": "pnpm -r do-build-prod",
"start": "pnpm -r start", "start": "pnpm -r do-prod-start",
"lintfix": "pnpm -r lintfix", "lintfix": "pnpm -r do-lintfix",
"pre-commit": "pnpm -r lint" "pre-commit": "pnpm -r do-lintfix"
}, },
"workspaces": [ "workspaces": [
"./packages/*" "./packages/*"

View file

@ -13,13 +13,16 @@
"build": "vue-tsc --noEmit && nuxt build", "build": "vue-tsc --noEmit && nuxt build",
"start": "nuxt start", "start": "nuxt start",
"generate": "nuxt generate --modern", "generate": "nuxt generate --modern",
"build-prod": "nuxt generate --modern",
"analyze": "npx nuxt build -a", "analyze": "npx nuxt build -a",
"lint:script": "eslint --ext .ts,.js,.vue --ignore-path .gitignore .", "lint:script": "eslint --ext .ts,.js,.vue --ignore-path .gitignore .",
"lint:style": "stylelint **/*.{css,scss,vue} --ignore-path .gitignore", "lint:style": "stylelint **/*.{css,scss,vue} --ignore-path .gitignore",
"lint": "npm run lint:script && npm run lint:style", "lint": "npm run lint:script && npm run lint:style",
"lintfix": "eslint --ext .ts,.js,.vue --ignore-path .gitignore . --fix", "lintfix": "eslint --ext .ts,.js,.vue --ignore-path .gitignore . --fix",
"test": "jest" "test": "jest",
"do-dev": "pnpm run dev",
"do-build-prod": "pnpm run generate",
"do-prod-start": "pnpm run start",
"do-lintfix": "pnpm run lint"
}, },
"dependencies": { "dependencies": {
"@apollo/client": "^3.4.11", "@apollo/client": "^3.4.11",