• Stars
    star
    251
  • Rank 161,862 (Top 4 %)
  • Language
    JavaScript
  • Created over 11 years ago
  • Updated almost 10 years ago

Reviews

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

Repository Details

A Lineman Application Template using AngularJS

A Lineman JS Template using Angular

Build Status

This is a project template for Angular JS applications using Lineman.

It includes the following features:

  1. Template Precompilation into Angulars $templateCache using grunt-angular-templates
  2. A basic login, logout service bound to sample routes inside config/server.js
  3. A router, and 2 views home and login
  4. A directive that shows a message on mouseover
  5. 2 Controllers, for home and login, with $scope variables set and bound
  6. A working, bound login form (username/password don't matter, but are required)
  7. Configured grunt-ng-annotate so you don't have to fully qualify angular dependencies.
  8. Auto generated sourcemaps with inlined sources via grunt-concat-sourcemap (you'll need to enable sourcemaps in Firefox/Chrome to see this)
  9. Unit Tests and End-to-End Tests
  10. Configuration to run Protractor for End-to-End Tests

Instructions

  1. git clone https://github.com/linemanjs/lineman-angular-template.git my-lineman-app
  2. cd my-lineman-app
  3. sudo npm install -g lineman
  4. npm install
  5. lineman run
  6. open your web browser to localhost:8000

Running Tests

This template was used as the basis of @davemo's Testing Strategies for Angular JS screencast, and contains all the tests we wrote in the screencast and a few more!

To run the unit tests:

  1. lineman run from 1 terminal window
  2. lineman spec from another terminal window, this will launch Testem and execute specs in Chrome

To run the end-to-end tests:

End-to-End Tests

  1. npm install protractor
  2. ./node_modules/protractor/bin/webdriver-manager update
  3. Make sure you have chrome installed.
  4. lineman run from 1 terminal window
  5. lineman grunt spec-e2e from another terminal window

Defining your apps angular.module in CoffeeScript

If you are using Coffeescript to define the angular.module for your app, you will need to swap the concat order in config/application.js such that coffeescript files are included before javascript. (If you are using JavaScript for defining the angular.module the default concat order is fine).

Add the following concat_sourcemap block to config/application.js if you want to define your app module in coffeescript:

module.exports = function(lineman) {
  return {

    concat_sourcemap: {
      js: {
        src: [
          "<%= files.js.vendor %>",
          "<%= files.coffee.generated %>",
          "<%= files.js.app %>",
          "<%= files.ngtemplates.dest %>"
        ]
      }
    }

  };
};

Hopefully this helps you get up and running with AngularJS!

More Repositories

1

lineman

Lineman helps you build fat-client JavaScript apps. It produces happiness by building assets, mocking servers, running specs on every file change
CoffeeScript
1,179
star
2

lineman-ember-template

Clone this template to get started with Ember using Lineman
JavaScript
35
star
3

lineman-blog-template

Create your own Markdown blog with Lineman
Pug
24
star
4

lineman-backbone-template

A Lineman Application Template using BackboneJS
JavaScript
16
star
5

lineman-bower

A Bower plugin for Lineman
CoffeeScript
15
star
6

lineman-plus-rails

An example application that uses Lineman alongside Rails
JavaScript
11
star
7

rails-lineman

Helps Rails apps integrate a Lineman into their build by wrapping rake assets:precompile
Ruby
10
star
8

lineman-angular

A Lineman plugin for Angular projects (for a quickstart, see lineman-angular-template)
CoffeeScript
8
star
9

lineman-rails

Configures Lineman to deploy assets elegantly with Ruby on Rails
CoffeeScript
7
star
10

lineman-lib-template

A Lineman Template for creating JavaScript libs for the web.
JavaScript
7
star
11

lineman-browserify

A Lineman plugin that configures Browserify for you
CoffeeScript
6
star
12

lineman-ember

A plugin to configure Ember for your Lineman project
CoffeeScript
3
star
13

lineman-docs

Documentation for linemanjs.com
JavaScript
3
star
14

lineman-less

A plugin to make it easy to use LESS in conjunction with a Lineman app.
CoffeeScript
2
star
15

lineman-vendor-split

Creates discrete vendor and app bundle files for js/css.
CoffeeScript
2
star
16

lineman-batman-template

A Lineman Application Template using BatmanJS
JavaScript
2
star
17

lineman-blog

A Lineman plugin that helps you make a blog with Markdown posts.
CoffeeScript
2
star
18

lineman-livereload

This is a plugin to make it easy to use LiveReload via `grunt-contrib-watch` in conjunction with a Lineman app.
CoffeeScript
2
star
19

lineman-backbone

A Lineman plugin for Backbone projects (for a quickstart, see lineman-backbone-template)
CoffeeScript
2
star
20

lineman-deploy-aws

CoffeeScript
1
star
21

lineman-spec-browser

A Lineman plugin for testing your Lineman app with a browser
CoffeeScript
1
star
22

lineman-install-guide

A little lineman-blog site with installation instructions
JavaScript
1
star
23

lineman-dogescript

Adds support for the Doge programming language to Lineman projects.
CoffeeScript
1
star