0.5.3 • Published 3 years ago

a-dope-boilerplate v0.5.3

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

Express-Webpack-Prettier-Boilerplate

Known Vulnerabilities dependencies Status FOSSA Status

A very opinionated boilerplate to help you get started with Express, Webpack, ESLint, ES6 and Prettier using Airbnb's Javascript Guidelines.

Why?

I got tired of having to take half a day to set up my development environment.

Installation

$ npm install a-dope-boilerplate

Get Started

Create your project in the current working directory:

$ adp ./directory-to-install

or

$ adp ./

To create your project in a directory that isn't in your current working directory:

$ adp /Absolute/Path/To/Directory

Navigate to the directory where you created the project and run:

$ npm install

Files and Project Structure

  • The files and project structure from Express Generator with EJS as the templating language and CSS for stylesheets

In addition to the above mentioned files:

  • webpack.prod.config.js
  • webpack.dev.config.js
  • README.md
  • package.json
  • ecosystem.config.js (So you can use PM2 with Heroku)
  • .prettierrc
  • .prettierignore
  • .gitignore
  • .eslintrc.json
  • .eslintignore
  • .env
  • .editorconfig

NPM Scripts in package.json

 "scripts": {
   "clean": "rimraf DIRECTORY TO CLEAN OUT",
   "start": "pm2-runtime start ecosystem.config.js --env production",
   "start:prettier:dev": "npm-run-all --parallel open:src:dev prettier-watch",
   "clean:build:dev": "run-s clean build open:src:dev",
   "open:src:dev": "nodemon bin/www",
   "prettier-watch": "onchange '**/*.js' -- prettier --write {{changed}}",
   "build:dev": "webpack --config webpack.dev.config.js",
   "build:prod": "webpack --config webpack.prod.config.js"
 }

To run any of these by themselves: $ npm run <Command>

For example, to start the express server with nodemon during development:

$ npm run open:src:dev

Resources

EditorConfig, ESLint, and Prettier IDE Plugins

  • Most modern IDEs have plugins for ESLint, Prettier, and EditorConfig. If you install them you can configure your IDE to use the files from this boilerplate.

Issues and Requests

If you find any bugs, have a question about usage, or would like to request a feature submit an issue HERE

License

FOSSA Status

0.5.3

3 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.1.21

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.0

5 years ago