npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

njdotnetreview

v0.1.0

Published

NJDOTNET Reviews System

Downloads

1

Readme

angular-seed — the seed for AngularFire apps

This project is an application skeleton for a typical AngularFire web app. This library allows you to quickly bootstrap real-time apps using Firebase and AngularJS.

The seed contains AngularJS libraries, test libraries and a bunch of scripts all preconfigured for instant web development gratification. Just clone the repo (or download the zip/tarball), start up our (or yours) webserver and you are ready to develop and test your application.

The seed app doesn't do much, just shows how to wire controllers and views together and persist them in Firebase. You can check it out by opening app/index.html in your browser (might not work file file:// scheme in certain browsers, see note below).

Note: While angular, angularFire, and Firebase can be used client-side-only, and it's possible to create apps that don't require a backend server at all, we recommend hosting the project files using a local webserver during development to avoid issues with security restrictions (sandbox) in browsers. The sandbox implementation varies between browsers, but quite often prevents things like cookies, xhr, etc to function properly when an html page is opened via file:// scheme instead of http://.

How to use angularFire-seed

  1. Clone the angularFire-seed repository
  2. Open app/js/config.js and add your Firebase URL
  3. Go to your Firebase URL and enable email/password authentication under the Auth tab
  4. Start hacking...

Serving pages during development

You can pick one of these options:

  • serve this repository with your webserver
  • install node.js and run node scripts/web-server.js

Then navigate your browser to http://localhost:<port>/app/index.html to see the app running in your browser.

Running the app in production

Make sure you set up security rules for your Firebase! An example for this seed can be found in config/security-rules.json

Go to your Forge (open your Firebase URL in the browser) and add your sites domain name under Auth -> Authorized Request Origins. This allows simple login to work from your web site as well as localhost.

The rest really depends on how complex is your app and the overall infrastructure of your system, but the general rule is that all you need in production are all the files under the app/ directory. Everything else can be omitted.

Angular apps are really just a bunch of static html, css and js files that just need to be hosted somewhere, where they can be accessed by browsers.

If your Angular app is talking to the backend server via xhr or other means, you need to figure out what is the best way to host the static files to comply with the same origin policy if applicable. Usually this is done by hosting the files by the backend server or through reverse-proxying the backend server(s) and a webserver(s).

Running unit tests

We recommend using jasmine and Karma for your unit tests/specs, but you are free to use whatever works for you.

Requires node.js, Karma (sudo npm install -g karma) and a local or remote browser.

  • start scripts/test.sh (on windows: scripts\test.bat)
    • a browser will start and connect to the Karma server (Chrome is default browser, others can be captured by loading the same url as the one in Chrome or by changing the config/karma.conf.js file)
  • to run or re-run tests just change any of your source or test javascript files

End to end testing

Angular ships with a baked-in end-to-end test runner that understands angular, your app and allows you to write your tests with jasmine-like BDD syntax.

Requires a webserver, node.js + ./scripts/web-server.js or your backend server that hosts the angular static files.

Check out the end-to-end runner's documentation for more info.

  • create your end-to-end tests in test/e2e/scenarios.js
  • serve your project directory with your http/backend server or node.js + scripts/web-server.js
  • to run do one of:
    • open http://localhost:port/test/e2e/runner.html in your browser
    • run the tests from console with Karma via scripts/e2e-test.sh or script/e2e-test.bat

Receiving updates from upstream

When we upgrade angular-seed's repo with newer angular or testing library code, you can just fetch the changes and merge them into your project with git.

Directory Layout

app/                --> all of the files to be used in production
  css/              --> css files
    app.css         --> default stylesheet
  img/              --> image files
  index.html        --> app layout file (the main html template file of the app)
  index-async.html  --> just like index.html, but loads js files asynchronously
  js/               --> javascript files
    app.js          --> application
    config.js       --> custom angularFire config file
    controllers.js  --> application controllers
    directives.js   --> application directives
    filters.js      --> custom angular filters
    services.js     --> custom angular services
  lib/              --> angular and 3rd party javascript libraries
    angular/        --> the latest angular js libs
      version.txt       --> version number
    firebase/
      angularFire.*.js  --> the angularFire adapter
  partials/             --> angular view partials (partial html templates)
    home.html           --> a rudimentary $firebase().$bind() example
    chat.html           --> a $firebase() sync used as an array, with explicit bindings
    login.html          --> authentication and registration using $firebaseAuth
    account.html        --> a secured page (must login to view this)

config/karma.conf.js        --> config file for running unit tests with Karma
config/karma-e2e.conf.js    --> config file for running e2e tests with Karma
config/security-rules.json  --> sample security rules for your Firebase

scripts/            --> handy shell/js/ruby scripts
  e2e-test.sh       --> runs end-to-end tests with Karma (*nix)
  e2e-test.bat      --> runs end-to-end tests with Karma (windows)
  test.bat          --> autotests unit tests with Karma (windows)
  test.sh           --> autotests unit tests with Karma (*nix)
  web-server.js     --> simple development webserver based on node.js

test/               --> test source files and libraries
  e2e/              -->
    runner.html     --> end-to-end test runner (open in your browser to run)
    scenarios.js    --> end-to-end specs
  lib/
    angular/                --> angular testing libraries
      angular-mocks.js      --> mocks that replace certain angular services in tests
      angular-scenario.js   --> angular's scenario (end-to-end) test runner library
      version.txt           --> version file
  unit/                     --> unit level specs/tests
    *Spec.js                --> specs for a specific module in app/js

Contact

More information on AngularFire: http://angularfire.com More information on Firebase: http://firebase.com More information on AngularJS: http://angularjs.org/