Rumperuu
6a1117be15
* ci: update scripts * release 2.7.1 * remove tracked stylesheets * docs: revert stable tag to 2.7.0 * chore: move Plugin source into own dir * docs: delete info texts These can now be found in the [project wiki][wiki]. [wiki]: https://github.com/markcheret/footnotes/wiki * docs: tweak contributing guide * ci: reflect new directory structure * chore: update gitignore * chore: reflect new dir structure * docs: update documentation * build(linting): add Husky hooks, Markdown linting, lint all MD files * fix pre-push command * fix pre-push command * build: add stylesheet, JS minification * ci: add linting steps * ci: comment out CSS linting step (that's going to be a whole *thing*) * ci: minify all JS files * ci: call correct JS file * chore: lint * ci: fix PHP linting commands * chore: increment version constant string * ci: concat AMP stylesheets * ci: improve build scripts * chore: add assets dir
63 lines
2 KiB
JSON
63 lines
2 KiB
JSON
{
|
|
"scripts": {
|
|
"cm": "cz",
|
|
"format": "npm run format:js",
|
|
"format:fix": "npm run format:js:fix",
|
|
"format:js": "prettier --config .prettierrc './src/**/*.js'",
|
|
"format:js:fix": "npm run format:js -- --write",
|
|
"lint": "npm run lint:js && npm run lint:css && npm run lint:md",
|
|
"lint:fix": "npm run lint:js:fix && npm run lint:css:fix && npm run lint:md:fix",
|
|
"lint:php": "composer run lint:php",
|
|
"lint:php:fix": "composer run lint:php:fix",
|
|
"lint:js": "eslint \"./src/**/*.js\"",
|
|
"lint:js:fix": "npm run lint:js -- --fix",
|
|
"lint:css": "stylelint \"./src/**/*.css\"",
|
|
"lint:css:fix": "npm run lint:css -- --fix",
|
|
"lint:md": "markdownlint '*.md'",
|
|
"lint:md:fix": "npm run lint:md -- --fix",
|
|
"minify": "npm run minify:css && npm run minify:js",
|
|
"minify:css": "for f in ./tmp/css/*.css; do npx minify $f > ./dist/css/$(basename $f .css).min.css; done",
|
|
"minify:js": "for f in ./src/js/*.js; do npx minify $f > ./dist/js/$(basename $f .js).min.js; done"
|
|
},
|
|
"husky": {
|
|
"hooks": {
|
|
"pre-commit": "lint-staged",
|
|
"pre-push": "composer run docs && git add docs && git commit -m \"docs: update documentation\" --no-verify"
|
|
}
|
|
},
|
|
"lint-staged": {
|
|
"*.php": [
|
|
"composer run lint:php"
|
|
],
|
|
"*.js": [
|
|
"npm run format:js:fix",
|
|
"npm run lint:js"
|
|
],
|
|
"*.(sa|sc|c)ss": [
|
|
"npm run lint:css"
|
|
],
|
|
"*.md": [
|
|
"npm run lint:md"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"cz-conventional-changelog": "^3.3.0",
|
|
"eslint": "^7.24.0",
|
|
"eslint-config-prettier": "^8.2.0",
|
|
"eslint-config-wordpress": "^2.0.0",
|
|
"eslint-plugin-prettier": "^3.4.0",
|
|
"husky": "^4.3.8",
|
|
"lint-staged": "^10.5.4",
|
|
"markdownlint-cli": "^0.27.1",
|
|
"minify": "^7.0.1",
|
|
"prettier": "^2.2.1",
|
|
"stylelint": "^13.12.0",
|
|
"stylelint-config-wordpress": "^17.0.0"
|
|
},
|
|
"license": "GPL-3.0",
|
|
"config": {
|
|
"commitizen": {
|
|
"path": "./node_modules/cz-conventional-changelog"
|
|
}
|
|
}
|
|
}
|