Skip to content

Commit d0d967a

Browse files
committed
Random general cleanup...
1 parent c816191 commit d0d967a

20 files changed

+55
-58
lines changed

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
#### `Reactor#serialize()`
1010

11-
Returns a plain javascript object representing the application state. By defualt this maps over all stores and returns `toJS(storeState)`.
11+
Returns a plain JavaScript object representing the application state. By default this maps over all stores and returns `toJS(storeState)`.
1212

1313
```js
1414
reactor.loadState(reactor.serialize())
1515
```
1616

1717
#### `Reactor#loadState( state )`
1818

19-
Takes a plain javascript object and merges into the reactor state, using `store.deserialize`
19+
Takes a plain JavaScript object and merges into the reactor state, using `store.deserialize`
2020

2121
This can be useful if you need to load data already on the page.
2222

@@ -29,7 +29,7 @@ reactor.loadState({
2929

3030
#### `Store#serialize`
3131

32-
Serialization method for the store's data, by default its implemented as `Nuclear.toJS' which converts ImmutableJS objects to plain javascript.
32+
Serialization method for the store's data, by default its implemented as `Nuclear.toJS' which converts ImmutableJS objects to plain JavaScript.
3333
This is overridable for your specific data needs.
3434

3535
```js
@@ -48,7 +48,7 @@ Nuclear.Store({
4848

4949
#### `Store#deserialize`
5050

51-
Serialization method for the store's data, by default its implemented as `Nuclear.toImmutable' which converts plain javascript objects to ImmutableJS data structures.
51+
Serialization method for the store's data, by default its implemented as `Nuclear.toImmutable' which converts plain JavaScript objects to ImmutableJS data structures.
5252
This is overridable for your specific data needs.
5353

5454
```js
@@ -79,7 +79,7 @@ Nuclear.Store({
7979

8080
## 1.0.1 (April 27, 2015)
8181

82-
- **[NEW]** Expose `createReactMixin` functionality on Nuclear singleton.
82+
- **[NEW]** Expose `createReactMixin` functionality on NuclearJS singleton.
8383
- **[FIXED]** Fix `new Store()` from throwing error when not passed a config object.
8484

8585
## 1.0.0 (April 25, 2015)

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# NuclearJS Docs
22

3-
Doc site statically generated using `React` + `NuclearJS`.
3+
Documentation site statically generated using `React` + `NuclearJS`.
44

5-
##### For development
5+
### For development
66

77
```sh
88
grunt dev
99
```
1010

11-
##### To deploy to gh-pages
11+
### To deploy to gh-pages
1212

1313
```sh
1414
grunt publish

docs/TODO.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Documentation site todo
1+
# Documentation site TODO List
22

33
- [x] links to docs, API, github
44
- [x] build pipeline for docs from MD files
@@ -8,3 +8,4 @@
88
- [ ] scaffold design patterns/examples area
99
- [ ] mobile side navbar
1010
- [ ] build pipeline for examples, create example component, possibly with code editing
11+
- [ ] add active state to Docs side bar. (currently doesn't show which tab is active/selected)

docs/grunt/build-site.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ function parseDocs(globPattern, opts, cb) {
112112
})
113113
}
114114

115-
116115
// Util Functions
117-
118116
function filenameOnly(filepath) {
119117
return path.basename(filepath, path.extname(filepath))
120118
}

docs/src/components/doc-sidebar.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { BASE_URL } from '../globals'
44
export default React.createClass({
55
//propTypes: {
66
//navStructure: React.PropTypes.objectOf(React.PropTypes.shape({
7-
8-
97
//}))
108
//},
119

docs/src/components/usage-example.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ var item0Price = reactor.evaluate(['items', 0, 'price'])
102102
// Evaluate by getter
103103
var filteredItems = reactor.evaluate(filteredItemsGetter)
104104
105-
// Evaluate and coerce to plain javascript
105+
// Evaluate and coerce to plain JavaScript
106106
var itemsPOJO = reactor.evaluateToJS(filteredItemsGetter)
107107
108108
// Observation
@@ -140,7 +140,7 @@ export default React.createClass({
140140
</p>
141141

142142
<p>
143-
<code>initialize()</code> - Sets up any action handlers, by specifying the action type and a function that transforms
143+
<code>initialize()</code> - Sets up any action handlers, by specifying the action type and a function that transforms
144144
<pre><code>(storeState, action) => (newStoreState)</code></pre>
145145
</p>
146146
</div>
@@ -213,15 +213,15 @@ export default React.createClass({
213213
</h3>
214214

215215
<p>
216-
Nuclear maintains a very non-magical approach to dispatching actions. Simply call <code>reactor.dispatch</code> with the <code>actionType</code> and <code>payload</code>.
216+
NuclearJS maintains a very non-magical approach to dispatching actions. Simply call <code>reactor.dispatch</code> with the <code>actionType</code> and <code>payload</code>.
217217
</p>
218218

219219
<p>
220-
All action handling is done synchronously, leaving the state of the system very predicatable after every action.
220+
All action handling is done synchronously, leaving the state of the system very predictable after every action.
221221
</p>
222222

223223
<p>
224-
Because actions are simply functions, it is very easy to compose actions together using plain javascript.
224+
Because actions are simply functions, it is very easy to compose actions together using plain JavaScript.
225225
</p>
226226
</div>
227227
</div>
@@ -239,7 +239,7 @@ export default React.createClass({
239239
</h3>
240240

241241
<p>
242-
Nuclear also provides imperative mechanisms for evaluating and observing state.
242+
NuclearJS also provides imperative mechanisms for evaluating and observing state.
243243
</p>
244244

245245
<p>

docs/src/docs/01-getting-started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm install --save nuclear-js
1717

1818
## Overview
1919

20-
In this tutorial we'll create a Nuclear flux system to show a list of products and add them to a shopping cart. Here's the plan:
20+
In this tutorial we'll create a NuclearJS flux system to show a list of products and add them to a shopping cart. Here's the plan:
2121

2222
1. Create a **Reactor**
2323

@@ -33,19 +33,19 @@ In this tutorial we'll create a Nuclear flux system to show a list of products a
3333

3434
1. Although the example code is written using ES6, this is totally optional. NuclearJS fully supports ES5 out of the box.
3535

36-
2. Nuclear stores work best when using ImmutableJS data structures. You will see `toImmutable` quite often, this is simply sugar
36+
2. NuclearJS stores work best when using ImmutableJS data structures. You will see `toImmutable` quite often, this is simply sugar
3737
to convert plain JavaScript arrays into [`Immutable.List`](https://facebook.github.io/immutable-js/docs/#/List) and objects to
3838
[`Immutable.Map`](https://facebook.github.io/immutable-js/docs/#/Map). The use of `toImmutable` is optional, you are free to use
3939
any ImmutableJS data structure with no penalty.
4040

4141

4242
## Creating a `Reactor`
4343

44-
To get started, we'll create a Nuclear `Reactor`. In Nuclear, the `Reactor` is the brains of the system and in some ways analogous
44+
To get started, we'll create a NuclearJS `Reactor`. In Nuclear, the `Reactor` is the brains of the system and in some ways analogous
4545
to the traditional Flux `dispatcher` (though it works differently under the hood and provides a few extra features, which we'll
4646
cover later).
4747

48-
Generally you'll only have one reactor for your application, however they are instanceable for server-side rendering.
48+
Generally you'll only have one reactor for your application, however they are instance-able for server-side rendering.
4949

5050
The reactor has two main jobs:
5151

@@ -67,7 +67,7 @@ export default reactor
6767
```
6868

6969
_* If you pass a `debug: true` option when instantiating a reactor, you'll get great debugging tools that print to your browser console.
70-
This is completely optional, but very useful for keeping tracking of dispatched actions and subsequest changes in state._
70+
This is completely optional, but very useful for keeping tracking of dispatched actions and subsequent changes in state._
7171

7272
Now that we have our reactor, let's create some actions.
7373

docs/src/docs/02-creating-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ We've now created two actions that we can use to send data into the system.
6060

6161
While synchronous actions are great, often you'll need to perform an asynchronous operation before dispatching an action. Nuclear
6262
fully supports creating actions asynchronously, as we're doing in `fetchProducts`. This is a common pattern you'll use as your application grows,
63-
and Nuclear has no opinion on how you perform your operations: callbacks, Promises, Generators, ES7 async functions — they'll all work just fine!
63+
and NuclearJS has no opinion on how you perform your operations: callbacks, Promises, Generators, ES7 async functions — they'll all work just fine!
6464

6565
If you'd like to jump ahead, you can read more about [async actions](./04-async-actions-and-optimistic-updates.html).
6666

docs/src/docs/03-creating-stores.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In Flux, stores are used for managing application state, but they don't represen
99

1010
More than simply managing ORM-style objects, **stores manage the state for a particular domain within the application**.
1111

12-
Unlike many other Flux libraries, Nuclear stores hold no state. Instead, they provide a collection of functions that transform current state into new state.
12+
Unlike many other Flux libraries, NuclearJS stores hold no state. Instead, they provide a collection of functions that transform current state into new state.
1313

1414
Stores provide a `getInitialState` method, which returns the initial state value that a store will manage, and an `initialize` hook, which is used to define what
1515
actions a store will respond to by attaching handlers.
@@ -23,7 +23,7 @@ handler(currentState: any, payload: any)
2323

2424
In Nuclear, state can only be an ImmutableJS data type, such as an `Immutable.Map` or an `Immutable.List`, or a JavaScript primitive.
2525

26-
Because stores in Nuclear don't hold state — they simply receive state, transform it, and return new state — there is no need to worry about stores knowing
26+
Because stores in NuclearJS don't hold state — they simply receive state, transform it, and return new state — there is no need to worry about stores knowing
2727
about other stores. That means no confusing `store.waitsFor` and no cross-pollution of data. In Nuclear, the sole responsibility of a store is to return a portion
2828
of existing or transformed application state. The responsibility of reading application state falls on **Getters**, which we'll cover later.
2929

@@ -224,7 +224,7 @@ However, if stores are limited in scope, how can you read substantive data from
224224

225225
It's actually quite simple: **composition**.
226226

227-
Nuclear allows you to combine data from stores in a non-destructive manner, check it out:
227+
NuclearJS allows you to combine data from stores in a non-destructive manner, check it out:
228228

229229
```javascript
230230
reactor.evaluate([

docs/src/docs/05-hooking-up-to-react.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ section: "Guide"
77

88
### Binding application state to components
99

10-
Every Nuclear Reactor comes with `reactor.ReactMixin` to easily create an always-in-sync binding between any KeyPath or Getter value
10+
Every NuclearJS Reactor comes with `reactor.ReactMixin` to easily create an always-in-sync binding between any KeyPath or Getter value
1111
and a React component's state.
1212

1313
The ability to observe any piece of composite data is immensely powerful and trivializes a lot of what other frameworks work hard to solve.
1414

1515
To use simply include the `reactor.ReactMixin` and implement the `getDataBindings()` function that returns an object of state properties
16-
to `KeyPath` or `Getter`. Nuclear will take care of the initial sync, observation and destroying the subscription when on `componentWillUnmount`.
16+
to `KeyPath` or `Getter`. NuclearJS will take care of the initial sync, observation and destroying the subscription when on `componentWillUnmount`.
1717

1818
**First let's expand our main file to initiate the fetch for products.**
1919

@@ -140,9 +140,9 @@ export default React.createClass({
140140

141141
## Recap
142142

143-
Once you have a functioning Nuclear Reactor, hooking it up to a React application is very easy using the `reactor.ReactMixin` + `getDataBindings()` method.
143+
Once you have a functioning NuclearJS Reactor, hooking it up to a React application is very easy using the `reactor.ReactMixin` + `getDataBindings()` method.
144144

145-
Nuclear will automatically sync the value of a getter to your component via `this.setState` whenever the underlying getter value changes. Meaning you never
145+
NuclearJS will automatically sync the value of a getter to your component via `this.setState` whenever the underlying getter value changes. Meaning you never
146146
have to explicitly call `this.setState` to re-render a component.
147147

148148
In the next section we will cover hooking up actions to our react components.

0 commit comments

Comments
 (0)