https://github.com/mateuszwrobel/backbone-boilerplate
Currently most of projects I am working on are based on Backbone and Marionette. None of them is a simple read/write to/from model/collection, so REST services are responding with lot of data which need to be somehow parsed. All of this does not matter when I was considering switching to ES6, but just to give you a background and cut questions why not angular/ember/knockout/someotherfancycooltrendyframework.
- NodeJS - just in case you do not know that it is essential
- NPM - you need to install the latest version (
npm install -g npm
) - Browserify - to get rid of AMD modules (especialy RequireJS which drive me crazy sometimes)
- Babel - to compile ES6 code to ES5
- PostCSS - because SASS and LASS compilers have lot of problems with latest NPM (I do not know why and I don't care, tools must just work)
- express.js - I use it to create server to serve mocks
- JSON Generator - to create mocks for PoC
You do not need Bower, Gulp or Grunt, or some other task managers. All things you can do with NPM. It is easier and clearer. I have never used Bower, cos I never saw anything good in it. And still I don't need it. All you need is commands passed to "scripts" object in package.json.
- Install NodeJS
- Install NPM
npm install -g npm
- Install all modules
npm i
- Install LiveReload plugin to your browser
- Use scripts defined in package.json (write in command line, eg.:
npm run dev:mock
):build
- builds minimised JavaScriptdev:build:js
- builds concatenated JavaScriptdev:build:css
- builds concatenated CSSwatch:css
- watches for changes inapp/assets/css
folder and build CSSwatch:js
- watches for changes inapp
folder and build JSlivereload
- watches for changes inpublic
folder and notify browser to reload css and JS filesdev:mock
- runs node serverhttp://localhost:8080
, watchers and livereloaddev
- runs watchers and livereload
Because. Tabs are much more flexible for teams. I do not care that in github it looks horrible. I write and read code in editor not in github.
- TESTS!
- local modules for large projects
- module management to avoid ./../../../
- better mock management
- building bundles for modules/components/ect.
Thanks to rofrol for publishing react-starter-kit that inspired me to create this PoC.