Boilerplate for developing a new AngularJS 1.x single page application.
Contents:
- Core skeleton of an Angular application using component architecture, with accessibility addressed by ngAria.
- Unit test environment with code coverage in place via Karma+
Jasmine+Istanbul+
Puppeteer, with boilerplate at 100% test coverage.
- Integration test environment via Protractor+Jasmine.
- Linting of CSS and Javascript in place, using Stylelint for the former, and ESLint for the latter. Sensible defaults
in place through
stylelint-config-standard
and eslint:recommended
presets, respectively.
- Automatic generation of app documentation available via ESDoc.
- Offline support via sw-precache.
- Development server provided using BrowserSync, allowing for simultaneous multi-device runtime testing. Supports use of HTML5 History API
for frontend routing, and incremental builds (LiveReload). Can also simulate a production server by minifying assets and inlining critical HTML and CSS.
Features:
- Modern Javascript. Everywhere. Write source code, unit tests, and integration tests with up-to-date syntax and features,
import modules locally or from NPM using ES2015
import
syntax, and get properly source-mapped code, documentation and coverage reports.
The build system, too, is written completely with support for up-to-date syntax and features. This is made possible thanks to Webpack,
Rollup and Babel. Webpack creates a bundle out of the tree of application imports, and Babel transpiles the source code
in the bundle to the correct format for the target environment. Webpack/Rollup allow for dynamic imports, which facilitates lazy loading.
- Inline Angular component templates made possible through Webpack raw-loader. Just import your templates using ES2015
import
syntax.
- Use future CSS features now. Write stylesheets using upcoming CSS features such as selector nesting, variables, and the latest CSS properties (without vendor prefixes).
Import your local CSS or CSS from NPM using spec-compliant
@import
syntax. This is made possible using PostCSS, CSSNext,
and Autoprefixer. The CSS will be bundled to work in today's browsers (with customizable ranges).
- Supports backendless development (enabled by default). This is accomplished through the use of ngMockE2E and $httpBackend.
- Generator scripts for scaffolding new directives, components, and services from the command line.
Compatibility:
Configurable, but by default targets: IE9+, and the last two versions of all mainstream desktop and mobile browsers. When the application is running on IE9,
the HTML5 History API will not be used, and instead frontend routing will be done using hashbang url's.