Create a WireCloud widget with grunt-init, including Jasmine unit tests.
If you haven't already done so, install grunt-init.
Once grunt-init is installed, place this template in your ~/.grunt-init/ directory. It's recommended that you use git to clone this template into that directory, as follows:
git clone https://github.com/Wirecloud/grunt-init-wirecloud-widget.git ~/.grunt-init/wirecloud-widget
(Windows users, see the documentation for the correct destination directory path)
At the command-line, cd into an empty directory, run this command and follow the prompts.
grunt-init wirecloud-widget
Note that this template will generate files in the current directory, so be sure to change to a new directory first if you don't want to overwrite existing files.
This template creates an widget project with a structure similar to the following one:
.
βββ bower.json
βββ Gruntfile.js
βββ LICENSE-MIT
βββ package.json
βββ README.md
βββ src
βββ config.xml
βββ css
βΒ Β βββ styles.css
βββ DESCRIPTION.md
βββ doc
βΒ Β βββ changelog.md
βΒ Β βββ index.md
βββ index.html
βββ js
βΒ Β βββ main.js
βΒ Β βββ MyAwesomeWidget.js
βββ test
βββ fixtures
βΒ Β βββ index.html
βββ helpers
βΒ Β βββ empty.js
βββ js
βββ MyAwesomeWidgetSpec.js
8 directories, 16 files