Skip to content

Commit

Permalink
Pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
goblindegook committed Feb 16, 2019
1 parent 25fefcb commit 38a959f
Show file tree
Hide file tree
Showing 2 changed files with 524 additions and 1,006 deletions.
38 changes: 29 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
"description": "Footnotes without the footprint.",
"repository": "goblindegook/littlefoot",
"scripts": {
"clean": "rm -rf coverage dist",
"prebuild": "yarn clean",
"build:scripts": "browserify --extension=ts -p tinyify -s littlefoot -o dist/littlefoot.js src/index.ts",
"build:styles": "node-sass --output-style compressed --include-path styles -o dist/ styles/",
"build:types": "tsc --emitDeclarationOnly",
"build": "mkdir -p dist && concurrently 'yarn build:types' 'yarn build:scripts' 'yarn build:styles' && yarn optimize",
"clean": "rm -rf coverage dist",
"lint": "tslint --project . '{src,test}/**/*.ts'",
"optimize": "uglifyjs dist/littlefoot.js --compress unused=false --mangle > dist/littlefoot.min.js",
"prepublish": "yarn rebuild",
"pretest": "concurrently 'yarn lint' 'yarn build:styles'",
"rebuild": "yarn clean && yarn build",
"test": "jest",
"format": "prettier --write '{src,test}/**/*.{js,jsx,ts,tsx,json,css,md}'",
"build": "mkdir -p dist && concurrently 'yarn build:types' 'yarn build:scripts' 'yarn build:styles' && yarn optimize",
"watch": "watchify --extension=ts -s littlefoot -o dist/littlefoot.js src/index.ts",
"typecheck": "tsc --noEmit",
"typecheck:watch": "yarn typecheck --watch",
"watch": "watchify --extension=ts -s littlefoot -o dist/littlefoot.js src/index.ts"
"lint": "tslint --project tsconfig.json '{src,test}/**/*.ts'",
"format": "prettier --write '{cypress,src,test}/**/*.{js,jsx,ts,tsx,json,css,md}'",
"pretest": "yarn lint",
"test": "jest",
"prepublish": "yarn build"
},
"browserify": {
"transform": [
Expand All @@ -33,6 +33,24 @@
]
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"linters": {
"{src,test}/**/*.ts": [
"prettier --write",
"tslint --project tsconfig.json",
"git add"
],
"{src,test/**/*.{js,json,css,md}": [
"prettier --write",
"git add"
]
}
},
"jest": {
"testEnvironment": "jsdom",
"transform": {
Expand Down Expand Up @@ -78,9 +96,11 @@
"browserify": "^16.2.2",
"concurrently": "^4.0.1",
"dom-testing-library": "^3.16.8",
"husky": "^1.3.1",
"istanbul": "^0.4.3",
"jest": "^24.1.0",
"jest-dom": "^3.1.2",
"lint-staged": "^8.1.4",
"node-sass": "^4.9.3",
"prettier": "^1.16.4",
"tinyify": "^2.5.0",
Expand Down
Loading

0 comments on commit 38a959f

Please sign in to comment.