Giter Site home page Giter Site logo

douglasrono / generator-firebase-angular-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andela/generator-firebase-angular-node

0.0 0.0 0.0 256 KB

Yeoman generator for building FAN stack apps(Firebase, Angular, Node)!

JavaScript 82.91% CSS 6.36% HTML 10.72%

generator-firebase-angular-node's Introduction

FAN(Firebase Angular Node) Stack Generator Build Status

Yeoman generator for creating FAN stack applications, using Firebase, AngularJS, and Node - lets you quickly set up a project following best practices. This generator also sets you up with AngularMaterial, AngularFire, and Gulp for running tasks.

Usage

Install generator-firebse-angular-node:

npm install -g generator-firebase-angular-node

Make a new directory, and cd into it:

mkdir my-new-project && cd $_

Run yo firebase-angular-node:

Run gulp for building, and serving the built app.

Prerequisites

  • Firebase - Create your development and test databases on Firebase.
  • Firebase - Make sure to enable Google Auth from the Login & Auth tab of your Firebase dashboard.

Default Configurations

Client

  • Scripts: JavaScript, (no CoffeeScriptsupport yet)
  • Markup: Jade
  • Stylesheets: CSS, Less
  • Design Frameworks: [AngularMaterialDesign] (https://material.angularjs.org/#/)
  • Angular Routers: ui-router
  • AngularFire: Yes

Server

  • Database: Firebase
  • Authentication boilerplate: Yes
  • oAuth integrations: Google

Injection

A gulp task looks for new files in your app folder and automatically injects them in the appropriate places based on an injection block.

  • less files into public/css/*.css
  • js files into public/js/index.js

App

Sets up a new Firebase + AngularJS + Node app, generating all the boilerplate you need to get started.

Example:

yo firebase-angular-node

Bower Components

The following packages are always installed by the app generator:

  • angular
  • angular-animate
  • angular-aria
  • angular-cookies
  • angular-mocks
  • angular-material
  • angularfire
  • firebase
  • lodash
  • moment
  • angular-ui-router
  • underscore
  • jquery
  • angular-elastic

All of these can be updated with bower update as new versions are released.

Configuration

Yeoman generated projects can be further tweaked according to your needs by modifying project files appropriately.

A .yo-rc file is generated for helping you copy configuration across projects, and to allow you to keep track of your settings. You can change this as you see fit.

Testing

Running gulp test will run the client and server unit tests with karma and mocha.

Use gulp test:server to only run server tests.

Use gulp test:client to only run client tests.

Protractor tests

To setup protractor e2e tests, you must first run

npm run update-webdriver

Use gulp test:e2e to have protractor go through tests located in the test/e2e folder.

Environment Variables

Keeping your app secrets and other sensitive information in source control isn't a good idea. To have gulp launch your app with specific environment variables, add them to the config file: config/config.js.

Project Structure

Overview

├── app                     - Frontend part of the application(templates, angular, styles)
│  ├── 404.jade             - Default template for 404 errors
│  ├── application.js       - All of the js files from the js folders get concatenated in here
│  ├── favicon.ico          - Favicon
│  ├── img                  - All frontend img assets go here
│  ├── index.jade           - The default home page
│  ├── js                   - All the frontend js files live here
│  ├── shared               - All shared templates like header and footer live here
│  ├── styles               - Less files for styling go here
│  └── views                - All jade templates get compiled to html and stored here
├── bower.json              - Bower dependencies
├── circle.yml              - Circle CI config for deployments
├── config                  - Where we do the bulk of our apps configuration
│  ├── config.js            - Config parameters like secret keys go here
│  └── security-rules.js    - Firebase security rules
├── gulpfile.js             - Gulp taskrunner config
├── karma.conf.js           - Karma testrunner config
├── package.json            - Node dependencies
├── protractor.conf.js      - E2E test config for protractor
├── routes                  - Server side routes
│  ├── index.js             - Default express routes for server api
│  └── users-routes.js      - Users express routes for server api
├── server.js               - Node server app
└── test                    - Tests
    ├── client              - Directory to hold client test files 
    ├── e2e                 - Directory to hold e2e test files
    └── server              - Directory to hold server test files

Contribute

When submitting an issue, please follow the guidelines. Especially important is to make sure Yeoman is up-to-date, and providing the command or commands that cause the issue.

When submitting a PR, make sure that the commit messages match the AngularJS conventions.

When submitting a bugfix, try to write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.

When submitting a new feature, add tests that cover the feature.

See the travis.yml for configuration required to run tests.

License

BSD license

generator-firebase-angular-node's People

Contributors

nadayar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.