GithubHelp home page GithubHelp logo

mcalthrop / angular-spa-demo Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 19.0 709 KB

Demo code for a Single Page Application using AngularJS

License: MIT License

JavaScript 83.16% Shell 0.29% CSS 4.17% HTML 12.35% ApacheConf 0.03%
angularjs demo jasmine javascript spa

angular-spa-demo's People

Contributors

mcalthrop avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

angular-spa-demo's Issues

The README doesn't explain how to 'run' the app, or see the docs

I'm particularly interested in the docs part as there are few working examples of ng-docs documentation. It generates the docs just fine, but you can't actually access them using local file browsing, they need to be served by a server. Please add to gruntfile a target for that.

Grunt build to use bower components

Currently, libraries are manually retrieved and copied into js/lib.
This process will change so that:

  • correct libraries and their versions (correct for current implementation) are specified in bower.json
  • Grunt build is modified so that it retrieves the necessary files from the relevant locations under bower_components, and copies them to the correct destination
  • index.html will be updated to reflect these locations
  • versions numbers in build/tasks/options/template.js will no longer be needed
    Note that the AngularJS code, currently at version 1.1.5, cannot be retrieved with bower because it is an unstable version; this github issue has more information.

Concat all JS files into a single file for prod build

Modify the build process so that for a prod build:

  • all JS files, including library files, are concatenated into a single file
  • this is included conditionally in index.html when the build is a prod build

And for a dev build:

  • index.html includes remain as they are, conditional on the build being a dev one

Add Protractor functionality

Scope: add protractor testing functionality to build process, including a minimal test suite to confirm it works on Travis.

angular-ui-bootstrap build

Once bower install && npm install was ran, now in bower_components/ all of the needed components where installed, ready to be used.

There was a small problem, though:
When running grunt dev, this was in the output:

Running "bowercopy:dev" (bowercopy) task
bower_components/angular/angular.js -> dist/dev/js/lib/angular.js
bower_components/angular-animate/angular-animate.js -> dist/dev/js/lib/angular-animate.js
bower_components/angular-resource/angular-resource.js -> dist/dev/js/lib/angular-resource.js
bower_components/angular-route/angular-route.js -> dist/dev/js/lib/angular-route.js
bower_components/angular-sanitize/angular-sanitize.js -> dist/dev/js/lib/angular-sanitize.js

bower_components/angular-ui-bootstrap/dist/ui-bootstrap-0.11.0.js was not found
bower_components/angular-ui-bootstrap/dist/ui-bootstrap-tpls-0.11.0.js was not found

The problem was that angular-ui-bootstrap did not have the dist/ folder.

I managed to solve this by running the following commands:

cd bower_components/angular-ui-bootstrap
npm install
grunt --force
cd ../../

Is there a better way of solving this problem?
Why did this not happen before? We are using the same versions of the library!

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.