forked from MozillaFoundation/foundation.mozilla.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
108 lines (108 loc) · 5.76 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
"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: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",
"cypress": "run-p --race cypress:docker cypress:test",
"cypress:a11y": "run-p --race cypress:docker cypress:test:a11y",
"cypress:ci": "run-p --race server cypress:test",
"cypress:ci:prod": "run-p --race server cypress:test:prod",
"cypress:docker": "docker-compose up",
"cypress:install": "npm install --no-save cypress@5.6.0 @percy/cypress@v2.3.3 cypress-axe@0.12.0 @testing-library/cypress@7.0.3",
"cypress:clean": "shx rm -rf ./cypress/screenshots",
"cypress:race": "npm run cypress:clean && wait-on http://localhost:8000/cms",
"cypress:test": " npm run cypress:race && cypress run --spec ./cypress/integration/percy-tests.js",
"cypress:test:prod": "npm run cypress:race && cypress run --spec ./cypress/integration/url-tests.js",
"cypress:test:a11y": "npm run cypress:race && cypress run --spec ./cypress/integration/a11y-tests.js",
"cypress:test:manual": "cypress open",
"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 800 -- npm run cypress:ci",
"precommit": "prettier \"source/js/**/*.js\" \"source/js/**/*.jsx\" *.config.js --write",
"server": "python network-api/manage.py runserver 0.0.0.0:8000",
"start": "docker-compose up",
"test:procfile": "node test/test-procfile.js",
"test:eslint:js:pre": "prettier \"cypress/integration/*.js\" \"source/js/**/*.js\" \"source/js/**/*.jsx\" \"network-api/networkapi/wagtailcustomization/**/*.js\" ./*.js --write",
"test:eslint:js": "eslint --config ./.eslintrc.json \"cypress/integration/*.js\" \"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": "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": {
"@sentry/browser": "^6.2.1",
"autoprefixer": "^10.2.4",
"axe-core": "^4.1.3",
"bootstrap": "^4.6.0",
"classnames": "2.2.6",
"cssnano": "^4.1.10",
"esbuild": "^0.8.57",
"event-stream": "3.3.4",
"js-cookie": "2.2.1",
"moment": "^2.29.1",
"npm-run-all": "^4.1.3",
"postcss": "^8.2.6",
"postcss-cli": "^8.3.1",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-axe": "^3.5.4",
"react-dom": "^17.0.1",
"react-ga": "3.3.0",
"sass": "^1.32.8",
"shx": "^0.3.3",
"uuid": "^8.3.2",
"whatwg-fetch": "^3.6.1"
},
"devDependencies": {
"browserslist": "^4.16.1",
"chokidar-cli": "^2.1.0",
"dotenv": "^8.2.0",
"eslint": "^7.21.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"optipng-bin": "^7.0.0",
"prettier": "^2.2.1",
"stylelint": "^13.11.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-prettier": "^1.2.0",
"svgo": "^2.2.2",
"wait-on": "^5.2.1"
}
}