foundation.mozilla.org/package.json

125 строки
6.6 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": ">=14.4.0"
},
"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 test:eslint:js -- --fix",
"fix:scss": "npm run test:scss -- --fix",
"heroku-postbuild": "npm run build",
"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 http://localhost:8000/cms && playwright test ./tests/urls.spec.js",
"playwright:visual": "wait-on -i 3000 http://localhost:8000/cms && playwright test ./tests/visual.spec.js",
"playwright:ci": "run-p --race server playwright:integration",
"playwright:integration": "wait-on -i 3000 http://localhost:8000/cms && playwright test ./tests/integration.spec.js",
"precommit": "npm run test",
"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:procfile": "node test/test-procfile.js",
"test:eslint:js:pre": "prettier \"source/js/**/*.js\" \"source/js/**/*.jsx\" \"network-api/networkapi/wagtailcustomization/**/*.js\" \"tests/**/*.js\" ./*.js --write",
"test:eslint:js": "eslint --config ./.eslintrc.json \"source/js/**/*.js\" \"source/js/**/*.jsx\" \"network-api/networkapi/wagtailcustomization/**/*.js\" ./*.js",
"test:eslint:a11y:pre": "prettier \"source/js/**/*.jsx\" --write",
"test:eslint:a11y": "eslint --config ./.eslintrc.a11y.json \"source/js/**/*.jsx\"",
"test:scss:pre": "prettier \"source/sass/**/*.scss\" \"source/js/**/*.scss\" \"network-api/networkapi/{,!(frontend)/**/}*.css\" --write",
"test:scss": "stylelint \"source/sass/**/*.scss\" \"source/js/**/*.scss\" --syntax scss",
"test:scss:styleguide:color": "stylelint \"source/sass/**/*.scss\" \"source/js/**/*.scss\" \"!source/sass/**/_colors.scss\" --syntax scss --config .stylelintrc-colors.js",
"test:css": "stylelint \"network-api/networkapi/{,!(frontend)/**/}*.css\" --syntax scss",
"test": "run-s test:** build",
"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\" -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.1",
"@tailwindcss/line-clamp": "^0.4.0",
"autoprefixer": "^10.4.2",
"axe-core": "^4.1.4",
"bootstrap": "^4.6.0",
"chart.js": "3.5.1",
"classnames": "2.3.1",
"countup.js": "^2.0.7",
"cssnano": "^5.0.8",
"esbuild": "^0.12.24",
"event-stream": "3.3.4",
"gsap": "^3.9.1",
"moment": "^2.29.1",
"npm-run-all": "^4.1.3",
"postcss": "^8.4.5",
"postcss-cli": "^8.3.1",
"postcss-import": "^14.0.2",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-axe": "^3.5.4",
"react-dom": "^17.0.2",
"react-ga": "3.3.0",
"sass": "^1.38.2",
"shx": "^0.3.3",
"swiper": "^6.8.4",
"tailwindcss": "^3.0.23",
"uuid": "^8.3.2",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
"@percy/cli": "^1.0.0-beta.71",
"@percy/playwright": "^1.0.1",
"@playwright/test": "^1.17.0",
"browser-sync": "^2.27.5",
"browserslist": "^4.17.0",
"chokidar-cli": "^2.1.0",
"dotenv": "^8.2.0",
"eslint": "^7.32.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.25.1",
"optipng-bin": "^7.0.0",
"prettier": "^2.3.2",
"pyright": "^1.1.256",
"stylelint": "^13.13.1",
"stylelint-config-standard": "^20.0.0",
"stylelint-prettier": "^1.2.0",
"svgo": "^2.5.0",
"wait-on": "^5.2.1"
}
}