Skip to content

Commit d5bf5ee

Browse files
author
Nick Balestra
committed
Documentation
1 parent f9cc35d commit d5bf5ee

File tree

2 files changed

+54
-27
lines changed

2 files changed

+54
-27
lines changed

README.md

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ $ npm install -g create-cycle-app
1414
$ create-cycle-app my-awesome-cycle-app
1515
```
1616

17-
You will be prompted to choose the flavour and stream library you prefer.
18-
19-
<img src='https://raw.githubusercontent.com/cyclejs-community/create-cycle-app/master/docs/create-cycle-app-select-flavor.png' width='600' alt='create-cycle-app-select-flavor'>
20-
21-
<img src='https://raw.githubusercontent.com/cyclejs-community/create-cycle-app/master/docs/create-cycle-app-select-streamLib.png' width='600' alt='create-cycle-app-select-stream-library'>
17+
Once your app has been created a success message with further info will be displayed:
2218

2319
<img src='https://raw.githubusercontent.com/cyclejs-community/create-cycle-app/master/docs/create-cycle-app.png' width='600' alt='create-cycle-app-success'>
2420

@@ -41,11 +37,11 @@ $ npm run build
4137

4238
## Principles
4339

44-
* **One dependency:** The first and only dependency needed to create a Cycle.js project, hiding tooling complexity and providing smart defaults. Just update `create-cycle-app` to get selected changes to the core flavors.
40+
* **One dependency:** The first and only dependency needed to create a Cycle.js project, hiding tooling complexity and providing smart defaults. Just update `create-cycle-app` to get selected changes to the core flavors.
4541

4642
* **Zero Configuration:** There are no configuration files. Configuring both development and production builds is handled for you so you can focus on writing code.
4743

48-
* **Many Flavors:** We like to be together not the same, that’s why create-cycle-app comes with 4 core flavors that you can mix and match with your favorite reactive stream library. Furthermore, a discovery mechanism allows to find and use any flavor published on the npm registry. Alternatively, you can use your own flavors from any registry such as GitHub or your own.
44+
* **Many Flavors:** We like to be together not the same, that’s why create-cycle-app comes with 1 core flavors but allows you to provide your own from any registry such as GitHub or your own.
4945

5046
* **No Lock-In:** Specifically made for beginners and to provide fast bootstrap for new projects, create-cycle-app doesn't have the ambition to be __the__ tool for working with Cycle.js projects. With that in mind, it's easy to leave `create-cycle-app` defaults and follow your own steps, by running `npm run eject`.
5147

@@ -93,7 +89,7 @@ my-awesome-cycle-app/
9389
└── package.json
9490
```
9591

96-
_* Generated structure and files may change depending on the flavor being used, The above structure hold true for any of the 4 core flavors._
92+
_* Generated structure and files may change depending on the flavor being used, The above structure hold true for the core flavor._
9793

9894
No configuration or complicated folder structures, just the files you need to build your cycle app.
9995
Once the installation is done, you can run the following commands from within the project folder:
@@ -122,19 +118,16 @@ Copy dependencies and configurations to the project folder, update package.json
122118
## Flavors
123119
Each flavor represents a pair of programming language and builds tool. All the underlying dependencies and configuration are hidden behind the flavor. All flavors must adhere to the same basic structure and commands. Please make sure to check a specific flavor documentation for more details.
124120

125-
### Core flavors
121+
### Core flavor
126122

127-
Create-cycle-app come packed with 4 core flavors for you to choose from, namely:
123+
Create-cycle-app come packed with 1 core flavor:
128124

