cyclejs-community/one-fits-all

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

one-fits-all flavour

Greenkeeper badge

Cycle-app flavor.

Installation

Run create-cycle-app myAppName --flavor cycle-scripts-one-fits-all

Template

An elementary SPA. Each page is a cycle component and has its own state, which is persisted in local storage

Uses:

Language

Typescript (strict) with TSLint or ES6, uses the Typescript compiler for both.

How does this flavor work

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.

Migrating

To migrate an existing app to 5.0.0 you have to

“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)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.