Frontend consisting of:
- Angular Using paradox41's excellent angular template
- Bootstrap
- Gulp
- Browserify
- Karma
- Mocha
- Chai
Backend consisting of:
Clone the repo or download the zip file. If you cloned, rm -rf .git
npm install
cd client/
gulp
cd api/
node server.js
npm run build
- Each module should be totally self-contained. Any functionality shared across modules should be moved into
common/
. - Modules can have their own directives, services, filters, etc. If multiple files are needed in order to maintain file size,
a folder should be created (
directives/
,services/
, etc) and the broken up files should be placed into their respective folders with less abstract naming conventions. - JavaScript files should always be as close as possible - preferably on the same level - as their HTML partials.
- If a directive has a partial - which they tend to - a new folder should be created that is named accordingly (meaning not something generic) and the HTML partial and the JavaScript file should be placed together in that folder.
app.scss
is merely a table of contents. There should be no Sass in the file.- Each module is responsible for exporting its submodules. In other words,
app.scss
should only import top level modules. - Sass that needs to be shared among modules should be moved into
assets/stylesheets/
.
A typical module will look something like this:
import angular from 'angular';
import _ from 'lodash';
class ExampleCtrl {
constructor(data) {
this.exampleData = data;
}
someMethod() {
return _.map(this.exampleData, function(data) {
return (data * 2);
});
}
get data() {
return this.exampleData;
}
}
ExampleCtrl.$inject = ['data'];
/*
Allows us to import exampleModule like so:
import exampleModule from './example';
angular.module('foo', [
exampleModule.name
])
*/
export default angular.module('example', [])
.controller('ExampleCtrl', ExampleCtrl)
.config(['$stateProvider', function($stateProvider) {
$stateProvider.state('app.example', {
controller: 'ExampleCtrl',
controllerAs: 'Example',
url: '/example',
template: require('./_example.html'),
resolve: {
data: [function() {
return [1, 2, 3, 4, 5, 6];
}]
}
});
}]);
Follow conventional changelog
Documentation via JSDoc
npm run docs
gulp documentation:serve