129-
* [ES6 (babel) + Browserify](https://github.com/cyclejs-community/create-cycle-app/blob/master/cycle-scripts-es-browserify)
130-
* [ES6 (babel) + Webpack](https://github.com/cyclejs-community/create-cycle-app/blob/master/cycle-scripts-es-webpack)
131-
* [TypeScript + Browserify](https://github.com/cyclejs-community/create-cycle-app/blob/master/cycle-scripts-ts-browserify)
132-
* [TypeScript + Webpack](https://github.com/cyclejs-community/create-cycle-app/blob/master/cycle-scripts-ts-webpack)
125+
* [cycle-scripts](https://github.com/cyclejs-community/create-cycle-app/blob/master/packages/cycle-scripts)
133126

134127
### Custom flavour
135128

136129
Custom flavors allow generating starting projects to fulfil specific needs.
137-
They can be published to npm, becoming instantaneously available to everybody via the create-cycle-app CLI.
130+
They can be published to npm, or being used locally via the create-cycle-app CLI.
138131

139132
#### How to use custom flavors
140133

@@ -154,17 +147,10 @@ $ create-cycle-app my-app --flavor cycle-scripts-es-webpack@x.y.z
154147
$ create-cycle-app my-app --flavor ./relative/path/to/cycle-scripts-es-webpack
155148
```
156149

157-
##### Discovering published flavors
158-
159-
If no `--flavor` flag is passed, `create-cycle-app` will allow you to discover more flavors aside the core ones.
160-
Create-cycle-app will look up on the NPM registry for published flavors and if any get selected install it from there.
161-
162-
<img src='https://raw.githubusercontent.com/cyclejs-community/create-cycle-app/master/docs/create-cycle-app-discover-flavor.png' width='600' alt='create-cycle-app-discover-flavor'>
163-
164150
#### How to create a custom flavor
165151
A flavor is a npm module with a set of scripts and template files that are used to configure a new Cycle.js project.
166152

167-
Take a look at [cycle-scripts-es-browserify](./cycle-scripts-es-browserify) as an example.
153+
Take a look at [cycle-scripts](./packages/cycle-scripts) as an example.
168154

169155
##### Basic structure
170156

@@ -201,10 +187,10 @@ Take a look at [cycle-scripts-es-browserify](./cycle-scripts-es-browserify) as a
201187

202188
Each flavor has great freedom to choose it's own dependencies, configuration, tools and file structure, as the user will choose which is the best (desired) flavor.
203189

204-
##### Example:
190+
##### Flavors:
205191

206-
A flavor starring Semicolons!, browserify, babel and the object spread babel plugin with a really long name!
207-
Check it out [here](https://github.com/Widdershin/cycle-scripts-widdershin)
192+
- A flavor starring Semicolons!, browserify, babel and the object spread babel plugin with a really long name!
193+
[cycle-scripts-widdershin](https://github.com/Widdershin/cycle-scripts-widdershin)
208194

209195
#### Publish
210196

packages/cycle-scripts/README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,42 @@
1-
# cycle-scripts
1+
# cycle-scripts
2+
3+
[Cycle-app](https://github.com/cyclejs-community/create-cycle-app) core flavor.
4+
5+
## Language
6+
7+
ES6 ( Babel ) configured with:
8+
* [ES2015 preset](https://babeljs.io/docs/plugins/preset-es2015/)
9+
10+
## Bundler
11+
12+
Webpack configured with
13+
* [Webpack dev server](https://webpack.github.io/docs/webpack-dev-server.html)
14+
* [Hot Module Replacement](https://webpack.github.io/docs/hot-module-replacement-with-webpack.html)
15+
16+
## Scripts
17+
18+
- `npm start`: Start development server listening on port 8000
19+
- `npm test`: Run the default test tool
20+
- `npm run build`: Generate a production-ready build content, on the `build` folder (this folder is *gitignored*)
21+
- `npm run eject`: Copy flavor's dependencies and configurations to the project folder, update `package.json` and remove the dependency on the flavored `cycle-scripts`. This is irreversible.
22+
23+
24+
## Boilerplate:
25+
26+
The flavor generate the following file structure:
27+
28+
```
29+
my-awesome-cycle-app/
30+
├── node_modules/
31+
├── public/
32+
│ ├── favicon.ico
33+
│ └── index.html
34+
├── src/
35+
│ ├── app.js
36+
│ ├── app.test.js
37+
│ └── index.js
38+
└── package.json
39+
```
40+
41+
### Config files
42+
* .babelrc (Added on the root after running the eject script)

0 commit comments

Comments
 (0)