1.1.0 • Published 8 years ago

slush-web-app v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

slush-web-app

Scaffold a web app with Slush

Install

  1. Install gulp.js
  2. Install Slush
  3. Install the slush-web-app generator
$ npm install -g gulp slush slush-node-module

Usage

Create a new folder for your project and cd into it:

$ mkdir my-new-project && cd my-new-project

Run 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
 ◯ Redux

Features

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 browserify with the babelify transformer to do the JavaScript transpiling
  • Support for the latest CSS syntax via cssnext
  • Support file watching thanks to watchy
  • Uses xo for dead simple JavaScript linting
  • Automatic browser reloading using live-server (serves public on port 8080)
  • Simple folder structure split in public (path to be served) and source (actual source files)

Tasks

  • build – Build JavaScript and CSS files (both run in parallel)
  • build:js – Build JavaScript files
  • build:css – Build CSS files
  • watch – Watch for JavaScript and CSS file changes (both run in parallel)
  • watch:js – Watch for JavaScript file changes
  • watch:css – Watch for CSS file changes
  • start – Startup static server
  • lint – 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

License

MIT © Rafael Rinaldi