• This repository has been archived on 31/Dec/2018
  • Stars
    star
    552
  • Rank 80,299 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

angular-kickstart - speed up your AngularJS development and testing with a great gulpjs build system.

angular-kickstart

Sponsor

Build Status

Brought to you by Alessandro Arnodo [@vesparny]

Dev dependency status

Speed up your AngularJS development with a complete and scalable gulpjs based build system that scaffolds the project for you. Just focus on your app, angular-kickstart will take care of the rest.


See a working demo.

What and Why

angular-kickstart is an opinionated kickstart for single page application development with AngularJS. It makes your development and testing easy, keeps the structure of the project consistent and allows you to create a fully optimized production release with ease. After having developed a lot of AngularJS projects I decided to collect here what I've learnt.

Getting started

Install node.js. Then gulp and bower if you haven't yet.

$ npm -g install gulp bower

After that, install angular-kickstart downloading the latest release (or clone the master branch if you want to run the development version). Unzip the project and cd into it, then install bower and npm dependencies, and run the application in development mode.

$ npm install
$ bower install
$ gulp serve

You are now ready to go, your applcation is available at http://127.0.0.1:3000.

Every file you add, edit or delete into the /client folder will be handled by the build system.

When you are ready to build a production release there is a task for that:

$ gulp serve:dist

This task will lint your code, optimize css js and images files, run unit tests. After the task has successfully finished, you can find an optimized version of your project inside the /build/dist folder.

Features

  • 5 simple task: gulp serve,gulp serve:dist, gulp serve:tdd, gulp test:unit, gulp test:e2e
  • JavaScript file continuous linting with jshint.
  • SASS continuous compiling.
  • Unit and e2e testing support. (for e2e testing you need to have a java runtine installed, take a look at selenium JavaScript api and protractor for more informations.
  • HTML templates converted into strings and attached to a single javascript file (to avoid one http call for each template).
  • Livereload provided by browsersync.
  • angular module dependencies automatically injected using ng-annotate.
  • Static resources minification and optimization for production.
  • sourcemaps generated and embedded in JavaScript and css files during the production optimization.

Directory Structure

  • build/ - Build files and configuration, the most important files to note are build.config.js, protractor.config.js and karma.config.js. These files are the heart of the build system. Take a look.
  • client/ the source code and tests of your application, take a look at the modules in this folder, you should structure your application following those conventions, but you can choose another convention as well.
  • .bowerrc - the bower configuration file. This tells Bower to install components in the client/src/vendor directory.
  • .jshintrc - JSHint configuration.
  • gulpfile - see The Build System below.
  • bower.json - Contains the list of bower dependencies.
  • package.json - node.js dependencies.

The Build System

There are some tasks available in gulpfile.js. You can dig into the file to familiarize yourself with gulpjs.

A description of every available task:

  • gulp serve - When this task runs, the build will take care of watching files. Every time you change a file in the client/ folder, the build recompiles every file, and your browser will reload automagically showing you the changes. You just need to add new JavaScript and css files in the client/index.html file.
  • gulp serve:dist - This task will run jshint and unit tests under the client/test/unit folder (thanks to karma runner), and create a fully-optimized version of your application under the build/dist/ folder. The optimization consists of concatenate, minify and compress js and css files, optimize images, and put every template into a js file loaded by the application. A code coverage report will be available inside the client/test/unit-results. Note to change browser-sync's server port, change the 'port' and 'uiIPort' settings in build/build.config.js.
  • gulp serve:tdd - Just like gulp serve but in continuous unit testing environment.
  • gulp test:unit - For running unit tests one time then exit.
  • gulp test:e2e - Run end-to-end tests inside the client/test/e2e folder with protractor. If a test fails, you should find a screenshot of the page inside the client/test/screenshots folder. Note that you need to have the application running in order to run e2e tests. You can launch this task from another terminal instance.

Contributing

PR and issues reporting are always welcome :)

License

See LICENSE file

Changelog

See CHANGELOG.md file

Thank you, community!

All this wouldn't have been possible without these great contributors and everybody who comes with new ideas and suggestions.

More Repositories

1

fair-analytics

📊 An analytics server that doesn't undermine user's privacy
JavaScript
748
star
2

morpheus

The next generation web publishing platform built with React.js
JavaScript
673
star
3

statty

A tiny and unobtrusive state management library for React and Preact apps
JavaScript
512
star
4

marky

A markdown editor built with Electron and React
JavaScript
355
star
5

silex-simple-rest

A simple silex skeleton for writing scalable rest api
PHP
336
star
6

codeigniter-html5boilerplate-twitter-bootstrap

DEPRECATED
PHP
195
star
7

react-kickstart

just another react + webpack boilerplate
JavaScript
186
star
8

markeye

A previewer for Markdown files
JavaScript
77
star
9

cimongo-codeigniter-mongodb-library

DEPRECATED
PHP
74
star
10

angular-fancy-modal

angular-fancy-modal - the definitive modal/popup/dialog solution for AngularJS.
JavaScript
62
star
11

brcast

Tiny data broadcaster with 0 dependencies
JavaScript
47
star
12

flux-immutable-example

A trivial example app with flux, flummox, react-router, webpack and Immutable.js
CSS
43
star
13

borgjs

📦 A tiny wrapper for BorgBackup to automate your backup workflow
JavaScript
31
star
14

fair-analytics-client-api

The Fair Analytics client API
JavaScript
20
star
15

angularjs-playground

A starting point for being up and running in minutes with angularJS.
JavaScript
16
star
16

rxhr

Tiny Observable based HTTP client for browsers
JavaScript
15
star
17

todoo

Todos for introverts
JavaScript
14
star
18

preact-glam

A tiny glamorous version for preact
JavaScript
11
star
19

widget

CSS
3
star
20

is-shallow-equal

shallowly compares two objects
JavaScript
3
star
21

datbox

peer-to-peer file sharing in your browser
JavaScript
1
star
22

site

my website
HTML
1
star