Skip to content

Commit

Permalink
Merge pull request #2 from gunvantsr/ts-new
Browse files Browse the repository at this point in the history
Added typescript directories. improved README.md
  • Loading branch information
gunvantsr authored Jul 25, 2022
2 parents c261f36 + 01956ef commit 1f4a988
Show file tree
Hide file tree
Showing 22 changed files with 64 additions and 26 deletions.
6 changes: 2 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Hey! 👋

You are more than welcome to contribute to this project.
You are more than welcome to contribute to this project.

## Setting up on your machine.

Follow this steps to setup this project on your local dev machine

- star and fork this repo
- clone this repo on your machine and cd into it
- install all the dependancies with ```npm install```
- install all the dependancies with `npm install`
- now open this project directory in your favrioute code editor


## Creating a Pull request.

Once you commited the code, please open a pull request so that we can test and merge it into the codebase.

23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<h1 align=center> node-expressgen. 🚀 </h1>

# Node-Expressgen 🚀
## Boilerplate generator for your Node.js, Express, TypeScript/JavaScript projects!

![npm](https://img.shields.io/npm/dw/node-expressgen) ![npm](https://img.shields.io/npm/v/node-expressgen) ![GitHub package.json version](https://img.shields.io/github/package-json/v/gunvantsr/expressgen) ![GitHub last commit](https://img.shields.io/github/last-commit/gunvantsr/expressgen) ![GitHub contributors](https://img.shields.io/github/contributors/gunvantsr/expressgen) ![GitHub](https://img.shields.io/github/license/gunvantsr/expressgen)

Hello there!
At my job, whenever I was working on node express projects, I used to find myself copy-pasting the same directory and file structures over and over again. So, I created this simple node express boilerplate generator to ease the task. I acknowledge, there are so many better and adavanced tools for this task, but I wanted to build something custom while learning something new :)

PS: This project is still in beta, please feel free to open an issue or pull request for any kind of feature suggestion, feedback, improvement.
PS: Please feel free to open an issue or pull request for any kind of feature suggestion, feedback, improvement.

## Installation

Install node-expressgen with npm globally

```bash
npm install node-expressgen -g
```

## Usage/Examples

Once you installed it globally, just type this command where you want to generate the boilerplate.
Expand All @@ -20,15 +25,19 @@ Once you installed it globally, just type this command where you want to generat
expressgen

```

It will prompt a question, asking you for project name.

```bash
? Project name: <Enter your project name here>
```

And boom!! you have your node express boilerplate
## Authors
And boom!! you have your node express boilerplate

### Demo

- [@gunvantsr](https://www.github.com/gunvantsr)
![Alt Text](https://media.giphy.com/media/HA8Zr99sd8IXHYgGt1/giphy.gif)

## Authors

- [Gunvant Sarpate](https://www.twitter.com/gunvantsr)
24 changes: 17 additions & 7 deletions boilerplates/typescript/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"extends": [
"airbnb/base",
"airbnb/typescript/base"
],
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb-base",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json"
}
}
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "prettier"],
"rules": {}
}

8 changes: 8 additions & 0 deletions boilerplates/typescript/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"watch": [
"src"
],
"ext": ".ts",
"ignore": [],
"exec": "ts-node ./src/index.ts"
}
12 changes: 7 additions & 5 deletions boilerplates/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "hello-world",
"name": "hello-world-app-ts",
"version": "1.0.0",
"main": "src/index.ts",
"license": "MIT",
"devDependencies": {
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@types/node": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"eslint": "^7.32.0 || ^8.2.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.6.2",
"prettier": "^2.7.1",
"ts-node": "^10.8.1",
"typescript": "^4.7.3"
},
Expand Down
Empty file.
1 change: 1 addition & 0 deletions boilerplates/typescript/src/api/v1/controllers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './custom.controller';
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions boilerplates/typescript/src/api/v1/models/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './custom.model';
Empty file.
7 changes: 7 additions & 0 deletions boilerplates/typescript/src/api/v1/services/custom.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const userService = ()=> {
try {

} catch (error: any) {

}
}
1 change: 1 addition & 0 deletions boilerplates/typescript/src/api/v1/services/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './custom.service'
Empty file.
Empty file.
3 changes: 2 additions & 1 deletion boilerplates/typescript/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["./**/*.ts", "./**/*.js", "./.*.js"]
}
}

2 changes: 1 addition & 1 deletion boilerplates/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-expressgen",
"version": "1.0.6",
"version": "1.0.7",
"main": "index.js",
"license": "MIT",
"author": "Gunvant Sarpate",
Expand Down

0 comments on commit 1f4a988

Please sign in to comment.