Skip to content
This repository was archived by the owner on Mar 20, 2021. It is now read-only.

Commit e7515ce

Browse files
committed
Merge pull request #380 from walmartlabs/chore-update-docs-point-to-generator
update docs to point at walmartlabs/generator-thorax
2 parents 7d5da66 + 9dd95f8 commit e7515ce

File tree

1 file changed

+26
-36
lines changed

1 file changed

+26
-36
lines changed

README.md

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
**The [Thorax Yeoman generator](https://github.com/walmartlabs/generator-thorax) is presently under active development and is the best way to get started with Thorax. The docs here will be updated shortly to reflect this.**
2-
31
# Thorax
42

53
[![Selenium Test Status](https://saucelabs.com/buildstatus/thorax)](https://saucelabs.com/u/thorax)
@@ -8,7 +6,7 @@ An opinionated, battle tested [Backbone](http://backbonejs.org/) + [Handlebars](
86

97
# Quick Start
108

11-
- Clone the [Seed Project](http://github.com/walmartlabs/thorax-seed) and start building your own application.
9+
- Generate your application using the [Thorax Yeoman Generator](https://github.com/walmartlabs/generator-thorax)
1210
- Read about how Thorax works in the new [Backbone Fundamentals Book](http://addyosmani.github.com/backbone-fundamentals/#thorax).
1311
- Install the [Thorax Inspector](https://chrome.google.com/webstore/detail/thorax-inspector/poioalbefcopgeaeaadelomciijaondk) Chrome extension.
1412
- Building something smaller? Just link the [core library](http://github.com/walmartlabs/thorax) as a [single file from cdnjs](http://cdnjs.cloudflare.com/ajax/libs/thorax/2.0.0rc6/thorax.js) compiled with all of its dependencies and use it anywhere or play with our [Hello World fiddle](http://jsfiddle.net/KRuPZ/) or [Todos fiddle](http://jsfiddle.net/mZzhy/).
@@ -157,20 +155,20 @@ Then in your template:
157155
})
158156
layout.setView(view);
159157

160-
## Server Side Render
158+
## Server Side Rendering
161159

162160
Thorax allows for rendering outside of the normal browser context using environments such as [Fruit Loops][fruit-loops] or [PhantomJS][phantomjs] to render content in the initial server response and then restore the view hierarchy on the client render. Rendering in such a manner allows for Thorax applications to expose their content for SEO purposes as well as speed up the perceived initial page load.
163161

164-
The restore process is well suited for handling distinctions between user and public data, allowing for the server response to include only public, long cacheable, content. The client can then augment this data with any user specific data on restoration.
162+
The restore process is well suited for handling distinctions between user and public data, allowing for the server response to include only public, long cache-able, content. The client can then augment this data with any user specific data on restoration.
165163

166164

167165
# Getting Started
168166

169167
## Tutorials
170168

171-
### [From zero to todos](https://github.com/walmartlabs/thorax-seed/blob/master/README.md)
169+
### [Thorax Yeoman Generator](https://github.com/walmartlabs/generator-thorax)
172170

173-
Did you enjoy the [screencast](http://vimeo.com/60230630)? Learn how to build your own simple todos app from scratch, with [step by step explanations](https://github.com/walmartlabs/thorax-seed/blob/master/README.md) of how the app was built.
171+
Using the Thorax Generator, you can generate a Todos example application. You can also generate a blank application and build it out to match the Todos example app. This is a great way to learn by doing.
174172

175173
### [Thorax in Backbone Fundamentals](http://addyosmani.github.com/backbone-fundamentals/#thorax)
176174

@@ -185,15 +183,11 @@ See the [TodoMVC Thorax implementation](http://addyosmani.github.com/todomvc/lab
185183

186184
## Resources
187185

188-
### Seeds
186+
### Thorax Yeoman Generator
189187

190-
Cloning a seed is the easiest way to get started building your own project.
188+
The [Thorax Generator](https://github.com/walmartlabs/generator-thorax) will ask you questions before generating a new blank or predefined base project. This is the recommended way to get started.
191189

192-
- [Root Seed](https://github.com/walmartlabs/thorax-seed)
193-
- [with Mocha test harness](https://github.com/eastridge/thorax-seed-mocha)
194-
- [with simple Todos](https://github.com/eastridge/thorax-seed-todos)
195-
- [Rails Seed (zip)](https://github.com/walmartlabs/thorax-boilerplate/blob/master/rails.zip?raw=true)
196-
- [Standalone / HTML only Seed (zip)](https://github.com/walmartlabs/thorax-boilerplate/blob/master/standalone.zip?raw=true)
190+
The [Thorax Generator](https://github.com/walmartlabs/generator-thorax) also provides it's own extensive documentation and aims to help you understand how to setup a full stack Thorax application, including a minimal node express server and deployment instructions.
197191

198192
### Bower component
199193

@@ -220,10 +214,6 @@ Thorax is available on [cdnjs](http://cdnjs.com/), each build includes jQuery 1.
220214
- [Thorax Mobile](http://cdnjs.cloudflare.com/ajax/libs/thorax/2.0.0rc6/thorax-mobile.js)
221215
- [Thorax Mobile (compressed)](http://cdnjs.cloudflare.com/ajax/libs/thorax/2.0.0rc6/thorax-mobile.min.js)
222216

223-
### Chrome Inspector Extension
224-
225-
Chrome users can install the [Thorax Inspector](https://chrome.google.com/webstore/detail/thorax-inspector/poioalbefcopgeaeaadelomciijaondk) Chrome extension which will allow you to inspect any element and see the associated Thorax views, models and collections that may be bound. The [Thorax Seed](https://github.com/walmartlabs/thorax-seed) also integrates the [thorax-inspector](https://npmjs.org/package/thorax-inspector) npm package which allows you to open files in your project that relate to a given element, directly from Chrome.
226-
227217
### Playground
228218

229219
When combined with CoffeeScript small Thorax apps can be written in a single file. This is ideal for creating small test apps within [JSFiddle](http://jsfiddle.net/). Thorax can be selected as a framework (near the bottom of the list) in any fiddle, or you can try out any of the fiddles below:
@@ -270,7 +260,7 @@ If a `name` property is passed to any Thorax classes' `extend` method the result
270260

271261
### templates *Handlebars.templates*
272262

273-
A hash of templates, used by various Thorax helpers. If using the Lumbar or Rails boilerplate projects or the [Thorax Seed](http://github.com/walmartlabs/thorax-seed) this hash will be automatically generated from the files in your `templates` directories. To manually add a template to the hash:
263+
A hash of templates, used by various Thorax helpers. If using the Lumbar or Rails boilerplate projects or the [Thorax Generator](https://github.com/walmartlabs/generator-thorax) this hash will be automatically generated from the files in your `templates` directories. To manually add a template to the hash:
274264

275265
Handlebars.templates['my-template-name'] = Handlebars.compile('template string');
276266

@@ -1378,7 +1368,7 @@ By default this calls `Thorax.onException` when an exception is thrown but imple
13781368

13791369
Immediately executed version of `bindSection`. The default implementation delegates to `bindSection`.
13801370

1381-
# Server Rendering
1371+
## Server Rendering
13821372

13831373
Server side rendering relies can be performed in any environment that supports the `$` API as well as a few core APIs used to control the page life cycle.
13841374

@@ -1388,7 +1378,7 @@ Server side rendering relies can be performed in any environment that supports t
13881378

13891379
[Fruit Loops][fruit-loops] provides this functionality out of the box but this can be added to other environments with relative ease.
13901380

1391-
## Restore Process
1381+
### Restore Process
13921382

13931383
The restore process involves walking the DOM hierarchy looking for nodes that are annotated with the `data-view-restore` attribute. When such a node is found Thorax will attempt to restore based on a variety of steps discussed in the [Restore Methods](#restore-methods) section below.
13941384

@@ -1407,7 +1397,7 @@ The application restore process might look something like:
14071397

14081398
Followed by normal controller execution, ultimately culminating in `setView` call, which will restore the rendered child.
14091399

1410-
## Restore Methods
1400+
### Restore Methods
14111401

14121402
There is no definitive algorithm for restoring views, instead the following heuristics are used. In the event of a mismatch the `restore:fail` event will be emitted on the candidate view with additional debugging information regarding what portion of the heuristic failed.
14131403

@@ -1484,57 +1474,57 @@ Since pending fetch operations might rerender the content of a just restored vie
14841474

14851475
Note that there are issues that might arise if a different model data source is used on the client vs. the server, a personalized vs public data source for example. When such data is loaded prior to the restore operation, it might be necessary to provide a custom restore step that checks if this data has changed and rerender as there is no clean way for Thorax to determine if a model's data has changed between the two states.
14861476

1487-
# Error Codes
1477+
## Error Codes
14881478

1489-
## button-trigger
1479+
### button-trigger
14901480

14911481
`button` helper must have a method name as the first argument or a 'trigger', or a 'method' attribute specified.
14921482

1493-
## link-href
1483+
### link-href
14941484

14951485
`link` helper requires an href as the first argument or an `href` attribute.
14961486

1497-
## collection-element-helper
1487+
### collection-element-helper
14981488

14991489
`collection-element` helper must be declared inside of a `CollectionView`
15001490

1501-
## super-parent
1491+
### super-parent
15021492

15031493
Cannot use `super` helper when parent has no name or template.
15041494

1505-
## view-helper-hash-args
1495+
### view-helper-hash-args
15061496

15071497
Hash arguments are not allowed in the `view` helper as templates should not introduce side effects to view instances.
15081498

1509-
## layout-element-helper
1499+
### layout-element-helper
15101500

15111501
`layout-element` helper must be used within a `LayoutView`.
15121502

1513-
## mixed-fetch
1503+
### mixed-fetch
15141504

15151505
Both `set` and `reset` were passed to `fetch`, must use one or the other.
15161506

1517-
## nested-render
1507+
### nested-render
15181508

15191509
`render` was called which triggered an event handler which in turn called `render`. Infinite recursion was halted.
15201510

1521-
## handlebars-no-data
1511+
### handlebars-no-data
15221512

15231513
Handlebars template compiled without data, use: `Handlebars.compile(template, {data: true})`
15241514

1525-
## insert-destroyed
1515+
### insert-destroyed
15261516

15271517
A helper view that has been destroyed was inserted into the view.
15281518

1529-
## void-tag-content
1519+
### void-tag-content
15301520

15311521
A void tag such as `img` was rendered with `content` in `Thorax.Util.tag`.
15321522

1533-
## server-marshal-object
1523+
### server-marshal-object
15341524

15351525
A complex object was serialized without a proper context path to lookup the object on the client side. See [Thorax.ServerMarshal](#thoraxservermarshal) for more discussion on context paths.
15361526

1537-
## fn-view-unregistered
1527+
### fn-view-unregistered
15381528

15391529
`$.view` found a view element that was inserted manually into the DOM and was not registered with `_addChild` or `retain`. Call `parent._addChild(view)` or `view.retain()` on view insertion or instantiation.
15401530

0 commit comments

Comments
 (0)