Skip to content
Tamás Mágedli edited this page Jul 30, 2016 · 5 revisions

Command line interface

Prerequisite

You need to install urbanjs-tools globally:

npm install -g urbanjs-tools
urbanjs --help

Project template generation

It can be useful to generate a project template by urbanjs when you are at to start a new project. You can use the generate command for this purpose :

urbanjs generate -n project-name

Use -f flag to force to overwrite the existing folder.

This command creates the project template under the project-name folder.

Generated files & folders

  • .editorconfig sets default editor settings with regard to code style checkers (eslint & jscs)
  • .gitattributes handles line endings based on github recommendations
  • .gitignore sets paths to ignore from the repository based on the defaults settings of the gulp tasks
  • .npmignore sets paths to ignore from published package based on the defaults settings of the gulp tasks
  • gulpfile.json enables the gulp tasks
  • package.json defines scripts for development phases (pre-commit, pre-release, start, test), registers necessary production & development dependencies
  • README.md placeholder for documentation
  • /src folder for source code
  • /docs folder for jsdoc documentation files (You can overwrite the style & template of the generated documentation in the __fixtures__)

Runtime files & folders

  • /coverage Used by jest to store code coverage data, excluded from the repository & from the published package by default
  • /help Used by jsdoc to store the generated documentation, excluded from the repository by defaults

Dependency preinstallation

See this section for further information.