Skip to content

Commit

Permalink
Merge pull request #5 from NikolasMelui/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
NikolasMelui authored Jun 22, 2019
2 parents 1d3480d + 2024290 commit 5681e3f
Show file tree
Hide file tree
Showing 15 changed files with 10,278 additions and 5,204 deletions.
12 changes: 10 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"presets": ["env"],
"plugins": []
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SERVER_PORT=3000
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
25 changes: 25 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"node": true,
"jest": true
},
"plugins": ["babel", "jest"],
"extends": ["prettier", "plugin:jest/recommended"],
"parser": "babel-eslint",
"rules": {
"no-console": 0,
"semi": ["error", "always"],
"linebreak-style": ["error", "unix"],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline"
}
],
"quotes": ["error", "single", { "allowTemplateLiterals": true }]
}
}
18 changes: 0 additions & 18 deletions .eslintrc.js

This file was deleted.

83 changes: 82 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,94 @@
# Dists
dist

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
build/
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# MacOS files
.DS_Store
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 80,
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
install:
npm install
start:
npx babel-node src/index.js
build:
rm -rf dist
npm run build
publish:
npm publish
lint:
npx eslint .
test:
npm test
test-coverage:
npm test -- --coverage
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Multikey Node.js Boilerplate
# Node.js Boilerplate

Multikey Node.js Boilerplate, powered by [NikolasMelui][nikolasmelui] for [Multikey Studio][multikey-studio], is a lightweight nodejs boilerplate with babel, eslint, prettier, jest and nodemon onboard. Just clone it, install deps, yarn start and have fun!
Node.js Boilerplate, powered by [NikolasMelui][nikolasmelui] is a lightweight nodejs boilerplate with babel, eslint, prettier, jest and nodemon onboard. Just clone it, install deps, npm start and have fun!

## Installation

```bash
$ yarn
$ npm i
___
```

Expand All @@ -14,21 +14,28 @@ ___
Once everything is installed just run the project:

```bash
$ yarn start
$ npm start
___
```

If u want 2 use this code in production - transpile it to the native es5:
To run the development mode type (npm start is the same thing):

```bash
$ yarn build
$ npm run dev
___
```

and run:
If u want production version - transpile it to the native es5:

```bash
$ yarn serve
$ npm run build
___
```

To run the production version type:

```bash
$ npm run prod
___
```

Expand Down
Loading

0 comments on commit 5681e3f

Please sign in to comment.