131 строка
6.8 KiB
JSON
131 строка
6.8 KiB
JSON
{
|
|
"repository": "https://github.com/mozilla/foundation.mozilla.org",
|
|
"issues": "https://github.com/mozilla/foundation.mozilla.org/issues",
|
|
"description": "Mozilla Foundation site",
|
|
"engines": {
|
|
"node": "18.x"
|
|
},
|
|
"scripts": {
|
|
"build": "run-s build:clean && run-p build:js:prod build:common",
|
|
"build:clean": "shx rm -rf network-api/networkapi/frontend && shx mkdir -p network-api/networkapi/frontend/_js",
|
|
"build:common": "run-p build:images build:sass build:tailwind build:contribute",
|
|
"build:contribute": "shx cp contribute.json network-api/networkapi/frontend/",
|
|
"build:images": "shx rm -rf network-api/networkapi/frontend/_images && shx cp -r source/images network-api/networkapi/frontend/_images",
|
|
"build:js:dev": "node esbuild.config.js -- --node-env development",
|
|
"build:js:prod": "node esbuild.config.js -- --node-env production",
|
|
"build:sass": "run-s build:sass:clean && run-p build:sass:main build:sass:bg && run-s optimize:css",
|
|
"build:sass:clean": "shx mkdir -p network-api/networkapi/frontend/_css",
|
|
"build:sass:main": "sass source/sass/main.scss network-api/networkapi/frontend/_css/main.compiled.css",
|
|
"build:sass:bg": "sass source/sass/buyers-guide/bg-main.scss network-api/networkapi/frontend/_css/buyers-guide.compiled.css",
|
|
"build:tailwind": "tailwindcss -i source/postcss/tailwind.css -o network-api/networkapi/frontend/_css/tailwind.compiled.css",
|
|
"docker:up": "docker-compose up",
|
|
"docker:down": "docker-compose down",
|
|
"fix": "run-s fix:*",
|
|
"fix:js": "npm run lint:js:eslint -- --fix",
|
|
"fix:css": "npm run lint:css:scss -- --fix",
|
|
"fix:scss": "npm run fix:css",
|
|
"heroku-postbuild": "npm run build",
|
|
"lint": "run-s lint:*",
|
|
"lint:procfile": "node test/test-procfile.js",
|
|
"lint:js": "run-s lint:js:*",
|
|
"lint:js:eslint": "eslint --config ./.eslintrc.json \"source/js/**/*.js\" \"source/js/**/*.jsx\" \"network-api/networkapi/wagtailcustomization/**/*.js\" ./*.js",
|
|
"lint:js:a11y": "eslint --config ./.eslintrc.a11y.json \"source/js/**/*.jsx\"",
|
|
"lint:css": "run-s lint:css:*",
|
|
"lint:css:scss": "stylelint \"source/sass/**/*.scss\" \"source/js/**/*.scss\" --custom-syntax postcss-scss",
|
|
"lint:css:scss:color": "stylelint \"source/sass/**/*.scss\" \"source/js/**/*.scss\" \"!source/sass/**/_colors.scss\" --custom-syntax postcss-scss --config .stylelintrc-colors.js",
|
|
"lint:css:network": "stylelint \"network-api/networkapi/{,!(frontend)/**/}*.css\" --custom-syntax postcss-scss",
|
|
"optimize:css": "run-s optimize:css:*",
|
|
"optimize:css:run": "postcss network-api/networkapi/frontend/_css/*.css --dir network-api/networkapi/frontend/_css/temp",
|
|
"optimize:css:copy": "shx mv network-api/networkapi/frontend/_css/temp/* network-api/networkapi/frontend/_css",
|
|
"optimize:css:clean": "shx rm -rf network-api/networkapi/frontend/_css/temp",
|
|
"optimize:svg": "svgo --multipass --folder ./source/images/ --recursive",
|
|
"optimize:jpg": "find source/images -type f -name '*.jpg' -print0 | xargs -0 -n 1 -P 6 -I '{}' guetzli --quality 93 '{}' '{}'",
|
|
"optimize:png": "find source/images -type f -name '*.png' -print0 | xargs -0 -n 1 -P 6 optipng",
|
|
"optimize": "run-p optimize:**",
|
|
"percy": "percy exec -t 750 -- npm run playwright:percy",
|
|
"playwright": "npm run playwright:wait:dev && playwright test ./tests/integration.spec.js",
|
|
"playwright:install": "playwright install chromium firefox webkit",
|
|
"playwright:wait:dev": "wait-on -i 3000 http://localhost:8000/static/_css/tailwind.compiled.css",
|
|
"playwright:percy": "run-p --race server playwright:visual",
|
|
"playwright:urls": "wait-on -i 3000 -t 120000 -v http://127.0.0.1:8000/cms && playwright test ./tests/urls.spec.js",
|
|
"playwright:visual": "wait-on -i 3000 -t 120000 -v http://127.0.0.1:8000/cms && playwright test ./tests/visual.spec.js",
|
|
"playwright:ci": "run-p --race server playwright:integration",
|
|
"playwright:integration": "wait-on -i 3000 -t 120000 -v http://127.0.0.1:8000/cms && playwright test ./tests/integration.spec.js",
|
|
"precommit": "npm run test",
|
|
"prettier:js": "prettier \"source/js/**/*.js\" \"source/js/**/*.jsx\" \"network-api/networkapi/wagtailcustomization/**/*.js\" \"tests/**/*.js\" ./*.js",
|
|
"prettier:scss": "prettier \"source/sass/**/*.scss\" \"source/js/**/*.scss\" \"network-api/networkapi/{,!(frontend)/**/}*.css\"",
|
|
"pyright": "pyright",
|
|
"server": "python network-api/manage.py runserver 0.0.0.0:8000",
|
|
"server:silent": "python network-api/manage.py runserver 0.0.0.0:8000 >> server.log 2>&1",
|
|
"start": "docker-compose up",
|
|
"sync": "browser-sync start --proxy \"localhost:8000\" --reload-debounce 50 --files \"./network-api/networkapi/**/*.html\" \"./network-api/networkapi/frontend/_css/*.css\" \"./network-api/networkapi/frontend/_js/*.js\"",
|
|
"tailwind": "run-p tailwind:watch sync",
|
|
"tailwind:watch": "npm run build:tailwind -- -w",
|
|
"test": "npm run lint",
|
|
"watch": "wait-on http://backend:8000/cms && run-s build:clean && run-p build:js:dev build:common watch:**",
|
|
"watch:images": "chokidar \"source/images/**/*\" -c \"npm run build:images\"",
|
|
"watch:sass": "chokidar \"source/**/*.scss\" \"network-api/**/*.html\" -c \"npm run build:sass\""
|
|
},
|
|
"browserslist": [
|
|
"> 1%",
|
|
"last 2 versions"
|
|
],
|
|
"author": "Mozilla",
|
|
"license": "MPL-2.0",
|
|
"dependencies": {
|
|
"@glidejs/glide": "^3.4.1",
|
|
"@sentry/browser": "^6.2.1",
|
|
"@tailwindcss/forms": "^0.5.3",
|
|
"@tailwindcss/line-clamp": "^0.4.2",
|
|
"autoprefixer": "^10.4.13",
|
|
"axe-core": "^4.1.4",
|
|
"bootstrap": "^4.6.0",
|
|
"chart.js": "3.5.1",
|
|
"classnames": "2.3.2",
|
|
"countup.js": "^2.3.2",
|
|
"cssnano": "^5.1.14",
|
|
"esbuild": "^0.12.24",
|
|
"event-stream": "3.3.4",
|
|
"gsap": "^3.11.4",
|
|
"htmx.org": "^1.8.4",
|
|
"locomotive-scroll": "^4.1.4",
|
|
"moment": "^2.29.4",
|
|
"npm-run-all": "^4.1.3",
|
|
"postcss": "^8.4.21",
|
|
"postcss-cli": "^8.3.1",
|
|
"postcss-import": "^14.0.2",
|
|
"postcss-scss": "^4.0.6",
|
|
"prop-types": "^15.7.2",
|
|
"react": "^17.0.2",
|
|
"react-axe": "^3.5.4",
|
|
"react-dom": "^17.0.2",
|
|
"react-ga": "3.3.1",
|
|
"sass": "^1.38.2",
|
|
"shx": "^0.3.3",
|
|
"swiper": "^6.8.4",
|
|
"tailwindcss": "^3.2.4",
|
|
"uuid": "^8.3.2",
|
|
"whatwg-fetch": "^3.6.2"
|
|
},
|
|
"devDependencies": {
|
|
"@percy/cli": "^1.17.0",
|
|
"@percy/playwright": "^1.0.1",
|
|
"@playwright/test": "^1.17.0",
|
|
"browser-sync": "^2.27.11",
|
|
"browserslist": "^4.21.4",
|
|
"chokidar-cli": "^2.1.0",
|
|
"dotenv": "^8.2.0",
|
|
"eslint": "^7.32.0",
|
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
"eslint-plugin-prettier": "^4.2.1",
|
|
"eslint-plugin-react": "^7.32.0",
|
|
"optipng-bin": "^9.0.0",
|
|
"prettier": "^2.8.3",
|
|
"stylelint": "^14.16.1",
|
|
"stylelint-config-standard": "^20.0.0",
|
|
"stylelint-prettier": "^1.2.0",
|
|
"svgo": "^2.5.0",
|
|
"wait-on": "^6"
|
|
}
|
|
}
|