Name: one-fits-all
Owner: Cycle.js Community
Description: The one-fits-all flavor for create-cycle-app
Created: 2017-08-03 10:29:55.0
Updated: 2018-04-25 16:08:16.0
Pushed: 2018-05-16 19:51:15.0
Homepage: null
Size: 912
Language: TypeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Cycle-app flavor.
Run create-cycle-app myAppName --flavor cycle-scripts-one-fits-all
An elementary SPA. Each page is a cycle component and has its own state, which is persisted in local storage
Uses:
Typescript (strict) with TSLint or ES6, uses the Typescript compiler for both.
My goal is to create a flavor where you don't have to eject if you want to customize the config. This is now possible with the 3.0.0 update. The template will create a webpack.config.js
inside your app folder that defines the entry points of the app. You can add to that config and it will be merged with the config defined in this flavor.
I strongly recommend wepack-blocks as they help a lot in making webpack easy.
To migrate an existing app to 5.0.0
you have to
cycle-scripts-one-fits-all
package.json
like this:": {
trument": false,
rceMap": false,
lude": [<paths of files you want to test>, "src/components"],
orter": ["html", "text-summary"]
“mocha-webpack”: { “include”: [
"src/components/**/*.{jsx,js,ts,tsx}", //Should be the same as in nyc.include
"test/**/*.test.{js,jsx,ts,tsx}" //All your tests
] }
undler
ack is configured using [webpack-blocks](https://github.com/andywer/webpack-blocks)
ebpack dev server](https://webpack.js.org/configuration/dev-server)
ot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/)
cripts
pm start`: Start development server listening on port 8080
pm test`: Run the tests with mocha-webpack
pm run build`: Generate a production-ready build content, on the `build` folder (this folder is *gitignored*)
pm 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.
pm run clean`: Delete all the files and folders that were generated by the other commands (build, start and test)
Config files
bpack.config.js (Added to `config/` after running the eject script)
bpack.config.test.js (Added to `config/` after running the eject script)