diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..610c2a5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm test diff --git a/package.json b/package.json index f561c73..7aa9bd5 100644 --- a/package.json +++ b/package.json @@ -1,48 +1,49 @@ { - "name": "@danielv123/gridworld", - "version": "0.1.4", - "description": "Clusterio plugin for automatic creation of gridworlds connected using edge_transports", - "author": "Danielv ", - "homepage": "https://github.com/Danielv123/gridworld", - "license": "MIT", - "repository": "Danielv123/gridworld", - "scripts": { - "prepare": "webpack-cli --env production", - "lint": "eslint \"*.js\" src web --fix", - "luacheck": "luacheck module/", - "test": "npm run lint && npm run luacheck" - }, - "bugs": { - "url": "https://github.com/Danielv123/gridworld/issues" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@clusterio/lib": "^2.0.0-alpha.0", - "react-router-dom": "*" - }, - "dependencies": { - "@ant-design/icons": "^4.2.2", - "fs-extra": "^8.1.0", - "sharp": "^0.29.3" - }, - "devDependencies": { - "@clusterio/web_ui": "^2.0.0-alpha.0", - "antd": "^4.16.0", - "eslint": "^8.4.1", - "eslint-plugin-node": "^11.1.0", - "leaflet": "^1.7.1", - "leaflet-rastercoords": "^1.0.4", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "react-leaflet": "^2.8.0", - "react-leaflet-enhanced-marker": "^1.0.21", - "webpack": "^5.36.2", - "webpack-cli": "^4.7.0", - "webpack-merge": "^5.2.0" - }, - "publishConfig": { - "access": "public" - } + "name": "@danielv123/gridworld", + "version": "0.1.4", + "description": "Clusterio plugin for automatic creation of gridworlds connected using edge_transports", + "author": "Danielv ", + "homepage": "https://github.com/Danielv123/gridworld", + "license": "MIT", + "repository": "Danielv123/gridworld", + "scripts": { + "prepare": "webpack-cli --env production && husky install", + "lint": "eslint \"*.js\" src web --fix", + "luacheck": "luacheck module/", + "test": "npm run lint && npm run luacheck" + }, + "bugs": { + "url": "https://github.com/Danielv123/gridworld/issues" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@clusterio/lib": "^2.0.0-alpha.0", + "react-router-dom": "*" + }, + "dependencies": { + "@ant-design/icons": "^4.2.2", + "fs-extra": "^8.1.0", + "sharp": "^0.29.3" + }, + "devDependencies": { + "@clusterio/web_ui": "^2.0.0-alpha.0", + "antd": "^4.16.0", + "eslint": "^8.4.1", + "eslint-plugin-node": "^11.1.0", + "husky": "^8.0.1", + "leaflet": "^1.7.1", + "leaflet-rastercoords": "^1.0.4", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-leaflet": "^2.8.0", + "react-leaflet-enhanced-marker": "^1.0.21", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0", + "webpack-merge": "^5.2.0" + }, + "publishConfig": { + "access": "public" + } }