GithubHelp home page GithubHelp logo

pauloluan / angular-gulp-seed Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 17.0 152 KB

[DEPRECATED] Seed project for angular apps, a skeleton for a typical AngularJS web app using gulp and a lot of good practices.

JavaScript 81.36% Shell 4.39% HTML 10.45% CSS 3.80%

angular-gulp-seed's Introduction

Angular Seed App

Build Status Coverage Status bitHound Score Dependency Status

This project is an application skeleton for a typical AngularJS web app. You can use it to quickly bootstrap your angular webapp projects and dev environment for these projects.

The seed contains a sample AngularJS application and is preconfigured to install the Angular framework and a bunch of development and testing tools for instant web development gratification.

In This Documentation

  1. Getting Started
  2. Gulp Tasks
  3. File Structure
  4. License

Getting Started

Dependencies

Make sure these are installed first.

Quick Start

  1. In bash/terminal/command line, cd into your project directory.
  2. Run npm install -g yo bower grunt-cli gulp && npm install && bower install to install required dependencies.
  3. When it's done installing, run one of the task runners to get going:

Gulp tasks

  • gulp or gulp build to build an optimized version of your application in /dist
  • gulp serve to launch a browser sync server on your source files
  • gulp serve:dist to launch a server on your optimized application
  • gulp test to launch your unit tests with Karma
  • gulp test:auto to launch your unit tests with Karma in watch mode
  • gulp protractor to launch your e2e tests with Protractor
  • gulp protractor:dist to launch your e2e tests with Protractor on the dist files

Features included in the gulpfile

  • useref : allow configuration of your files in comments of your HTML file
  • ngAnnotate : convert simple injection to complete syntax to be minification proof
  • uglify : optimize all your JavaScript
  • csso : optimize all your CSS
  • rev : add a hash in the file names to prevent browser cache problems
  • watch : watch your source files and recompile them automatically
  • jshint : JavaScript code linter
  • imagemin : all your images will be optimized at build
  • Unit test (karma) : out of the box unit test configuration with karma
  • e2e test (protractor) : out of the box e2e test configuration with protractor
  • browser sync : full-featured development web server with livereload and devices sync
  • angular-templatecache : all HTML partials will be converted to JS to be bundled in the application

Frameworks used on this project:

AngularJS: HTML enhanced for web apps! https://angularjs.org/

Angular Material Design: The Angular reference implementation of the Google's Material Design specification. https://material.angularjs.org/#/

Sass (Node): Node.js binding to libsass, the C version of the popular stylesheet preprocessor, Sass. https://github.com/sass/node-sass

Jasmine: Behavior-Driven JavaScript. http://jasmine.github.io/

BrowserSync: Time-saving synchronised browser testing. http://browsersync.io/

GulpJS: The streaming build system. http://gulpjs.com/

Protractor: End to end test framework for AngularJS applications built on top of WebDriverJS. https://github.com/angular/protractor

Karma: Spectacular Test Runner for JavaScript. http://karma-runner.github.io/

File Structure

Best Practice Recommendations for Angular App Structure

The root directory generated for a app with name gulpAngular :

├──  src/
│   ├──  app/
│   │   ├──  components/
│   │   │   └──  navbar/
│   │   │   │   ├──  navbar.controller.js
│   │   │   │   └──  navbar.html
│   │   ├──  main/
│   │   │   ├──  main.controller.js
│   │   │   ├──  main.controller.spec.js
│   │   │   └──  main.html
│   │   └──  index.js
│   │   └──  index.(css|less|scss)
│   │   └──  vendor.(css|less|scss)
│   ├──  assets/
│   │   └──  images/
│   ├──  404.html
│   ├──  favico.ico
│   └──  index.html
├──  gulp/
├──  e2e/
├──  bower_components/
├──  nodes_modules/
├──  .bowerrc
├──  .editorconfig
├──  .gitignore
├──  .jshintrc
├──  bower.json
├──  gulpfile.js
├──  karma.conf.js
├──  package.json
├──  protractor.conf.js

License

Angular Seed is licensed under the MIT License.

angular-gulp-seed's People

Contributors

pauloluan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

angular-gulp-seed's Issues

Use a proxy instead of the localhost URL

I've tried altering the gulp file to use a proxy instead of the baseDir and server options, but I haven't had any luck. Can you provide direction on how to use a proxy with this seed project?

gulp task to build without optimizing

Hi,

We are using this boilerplate project which got quite big. I am trying to adapt the gulp build process so that it does everything needed to run the site from a webserver but with as less compression/minification/concatenation as possible. Kind of what gulp serve does but from an actually built site.

I would call this something like gulp build:debug or gulp build:plain.

Being not a FE/agunluar/gulp expert I haven't figured this out yet.. I wonder if you might be able to help.

Thanks!

css files

First of all, thank you for providing this repository, it seems like a great starting point.

I have a question, it's quite unclear to me where css files should be located for automatic injection, any insight in the matter would be greatly appreciated

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.