Skip to content

Commit

Permalink
Merge 4016324 into dcd7d63
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Apr 13, 2016
2 parents dcd7d63 + 4016324 commit 7133194
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/apis.md
Expand Up @@ -181,7 +181,7 @@ The `donejs` command makes running those commands easier by allowing you to run

`donejs add` lets you run the [Yeoman](http://yeoman.io/) generators provided by [generator-donejs](https://github.com/donejs/generator-donejs/). Currently the following generators are available:

- `donejs init` which will initialize a new application
- `donejs add app [folder]` which will initialize a new application (optionally within the given folder)
- `donejs add component <modulename> <tagname>` to create a new can.Component
- `donejs add supermodel <modulename>` to generate a new model

Expand Down
4 changes: 2 additions & 2 deletions docs/donejs.mustache
Expand Up @@ -28,15 +28,15 @@
</div>
<div class="col-xs-12 install-donejs">
<p class="caption">Ready to install DoneJS?</p>
<textarea>npm install -g donejs &#13;donejs init my-app</textarea>
<textarea>npm install -g donejs &#13;donejs add app my-app</textarea>
<p><a class="btn" href="Guide.html" role="button">Get Started</a></p>

</div>
</div>
<div class="install hidden-xs">
<div class="col-xs-12 col-sm-6 install-donejs">
<p class="caption">Ready to install DoneJS?</p>
<textarea>npm install -g donejs &#13;donejs init my-app</textarea>
<textarea>npm install -g donejs &#13;donejs add app my-app</textarea>
</div>
<div class="col-xs-12 col-sm-6 guide">
<p><a class="btn" href="Guide.html" role="button">Get Started</a></p>
Expand Down
10 changes: 5 additions & 5 deletions docs/features.md
Expand Up @@ -1035,7 +1035,7 @@ Testing JavaScript apps is complex unto itself. To do it right, you need many to

##### Generators

The DoneJS app generator command `donejs init` creates a working project-level test HTML and JS file. Component generators via `donejs generate component cart` create a test script and individual test page for each test.
The DoneJS app generator command `donejs add app` creates a working project-level test HTML and JS file. Component generators via `donejs add component cart` create a test script and individual test page for each test.

##### Unit tests

Expand Down Expand Up @@ -1803,7 +1803,7 @@ There are four generators by default (and you can easily create your own).
From the command line, run:
```
donejs init
donejs add app
```
You'll be prompted for a project name, source folder, and other setup information. DoneJS' project dependencies will be installed, like StealJS and CanJS. In the folder that was created, you'll see:
Expand Down Expand Up @@ -1838,7 +1838,7 @@ You're now a command away from running application wide tests, generating docume
To create a [component](http://canjs.com/docs/can.Component.html) organized with the [modlet](#section_Modlets) file organization pattern:
```
donejs generate component <folder-path> <component-name>
donejs add component <folder-path> <component-name>
```
It will create the following files:
Expand All @@ -1863,7 +1863,7 @@ This folder contains everything a properly maintained component needs: a working
For simple, standalone components:
```
donejs generate component <file-name>.component <component-name>
donejs add component <file-name>.component <component-name>
```
Which will generate a working component in a single file.
Expand All @@ -1873,7 +1873,7 @@ Which will generate a working component in a single file.
To create a new [model](http://connect.canjs.com/doc/can-connect%7Ccan%7Csuper-map.html):
```
donejs generate supermodel <model-name>
donejs add supermodel <model-name>
```
This will create:
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/guide.md
Expand Up @@ -31,14 +31,14 @@ npm install -g donejs
Then we'll create a new DoneJS application called `donejs-chat`:

```
donejs init donejs-chat
donejs add app donejs-chat
```

This will create a new folder called `donejs-chat` and in it generate our application.

The initialization process will ask questions like the name of your application, the source folder, etc. We'll answer these with the default settings by hitting enter.

<img src="static/img/donejs-init.png" alt="donejs init" style="box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); border-radius: 5px; border: 1px #E7E7E7 solid;" />
<img src="static/img/donejs-init.png" alt="donejs add app" style="box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); border-radius: 5px; border: 1px #E7E7E7 solid;" />

This will install all of DoneJS's dependencies, including the following:

Expand Down Expand Up @@ -98,7 +98,7 @@ Update `src/index.stache` to look like this:

If you kept your browser window open at [http://localhost:8080/](localhost:8080) you should see the updated styles and content as soon as you save the file.

<img src="static/img/donejs-bootstrap.png" alt="donejs init" style="box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); border-radius: 5px; border: 1px #E7E7E7 solid;" />
<img src="static/img/donejs-bootstrap.png" alt="donejs add app" style="box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); border-radius: 5px; border: 1px #E7E7E7 solid;" />

Feel free to edit the HTML or `src/styles.less` to see how hot module swapping updates the page automatically.

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/place-my-order.md
Expand Up @@ -33,7 +33,7 @@ npm install -g donejs
Then we can create a new DoneJS application:

```
donejs init place-my-order
donejs add app place-my-order
```

The initialization process will ask you questions like the name of your application (set to `place-my-order`) and the source folder (set to `src`). The other questions can be skipped by hitting enter. This will install all of DoneJS' dependencies. The main project dependencies include:
Expand Down Expand Up @@ -170,7 +170,7 @@ Every DoneJS application consists of at least two files:
1. **A main template** (in this case `src/index.stache`) which contains the main template and links to the development or production assets
1. **A main application view-model** (`src/app.js`) that initializes the application state and routes
`src/index.stache` was already created for us when we ran `donejs init`, so we can update it to reflect the below content:
`src/index.stache` was already created for us when we ran `donejs add app`, so we can update it to reflect the below content:
@sourceref guides/place-my-order/steps/loading-assets/index.stache
@highlight 4,7
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/plugin.md
Expand Up @@ -61,7 +61,7 @@ The plugin generator will ask several question that should be answered as follow

Once all done, the final prompt looks similar to this:

[<img src="http://blog.bitovi.com/wp-content/uploads/2016/02/Screen-Shot-2016-02-16-at-7.55.03-AM.png" alt="DoneJS init plugin" style="width: 100%;" class="alignnone size-full wp-image-2666" />][9]
[<img src="http://blog.bitovi.com/wp-content/uploads/2016/02/Screen-Shot-2016-02-16-at-7.55.03-AM.png" alt="DoneJS adding a new plugin" style="width: 100%;" class="alignnone size-full wp-image-2666" />][9]

Now the generator will initialize the default plugin layout and install all its dependencies.

Expand Down
4 changes: 2 additions & 2 deletions guides/guide/test.js
Expand Up @@ -36,8 +36,8 @@ guide.moveToTmp();
/**
* @Step 2
*/
guide.step("Run donejs init", function(){
var init = guide.answerPrompts("donejs", ["init", "donejs-chat", "--skip-install"]);
guide.step("Run donejs add app", function(){
var init = guide.answerPrompts("donejs", ["add", "app", "donejs-chat", "--skip-install"]);
var answer = init.answer;

answer(/Project name/, "\n");
Expand Down
4 changes: 2 additions & 2 deletions guides/place-my-order/test.js
Expand Up @@ -46,8 +46,8 @@ guide.step("Install donejs", function(){
// Move to a temp folder for the rest of the guide
guide.moveToTmp();

guide.step("Run donejs init", function(){
var init = guide.answerPrompts("donejs", ["init", "place-my-order",
guide.step("Run donejs add app", function(){
var init = guide.answerPrompts("donejs", ["add", "app", "place-my-order",
"--skip-install"]);
var answer = init.answer;

Expand Down

0 comments on commit 7133194

Please sign in to comment.