diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ec12df..7de3ebb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # slush changelog -## 0.1 (2013-03-08) +## 1.0 (2014-03-31) + +- Changing how to call a generator task, it's now: `slush :` +- Adding support for arguments, which is accessed via `gulp.args` (see README) +- Showing installed generator's version numbers when listing generators +- Showing version numbers for slush, gulp and generator when running slush with generator name and version flag +- Some other minor fixes.. + +## 0.1 (2014-03-08) - Initial Release diff --git a/README.md b/README.md index 3ce541f..3ab8a6d 100644 --- a/README.md +++ b/README.md @@ -21,23 +21,52 @@ npm install -g slush ## Usage ```bash -slush [ ] +slush [:] [] ``` -**Note** if `` is not provided it will default to the `default` task in the generator's slushfile. +* ``: a colon (":") separated list of a task or tasks to run. If not provided the `default` task in the slushfile is run +* ``: any other given arguments (not prefixed with "--" or "-") can be accessed via the `gulp.args` property from within a slushfile + +**Example:** + +```bash +slush angular:component myNewComponent +``` + +Which will run task `component` in generator `slush-angular` and `gulp.args` will be set to `["myNewComponent"]`. ### List available generators +If run without any arguments, slush will list all installed generators. + ```bash slush ``` ### List available tasks in generator +To list available tasks within a generator, use the generator name in conjunction with the `--tasks` parameter. + ```bash slush --tasks ``` +### Print version(s) + +As usual you can use `-v` or `--version` to get current slush version: + +```bash +slush -v +``` + +It can also be used together with a generator name: + +```bash +slush -v +``` + +You'll then get the version for slush, the gulp version installed in the generator and the version number of the given generator. + ## Creating a generator A Slush generator is an npm package following the naming convention `slush-*` and containing a `slushfile.js`. @@ -90,11 +119,11 @@ var gulp = require('gulp'), gulp.task('default', function (done) { inquirer.prompt([ - {type: 'confirm', name: 'app', message: 'Create a new app?'}, - {type: 'confirm', name: 'another', message: 'Something else?'} + {type: 'input', name: 'name', message: 'Give your app a name', default: gulp.args.join(' ')}, // Get app name from arguments by default + {type: 'confirm', name: 'moveon', message: 'Continue?'} ], function (answers) { - if (!answers.app) { + if (!answers.moveon) { return done(); } gulp.src(__dirname + '/templates/app/**') // Note use of __dirname to be relative to generator diff --git a/package.json b/package.json index 9094f1c..9988205 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "slush", "description": "The streaming scaffolding system - Gulp as a replacement for Yeoman", - "version": "0.1.0", - "homepage": "http://github.com/klei/slush", + "version": "1.0.0", + "homepage": "http://klei.github.io/slush", "repository": "klei/slush", "author": "Joakim Bengtson ", "preferGlobal": true,