Skip to content
This repository has been archived by the owner on Jul 12, 2018. It is now read-only.

A blue print for node web projects publishable via npm and packaged for the browser via browserify

License

Notifications You must be signed in to change notification settings

bpmn-io/boilerplate-node-web-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bpmn-io npm browserify project boilerplate

This is a blueprint you can use to create your own web compatible browserifiable projects.

Placeholders

After copying the template replace the following placeholders in the package.json file:

  • <%= AUTHOR_NAME %>: your name
  • <%= AUTHOR_GITHUB_NAME %>: your name on GitHub
  • <%= PACKAGE_NAME %>: the name of the project (for npm package and repository)
  • <%= PACKAGE_DESCRIPTION %>: a short description of the package

Project structure

The following shows the general project structure

├─dist
├─docs
│ └─api
├─lib
│ └─foo.js
├─resources
├─test
│ ├─config
│ ├─fixtures
│ └─spec
│   └─fooSpec.js
├─tmp
│ └─reports
├─Gruntfile.js
├─index.js
└─package.json

A note on the structure:

  • dist location of the distribution ready (web packed) files

  • docs contains documentation relevant for developers or users

    • docs/api gets generated from the project sources
  • lib contains the project sources

  • resources can contain non-js sources such as JSON config files or images

  • test contains all test related data

    • test/config holds Karma config files
    • test/spec and sub folders hold test cases; test case naming convention: <name>Spec.js
    • test/integration and sub folders hold integration (post bundle) tests; test case naming convention: <name>Spec.js
    • test/fixtures hold test data
  • index.js is the main entry point for the module

What is inside

The boilerplate uses the following components:

Build tasks

The contained Gruntfile.js configures the following build tasks:

default (test, lint, build, generate docs)

Performs all neccessary tasks in the correct order.

grunt

auto-build

Watches for library changes and re-builds the library.

grunt auto-build

auto-test

Watches for library or test changes and re-runs the test suite automatically.

grunt auto-test

release

Releases a new version of the library (on npm and GitHub).

grunt release:minor
grunt release:patch
grunt release:major

License

MIT

About

A blue print for node web projects publishable via npm and packaged for the browser via browserify

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published