项目作者: leolanese

项目描述 :
AngularJS: Angular-base using Firebase DB (AngularFire Services) with RequireJS, Bower, Grunt, SASS, Jasmine, Karma and RWD skeleton project
高级语言: JavaScript
项目地址: git://github.com/leolanese/angular-firebase.git
创建时间: 2014-09-11T15:48:14Z
项目社区:https://github.com/leolanese/angular-firebase

开源协议:

下载


Angular-firebase

Getting Started

To get you started you can simply clone the angular-firebase repository and install the dependencies:

Clone angular-firebase

Clone the angular-firebase repository using:

  1. mkdir angular-firebase
  2. git clone origin https://github.com/sirwilliam/angular-firebase.git
  3. cd angular-firebase

Install Dependencies

We have two kinds of dependencies in this project: tools and angular framework code. The tools help
us manage and test the application.

  • We get the tools we depend upon via npm, the [node package manager][npm].
  • We get the angular code via bower, a [client-side code package manager][bower].

We have pre-configured npm to automatically run bower so we can simply do (package.json):

  1. npm install

Verify install

  1. node -v;
  2. npm -v;
  3. git --version;
  4. node --version;
  5. bower -v;
  6. karma --version;
  7. grunt -version;
  8. sass -v;
  9. phantomjs --version;
  10. casperjs --version;
  11. bower version;

if you found any problem:

npm update -g bower

You should find that you have a new folders in your project.

  • node_modules - contains the npm packages for the tools we need npm run test-single-run

Run the Application

I have pre-configured the project with a simple development web server.

How to run the unit-test:

  • the configuration is found at /karma.conf.js
  • the unit tests are found in tests/.
  • node scripts/web-server.js
  • sudo karma start karma.conf.js —log-level=debug

I also included the Grunt-karma tasks:
grunt karma

You can also ask Karma to do a single run of the tests and then exit.

  • npm run test-single-run

Skills I have used (the usual suspects):

  1. ├── javascript
  2. ├── HTML5
  3. └── CSS3

Progressive enhancement path

  1. ├── using <html> father with: no-js, lt-ie9, lt-ie8, lt-ie7 and no-svg
  2. ├── selectivizr.js polyfill
  3. ├── html5shiv.js polyfill
  4. ├── respond.js
  5. ├── feature detection framework modernizr.js
  6. └── including fallbacks for legacy browsers and all vendor using compass Mixins

Tools I have used:

AngularJS Services

  1. ├── filters
  2. ├── services
  3. ├── directives
  4. ├── controllers
  5. ├── angularRoute
  6. └── angularfire

angularfire#0.8.2 bower_components/angularfire

  1. ├── angular#1.2.20
  2. ├── firebase#1.0.21
  3. ├── firebase-simple-login#1.6.3
  4. └── mockfirebase#0.2.9

node.js

  1. ├── grunt
  2. ├── compass
  3. ├── jshint
  4. ├── requirejs
  5. ├── sass
  6. ├── watch
  7. └── ngmin

Grunt.js

  1. "karma-script-launcher": "~0.1.0",
  2. "karma-chrome-launcher": "^0.1.3",
  3. "karma-firefox-launcher": "~0.1.0",
  4. "karma-html2js-preprocessor": "~0.1.0",
  5. "karma-jasmine": "^0.1.5",
  6. "karma-requirejs": "^0.2.1",
  7. "karma-coffee-preprocessor": "~0.1.0",
  8. "karma-phantomjs-launcher": "~0.1.0",
  9. "karma": "^0.12.14",
  10. "karma-ng-scenario": "~0.1.0",
  11. "grunt": "^0.4.4",
  12. "grunt-contrib-watch": "^0.6.1",
  13. "grunt-contrib-compass": "^0.7.2",
  14. "grunt-contrib-jshint": "^0.10.0",
  15. "grunt-contrib-sass": "^0.7.3",
  16. "grunt-contrib-requirejs": "^0.4.3",
  17. "grunt-contrib-csslint": "^0.2.0",
  18. "grunt-contrib-uglify": "^0.4.0",
  19. "karma-safari-launcher": "^0.1.1",
  20. "requirejs": "^2.1.11",
  21. "grunt-karma": "^0.8.3",
  22. "grunt-contrib-jasmine": "^0.5.3",
  23. "grunt-template-jasmine-requirejs": "^0.1.10",
  24. "grunt-ngmin": "0.0.3"
  25. "grunt-modernizr": "^0.5.2",
  26. └──
  27. Enabled Extras
  28. └── shiv
  29. └── load
  30. └── mq
  31. └── cssclasses
  32. └── fontface
  33. └── Generating a custom Modernizr build: modernizr-custom.js
  34. └── Uglifying

