prometheus-es6 v1.0.0

Prometheus
A starter boilerplate for creating NPM modules. Includes a few goodies to get you going like ES6 ready, ES5 compatibility and compilation, NPM Commands, and more!
Want to create your own NPM module but have no idea where to start? Hate how tedious it is recreating common project files? Would you rather watch paint dry than setting up yet ANOTHER ES6 compatible development environment? My friend, you've come to the right place. This repo takes care of all the initial fluff with none of the initial fuss.
Requirements
IMPORTANT: READ FIRST!
This project runs using the latest stable version of NodeJS. To see what version of NodeJS is currently running on your system, run
node -vin your terminal application.Current Stable Version of NodeJS:
Update your systems version of NodeJS to match the version listed above before continuing.
Features
Check out the Feature Details section of this README for additional information regarding individual feature default configurations and, if needed, how to go about reconfiguring individual features for your project needs. To see a complete list of the available NPM commands provided by default in this project and what they do, check out the NPM Commands section of this README.
- ES6
- Backwards compatibility for older versions of NodeJS
- ES6 => ES5 production build ready
- Testing
- Linting
- All the basic, but necessary, NPM commands for writing code from development to production ready! Plus, hooks for publishing to NPM!
- A folder for working examples of your module other Devs can use as reference.
- Tutorials for configuring/reconfiguring everything here along the way included inside! Plus, nice NPM commands for removing all excess tutorial code when you're ready to get rollin' like a pro.
- Code Coverage
- Continuos Integration
Installation
To get started with your new project, run the following commands:
git clone https://github.com/DaneTheory/Prometheus.git <YOUR_PROJECT_NAME>
cd <path/to/YOUR_PROJECT_NAME>
rm -rf .git
npm iAnd that's it! Edit the package.json file with your own project information.
Feature Details
ES6
ES6 support provided via Babel using
babel-preset-env. To edit or add to preset configurations, edit the.babelrcfile found in the root folder of this project.
TESTING
Mocha is included by default for writing and running tests. However, this repo is compatible with any testing framework you prefer! Just swap out Mocha as a project dependency with your favorite testing framework. Then, make any pre-configuration edits your testing framework may need. As a bonus, all tests can be written in ES6!
LINTING
ESLint is included by default for code linting. To edit or add to preset configurations, edit the
.eslintrcfile. The.eslintignorefile can be used to define files/folders where you wish linting rules to be ignores. Both the.eslintrcand.eslintignorefiles can be found in the root folder of this project. Preconfiguration for linting provided via AirBnB.
CODE COVERAGE
Code Coverage provided via Istanbul. As a plus, ES6 code support is included in coverage!
CONTINUOS INTEGRATION
Continuos Integration, a.k.a CI, provided via TravisCI.
NPM Commands
npm run cleanRemoves the
./lib/directory.
npm run testRuns tests.
npm run test:watchRuns your tests, and then has them re-run on any file changes.
npm run lintRuns linting against codebase.
npm run buildCompiles all development code in
./srcto ES5. Then, the compiled code is output to the newly createdlibdirectory found at the root of this project.
npm run coverageRuns code coverage.
npm run coverage:openOpens code coverage report in browser as a human readable report.
npm run prepareHooks for module publication to NPM. Runs all checks (tests/linting) first and then, if successful, publishes to NPM.
npm run test:examplesRuns tests against examples provided in
./examples/directory.
Developing
To start development on your project, run the following command:
npm run devYour project is now running in development mode! Get to makin' some sexy code.
Testing
To run tests, run the following command:
npm run testYour project tests status will output to the console. Pro-Tip: Run the following command to run tests that re-run on each file change!
npm run test:watchProduction Build
To create a production ready version of your project, run the following command:
npm run buildA production ready version of your project is now ready! You can find it in the lib folder located at the root of your project directory.
Deployment / Publication
To publish your project to NPM, run the following command:
npm run prepare
That's it! Your beautiful new project is now available as a brand new sweet NPM module! Grab a beer, you deserve it!
TODO
- Change logo to something better
- Fix Travis CI to connect to repo and reflect status in README correctly
- Add other status descriptors like Travis CI to README
- Update docs with better info and tutorials
- Swap out
npmin favor ofyarn - Add
envvariable configuration for each build mode - Add NPM commands to run development version of project
- Add NPM commands to strip out demo code/comments
- Better folder hierarchy
- Better way to consolidate NPM commands?
- NPM command to start new project that includes console prompts to handle manual file edits for project info automatically.
- Add better markdown for README. (i.e. checkboxes for README)
- Add better README boilerplate. Best practices and such.
- Add better
package.jsonboilerplate. Best practices and such. - Add better
.babelrc,.editorconfig,.eslintignore,.eslintrc,.gitignore,.travis.yml,CONTRIBUTING.md, etc. following best practices and such. - Add NPM command
publishordeployto hook into NPM - Add git hook for Github integration
- Update Istanbul to newer NYC. Then, include lcov reporter. Then, create NPM command to open coverage test output HTML. Then, include Coveralls support with status descriptor in README.
Contributing
I created this project to end the constant boilerplate syndrome that comes with starting new projects and plan on keeping it constantly active.
This project is completely open to new contributers. Got a way to improve this project? Check out CONTRIBUTING.md for details to add your own idea!
Issues / Bugs
To report any issues or bugs, please visit: Issue tracker: https://github.com/DaneTheory/Prometheus/issues
Licensing
The code in this project is licensed under MIT license.
8 years ago