slush-web-app v1.1.0
slush-web-app
Scaffold a web app with Slush
Install
- Install
gulp.js - Install Slush
- Install the
slush-web-appgenerator
$ npm install -g gulp slush slush-node-moduleUsage
Create a new folder for your project and cd into it:
$ mkdir my-new-project && cd my-new-projectRun the generator and answer the questions.
$ slush web-app
? Project name: my-new-project
? What tools are you going to use? (Press <space> to select)
❯◯ React
◯ React Router
◯ ReduxFeatures
This generator will create a modern and clean structure so you can start working on your application without worrying about the setup.
It uses a simple task management system via npm scripts.
Overview
- ES2015 syntax support with a few experimental features (such as ES7 function bind)
- Uses
browserifywith thebabelifytransformer to do the JavaScript transpiling - Support for the latest CSS syntax via
cssnext - Support file watching thanks to
watchy - Uses
xofor dead simple JavaScript linting - Automatic browser reloading using
live-server(servespublicon port8080) - Simple folder structure split in
public(path to be served) andsource(actual source files)
Tasks
build– Build JavaScript and CSS files (both run in parallel)build:js– Build JavaScript filesbuild:css– Build CSS fileswatch– Watch for JavaScript and CSS file changes (both run in parallel)watch:js– Watch for JavaScript file changeswatch:css– Watch for CSS file changesstart– Startup static serverlint– Lint JavaScript files
Tools
Opt-in tools that you can add to your project.
React
Enable React support on the project. Changes transpiling and linting settings and scaffolds a components folder with a simple application component.
Redux
Enable Redux support on the project. Will listen for a store and then re-render the application component on changes.
React Router
Enable React Router support on the project. Will listen for the / route and then re-render the application component on route matching.
TODO
- Add simple Redux bootstrap
- Add simple React Router bootstrap
License
MIT © Rafael Rinaldi