Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Package.json prettier Compatibility issue #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,23 @@

#### Backend for the Alcoding Web Portal


### Requirements

- [Node.js](https://nodejs.org/en/) 10+
- [MongoDB](https://docs.mongodb.com/manual/installation/)
- [Node.js](https://nodejs.org/en/) 10+
- [MongoDB](https://docs.mongodb.com/manual/installation/)

### Setup

- Install dependencies: ``` npm install ```


**Note:** Make sure to add a `config.js` file in the `src` folder. See the `config.example.js` under `src/` directory for more details.

- Install dependencies: `npm install`

**Note:** Make sure to add a `config.ts` file in the `src` folder. See the `config.example.ts` under `src/` directory for more details.

### Instructions:

Development mode:
```npm run start:dev```
`npm run start:dev`

Production mode:
```npm run start```

`npm run start`

Follow the guide [here](https://khalilstemmler.com/blogs/tooling/prettier/) to configure prettier for your IDE.
138 changes: 69 additions & 69 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
{
"name": "posterior",
"version": "1.0.0",
"description": "Backend for the Alcoding Web portal",
"main": "app.js",
"scripts": {
"start:dev": "nodemon",
"build": "rimraf ./build && tsc",
"start": "npm run build && node build/app.js",
"lint": "eslint . --ext .ts",
"lint-and-fix": "eslint . --ext .ts --fix",
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",
"prettier-watch": "onchange 'src/**/*.ts' -- prettier --write {{changed}}"
},
"husky": {
"hooks": {
"pre-commit": "npm run prettier-format && npm run lint"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/pes-alcoding-club/posterior.git"
},
"keywords": [
"alcoding",
"backend"
],
"author": "pes-alcoding-club",
"license": "ISC",
"bugs": {
"url": "https://github.com/pes-alcoding-club/posterior/issues"
},
"homepage": "https://github.com/pes-alcoding-club/posterior#readme",
"dependencies": {
"errorhandler": "^1.5.1",
"express": "^4.17.1",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.9.22",
"nodemailer": "^6.4.10",
"nodemailer-express-handlebars": "^4.0.0",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",
"passport-local": "^1.0.0",
"passport-local-mongoose": "^6.0.1"
},
"devDependencies": {
"@types/errorhandler": "^1.5.0",
"@types/express": "^4.17.7",
"@types/mongoose": "^5.7.31",
"@types/node": "^14.0.22",
"@types/passport": "^1.0.4",
"@types/passport-jwt": "^3.0.3",
"@types/passport-local": "^1.0.33",
"@types/passport-local-mongoose": "^4.0.13",
"@types/shelljs": "^0.8.8",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"eslint": "^7.4.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-strongloop": "^2.1.0",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.2.5",
"nodemon": "^2.0.4",
"onchange": "^7.0.2",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"shelljs": "^0.8.4",
"ts-node": "^8.10.2",
"typescript": "^3.9.6"
}
"name": "posterior",
"version": "1.0.0",
"description": "Backend for the Alcoding Web portal",
"main": "app.js",
"scripts": {
"start:dev": "nodemon",
"build": "rimraf ./build && tsc",
"start": "npm run build && node build/app.js",
"lint": "eslint . --ext .ts",
"lint-and-fix": "eslint . --ext .ts --fix",
"prettier-format": "prettier --config .prettierrc src/**/*.ts --write",
"prettier-watch": "onchange src/**/*.ts -- prettier --write {{changed}}"
},
"husky": {
"hooks": {
"pre-commit": "npm run prettier-format && npm run lint"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/pes-alcoding-club/posterior.git"
},
"keywords": [
"alcoding",
"backend"
],
"author": "pes-alcoding-club",
"license": "ISC",
"bugs": {
"url": "https://github.com/pes-alcoding-club/posterior/issues"
},
"homepage": "https://github.com/pes-alcoding-club/posterior#readme",
"dependencies": {
"errorhandler": "^1.5.1",
"express": "^4.17.1",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.9.22",
"nodemailer": "^6.4.10",
"nodemailer-express-handlebars": "^4.0.0",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",
"passport-local": "^1.0.0",
"passport-local-mongoose": "^6.0.1"
},
"devDependencies": {
"@types/errorhandler": "^1.5.0",
"@types/express": "^4.17.7",
"@types/mongoose": "^5.7.31",
"@types/node": "^14.0.22",
"@types/passport": "^1.0.4",
"@types/passport-jwt": "^3.0.3",
"@types/passport-local": "^1.0.33",
"@types/passport-local-mongoose": "^4.0.13",
"@types/shelljs": "^0.8.8",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"eslint": "^7.4.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-strongloop": "^2.1.0",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.2.5",
"nodemon": "^2.0.4",
"onchange": "^7.0.2",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"shelljs": "^0.8.4",
"ts-node": "^8.10.2",
"typescript": "^3.9.6"
}
}