Updated README

The readme had bitrotted a bit, referring to commands like jshint
that we no longer use. This updates the README, preferring `npm run`
over `grunt` based task execution.

Change-Id: I4e9bc49373b31542273966eb741f2cb40854f404
This commit is contained in:
Michael Krotscheck 2016-04-12 05:13:31 -07:00
parent ff2736945f
commit 33f755ed2c
No known key found for this signature in database
GPG Key ID: 20E618D878DE38AB

View File

@ -25,41 +25,40 @@ First of all be sure to have tox installed on your machine then:
- Now you can launch the grunt tasks of storyboard-webclient, by default run - Now you can launch the grunt tasks of storyboard-webclient, by default run
the development server with the following command: `grunt serve` the development server with the following command: `grunt serve`
NPM Commands
-----------
The following are commands that may be used during project development.
- `npm run lint`: Runs a linter on the javascript sources files of the
project, this will help us keeping style consistency across our files and
can reduce the risk of bugs.
- `npm run clean`: Erases the temporary folders created by various grunt
tasks, such as reports, cover and dist.
- `npm run build`: Compile and packages our code.
- `npm run serve`: Development server - runs a build and sets up concurrent
watchers that will automatically lint, test, and refresh the code when a
change is detected.
- `npm run test-unit`: This command will create a clean build against which
our unit tests will be run. For more information, please see
karma-unit.conf.js
- `npm run test-integration`: This command will create a clean build against
which our functional tests will be run. For more information, please see
protractor-integration.conf.js
- `npm run test-functional`: This command will create a clean build against
which our functional tests will be run. For more information, please see
protractor.conf.js
Grunt tasks Grunt tasks
----------- -----------
Here are the grunt tasks available with the storyboard-webclient project, the For more detailed development, the following commands are available via grunt.
following commands must be prefixed by grunt, example for the first one, the To run them, you will need to install grunt globally: `npm install -g grunt`.
command to run will be `grunt jshint`, the virtualenv must have been
activated see previous section:
- `jshint`: Runs a linter on the javascript sources files of the project,
this will help us keeping style consistency across our files and can reduce the
risk of bugs.
- `clean`: Erases the temporary folders created by various grunt tasks, such
as reports, cover and dist.
- `less`: Compiles the themes files present in `/src/theme/custom` and
`/src/theme/custom` using [less compiler](http://lesscss.org/), the result
which is a plain css file is stored into `dist/styles/main.css`
- `compile`: Compiles all of our sources in the dist directory. - `compile`: Compiles all of our sources in the dist directory.
- `package`: Built code into a release package. - `package`: Built code into a release package.
- `build`: Compile and packages our code.
- `serve:dist`: This task performs a full build of our application, - `serve:dist`: This task performs a full build of our application,
and then runs that source in a local web server. It does no watching, and then runs that source in a local web server. It does no watching,
it simply hosts the files. it simply hosts the files.
- `serve:prod`: This task is identical to 'server:dist', - `serve:prod`: This task is identical to 'server:dist',
with the exception that it will proxy the API requests against the production with the exception that it will proxy the API requests against the production
API. *USE WITH CAUTION* API. *USE WITH CAUTION*
- `serve`: Development server - runs a build and sets up concurrent watchers
that will automatically lint, test, and refresh the code when a change is
detected.
- `test`: Run all the tests.
- `test:unit`: This command will create a clean build against which
our unit tests will be run. For more information, please see karma-unit.conf.js
- `test:integration`: This command will create a clean build against which
our integration tests will be run. For more information, please see
karma-integration.conf.js
- `test:functional`: This command will create a clean build against which our
functional tests will be run. For more information, please see
karma-functional.conf.js