Bower.js

  1. angular-base#0.1 /Users/Leo/Documents/root/angular-firebase
  2. ├── angular#1.2.20 incompatible with 1.2.16 (1.2.16 available, latest is 1.3.0-rc.1)
  3. ├─┬ angular-animate#1.2.9 extraneous (latest is 1.3.0-rc.1)
  4. └── angular#1.2.20 incompatible with 1.2.9 (1.2.9 available, latest is 1.3.0-rc.1)
  5. ├─┬ angular-mocks#1.2.20 extraneous (1.2.25-build.449+sha.1a53863 available, latest is 1.3.0-rc.1)
  6. └── angular#1.2.20 (latest is 1.3.0-rc.1)
  7. ├─┬ angular-route#1.2.20 extraneous (1.2.25-build.449+sha.1a53863 available, latest is 1.3.0-rc.1)
  8. └── angular#1.2.20
  9. ├─┬ angular-scenario#1.2.20 extraneous (1.2.25-build.449+sha.1a53863 available, latest is 1.3.0-rc.1)
  10. └── angular#1.2.20
  11. ├── bootstrap-sass-official#3.1.1+2 (latest is 3.2.0+2)
  12. ├── firebase#1.0.21 extraneous
  13. ├── happen#0.1.3 extraneous
  14. ├── jasmine#1.3.1 extraneous (latest is 2.0.4)
  15. ├─┬ jasmine-sinon#0.3.2 (latest is 0.4.0)
  16. ├── jasmine#1.3.1 (latest is 2.0.4)
  17. └── sinonjs#1.10.2
  18. ├── jquery#1.10.2 (latest is 2.1.1)
  19. ├── modernizr#2.6.3 (latest is 2.8.3)
  20. ├── namespace#0.5.3 extraneous
  21. ├── normalize-css#3.0.1 extraneous
  22. ├── requirejs#2.1.14 extraneous (2.1.15 available)
  23. ├── requirejs-text#2.0.12 extraneous
  24. └── selectivizr#1.0.2 extraneous

Automatic Test

  1. ├──Jasmine (Behavior Driven Development testing framework: or http://searls.github.io/jasmine-all/jasmine-all-min.js)
  2. └──karma (Test Driver)
  3. ├──safari pluggin karma-safari-launcher
  4. └──ios pluggin karma-ios-launcher

Lay-out test:

  1. cd tests/casper
  2. casperjs go.js http://www.bostonglobe.com/

Parts of the tests:

  1. ├── lib _ jasmine Framework
  2. ├── spec _ unit-test
  3. ├── src_ Code to be tested
  4. └── SpecRunner.html - Runner

Libraries:

  1. └── rwd-reset.css (https://github.com/sirwilliam/rwd-reset)

IDE

  1. └── WebStorm

RequireJS conf file:

  1. └── main.js

AngularJS conf file:

  1. └── app.js

Problems on push:

  1. git rm --cache -r -f .sass-cache/
  2. git rm --cache -r -f .idea/

Thanks:

  1. Inspired by the angular-base project (Seed project for angular apps.):
  2. https://github.com/angular/angular-base

{ ‘Leo Lanese’,

‘I Build Inspiring Responsive Reactive Solutions’,

‘London, UK’ }

Portfolio

http://www.leolanese.com

Blog:

www.leolanese.com/blog

Twitter:

Follow me at:http://twitter.com/LeoLaneseltd

Questions / Suggestion / Recommendation ?

developer@leolanese.com