Skip to content
Snippets Groups Projects
Commit 1c81e34c authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

feat: align dev envs

parent 053a28e7
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ cd backend
npm install
npm exec knex migrate:latest
npm exec knex seed:run
PORT=8080 npm run watch
PORT=8080 npm run serve
```
The webserver will be abailable at `http://localhost:8080`.
......
......@@ -4,8 +4,7 @@
"description": "Ötzi game backend.",
"main": "src/index.js",
"scripts": {
"start": "ts-node src/index.ts",
"watch": "nodemon src/index.ts",
"serve": "nodemon src/index.ts",
"build": "tsc",
"lint:check": "eslint .",
"lint:fix": "eslint . --fix",
......
# editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.{js,ts,json}]
indent_size = 2
indent_style = space
coverage
dist
node_modules
.cache
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier", "jest"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": 1,
"prettier/prettier": 2
},
"env": {
"browser": true,
"node": true,
"jest/globals": true
}
}
coverage
dist
node_modules
.cache
{
"trailingComma": "all",
"printWidth": 80
}
{
"transform": {
"^.+\\.ts$": "ts-jest"
},
"collectCoverage": false,
"collectCoverageFrom": ["src/**/*.ts", "!src/**/*.spec.ts"],
"notify": true,
"testEnvironment": "node",
"testRegex": "/src/.+\\.spec\\.ts$",
"roots": ["<rootDir>/src"]
}
This diff is collapsed.
......@@ -4,9 +4,17 @@
"description": "Ötzi game frontend.",
"license": "MIT",
"scripts": {
"serve": "parcel serve src/index.html --open",
"serve": "parcel serve src/index.html",
"build": "parcel build src/index.html --public-url ./",
"test": "echo \"Error: no test specified\" && exit 1"
"lint:check": "eslint .",
"lint:fix": "eslint . --fix",
"format:check": "prettier . --check",
"format:fix": "prettier . --write",
"style:check": "npm-run-all --serial format:check lint:check",
"style:fix": "npm-run-all --serial format:fix lint:fix",
"test": "jest",
"coverage": "jest --coverage",
"watch:test": "jest --watch"
},
"dependencies": {
"axios": "^0.26.0",
......@@ -19,7 +27,20 @@
},
"devDependencies": {
"parcel-bundler": "^1.12.4",
"parcel-plugin-static-files-copy": "^2.6.0"
"parcel-plugin-static-files-copy": "^2.6.0",
"@types/jest": "^27.0.3",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
"eslint": "^8.3.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^25.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.4.2",
"node-notifier": "^10.0.1",
"prettier": "^2.5.1",
"ts-jest": "^27.0.7",
"ts-node": "^10.5.0",
"typescript": "^4.5.2"
},
"engines": {
"node": "16.x"
......
describe("test", () => {
test("true is true", async () => {
expect(true).toEqual(true);
});
});
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"declaration": true,
"lib": ["ES6", "DOM"],
"outDir": "dist",
"rootDir": "src",
"strict": true,
"typeRoots": ["./node_modules/@types"]
},
"include": ["src/**/*"],
"exclude": ["src/**/*.spec.ts"]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment