Loading repository data…
Loading repository data…
jacebot / repository
This is an AngularJS 1.x boilerplate for developing a modern Single-page-application.
TODO: Add coverage stats some day.
It is quite opinionated, so feel free - to make suggestions to improve it.
Just a quick special thanks to the following for motivating me to do this.
Includes following:
Requirements:
npm -g i yarn choco install yarnnpm i redux-cli -g
redux g component SimpleButton for blueprintingyarn installyarn dev open http://localhost:2992yarn run lintyarn run testyarn run build for production build, or yarn run build-dev for development buildTo analyze your bundle size - Recommend using Webpack Bundle Analyzer
Currently dev stats for the Webpack console output is minimized in the webpack-dev-server.config.js file. Change it as one see's fit.
At first be sure that you are familiar with ES2015, some other useful materials:
Read Airbnb JavaScript Style Guide - it is important to know, what is good and what is not, and why.
At least briefly read webpack documentation it is crucial to understand how it works in general.
It also recommended you understand a little about state management and Redux since this employs those paradigms.
Managing state with redux:
One Way data binding
Lifecycle
├── build # build stats
├── public # public folder (webroot for dev server)
│ ├── _assets # build results - assets packed by webpack
│ └── index.html # one of app entry points, for dev server
└── src # app sources
├── components # dumb components (Reusable pieces the containers boss around.)
├── containers # smart containers (Controller / ViewModel logic.)
├── pages # ui-view content (Pages are where the C and C come together.)
├── reducers # redux state machine ([re]Ducks format - actions, constants and reducers in one. Oh my!)
├── services # services to talk to an API
├── styles # styles entry point
│ ├── index.scss # main style entry point
│ ├── imports.scss # main import file for your sass
├── index.js # app entry module
└── index.test.js # entry point for test karma
Except my notes below(which could be incomplete and outdated, and again shamelessly opinionated), I highly encourage you to check out:
..." but what about Jon Papa, or Dan Wahlin?!"
Did I mention this was opinionated?
Application organization rules:
Component, Controller, Service.test suffix for test file names