Skip to content

Commit

Permalink
Bumping version, changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
joakimbeng committed Mar 31, 2014
1 parent cfd1250 commit 7cd39bc
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 <generator>:<task>`
- 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
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,52 @@ npm install -g slush
## Usage

```bash
slush <generator>[ <tasks>]
slush <generator>[:<tasks>] [<args>]
```

**Note** if `<tasks>` is not provided it will default to the `default` task in the generator's slushfile.
* `<tasks>`: a colon (":") separated list of a task or tasks to run. If not provided the `default` task in the slushfile is run
* `<args>`: 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 <generator> --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 <generator> -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`.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"preferGlobal": true,
Expand Down

0 comments on commit 7cd39bc

Please sign in to comment.