Skip to content

Commit ad34307

Browse files
authored
Update README.md
1 parent dc22f6d commit ad34307

File tree

1 file changed

+1
-46
lines changed

1 file changed

+1
-46
lines changed

README.md

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -147,54 +147,9 @@ $ create-cycle-app my-app --flavor cycle-scripts-es-webpack@x.y.z
147147
$ create-cycle-app my-app --flavor ./relative/path/to/cycle-scripts-es-webpack
148148
```
149149

150-
#### How to create a custom flavor
151-
A flavor is a npm module with a set of scripts and template files that are used to configure a new Cycle.js project.
152-
153-
Take a look at [cycle-scripts](./packages/cycle-scripts) as an example.
154-
155-
##### Basic structure
156-
157-
```
158-
.
159-
├── index.js
160-
├── package.json
161-
├── scripts
162-
│ ├── build.js
163-
│ ├── init.js
164-
│ ├── start.js
165-
│ ├── eject.js
166-
│ └── test.js
167-
└── template
168-
├── gitignore
169-
├── public
170-
│ ├── favicon.ico
171-
│ └── index.html
172-
└── src
173-
├── app.js
174-
├── app.test.js
175-
└── index.js
176-
177-
4 directories, 13 files
178-
```
179-
180-
`package.json` is used to declare dependencies for this particular flavor, that acts as devDependencies to the target project. It declares the `cycle-scripts` command script (generally `index.js`), from where each underlying scripts is called.
181-
182-
`index.js` is the entry point for each command exposed to the target project. It could be really simple, just calling the next script file without ceremony.
183-
184-
`scripts/` directory holds each script used in the project. The `start.js` script is used to start a development server. `test.js`, as the name suggests, call the test tool. `build.js` is used to bundle the target project to a deliverable set of files, production-ready. `eject.js` is mostly a copy-and-paste tool, that adapts the target project to reproduce the same commands from the flavor. Last, but not least, `init.js` is the script called by `create-cycle-app` command, in order to install development dependencies and copy initial files.
185-
186-
`templates/` directory holds template files for the target project. This is optional, and unlike other files, could have any structure you desire.
187-
188-
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.
189-
190150
##### Flavors:
191151

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)
194-
195-
#### Publish
196-
197-
If you want your flavor to be used upfront by anyone, just publish it on the NPM registry. Make sure to use the keyword `create-cycle-app-flavor` and add a short self-explanatory description in your flavor's package.json.
152+
- Check [available flavors](https://github.com/cyclejs-community/create-cycle-app-flavors)
198153

199154
## Contributing
200155

0 commit comments

Comments
 (0)