Scripts for package.json
Beautify
Section titled “Beautify” "beautify-write-all": "js-beautify --html -r **/*.html --config .jsbeautifyrc",
Webpack
Section titled “Webpack” "build": "npx webpack --config webpack.prod.js", "build:analyze": "npm run build && npx webpack-bundle-analyzer assets/dist/stats.json assets/dist --mode static --report assets/dist/bundle-report.html --no-open", "buildDev": "npx webpack --config webpack.dev.js",
Critical
Section titled “Critical” "critical-build-all": "npm run critical:home && npm run critical:product && npm run critical:category && npm run critical:blog", "critical-build-blog": "npx critical public/blog.html --base public/ --width 1300 --height 900 --css ./local-styles.css --target public/critical-blog.css", "critical-build-category": "npx critical public/category.html --base public/ --width 1300 --height 900 --css ./local-styles.css --target public/critical-category.css", "critical-build-home": "npx critical public/home.html --base public/ --width 1300 --height 900 --css ./local-styles.css --target public/critical-home.css", "critical-build-product": "npx critical public/product.html --base public/ --width 1300 --height 900 --css ./local-styles.css --target public/critical-product.css",
Curlylint
Section titled “Curlylint” "curlylint-check-templates": "curlylint templates",
DJ Lint
Section titled “DJ Lint” "djhtml-indent-all": "npx djhtml . -t 4", "djlint-check-all": "djlint . --extension=.html --check --profile=handlebars", "djlint-format-all": "djlint . --extension=.html --reformat --profile=handlebars", "djlint-lint-check-templates": "djlint . --extension=.html --lint --profile=handlebars --include=h017,h035,h037,h008,h014,h009,h012,h024 --ignore=h013,h015,h007,h019,h021,h031,h030",
ES Lint
Section titled “ES Lint” "eslint-check": "npx eslint **/*.{js,jsx,ts,tsx}", "eslint-fix": "npx eslint --fix **/*.{js,jsx,ts,tsx}",
"git-check": "git fsck --full", "git-fix": "git gc --aggressive --prune=now", "gitbash-clean-all": "rm -rf node_modules assets/dist package-lock.json",
"grunt-svg-store": "grunt svgstore",
HTML Hint
Section titled “HTML Hint” "html_hint-check-other": "htmlhint _other/**/*.html", "html_hint-check-templates": "htmlhint templates/**/*.html",
"test": "npx jest",
Stencil
Section titled “Stencil” "open": "npx stencil start --open -v Warm -c 1 --verbose", "stencil-autofix-scss": "npx stencil scss-autofix --dry", "stencil-build-dev": "npx webpack --config webpack.dev.js", "stencil-bundle": "npx stencil bundle", "stencil-push-apply": "npx stencil push -a", "stencil-push-sourcemaps": "npx stencil push -a --source-maps", "stencil-start-warm": "npx stencil start -v Warm -c 1",
Prettier
Section titled “Prettier” "prettier-check-html": "npx prettier --check **/*.html --config .prettierrc.json", "prettier-check-js": "npx prettier --check **/*.{js,jsx,ts,tsx} --config .prettierrc.json", "prettier-check-scss": "npx prettier --check **/*.{scss,css} --config .prettierrc.json", "prettier-fix-html": "npx prettier --write **/*.html --config .prettierrc.json --ignore-unknown", "prettier-fix-js": "npx prettier --write **/*.{js,jsx,ts,tsx} --config .prettierrc.json --ignore-unknown", "prettier-fix-scss": "npx prettier --write **/*.{scss,css} --config .prettierrc.json --ignore-unknown",
Stylelint
Section titled “Stylelint” "stylelint": "npx stylelint **/*.scss", "stylelint:fix": "npx stylelint --fix **/*.scss", "stylelint-check-all": "npx stylelint **/*.{scss,css}", "stylelint-fix-all": "npx stylelint **/*.{scss,css} --fix",
Tailwind
Section titled “Tailwind” "tailwind-build-v3": "npm run tailwind:build", "tailwind-build-v4": "@tailwindcss/cli -i ./assets/scss/v3-input.scss -o ./assets/scss/tailwind.scss", "tailwind-watch-v3": "npm run tailwind:watch", "tailwind-watch-v4": "@tailwindcss/cli -i ./assets/scss/v3-input.scss -o ./assets/scss/tailwind.scss --watch", "tailwind:build": "postcss ./assets/scss/v3-input.scss -o ./assets/scss/tailwind.scss", "tailwind:build-cli": "tailwindcss -i ./assets/scss/v3-input.scss -o ./assets/scss/tailwind.scss", "tailwind:watch": "postcss ./assets/scss/v3-input.scss -o ./assets/scss/tailwind.scss --watch", "tailwind:watch-cli": "tailwindcss -i ./assets/scss/v3-input.scss -o ./assets/scss/tailwind.scss --watch",
Webhint
Section titled “Webhint” "webhint-check-all": "npx hint -c .hintrc ."
{ "scripts": { "astro": "astro", "build": "astro check && astro build", "check": "npx astro check", "clean:all": "rm -rf node_modules assets/dist package-lock.json .astro", "clean:builds": "rm -rf .trunk .astro dist", "dev": "astro dev", "lint": "eslint --ext .js,.jsx,.ts,.tsx,.astro src/", "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx,.astro src/ --fix", "lint:mdx": "eslint --ext .mdx src/", "lint:mdx:fix": "eslint --ext .mdx src/ --fix", "preview": "astro preview", "stylelint": "npx stylelint **/*{.scss,.css}", "stylelint:fix": "npx stylelint \"**/*{.scss,.css}\" --fix", "update": "npx @astrojs/upgrade" }}