Giter VIP home page Giter VIP logo

sample-4-angularjs-eclipse's Introduction

sample-4-angularjs-eclipse

##Install project

npm install
bower install

##Run project

grunt serve

Open the url http://localhost:9000/

Idea for using bower in angularjs-eclipse

Bower is a package manager for JS project. My idea is to use the bower.json and .bowerrc project files to know which scripts will be parse.

.bowerrc

Include informations about scripts location.

In this project, the root folder of depencies is : bower_components

{
  "directory": "bower_components"
}

bower.json

This file contains informations about dependencies to be parse and folders to find them. This informations are in the key "dependencies".

Example :

{
  "name": "sample4-angularjs-eclipse",
  "version": "0.0.0",
  "dependencies": {
    "jquery": "2.1.1",
    "angular": "1.3.0",
    "momentjs": "2.8.3"
  }
}

With the previous example, you can know that there are 3 dependencies. Each are store in the following folders :

  • bower_components/jquery
  • bower_components/angular
  • bower_components/momentjs

Notice that bower_components is in fact the information store in the .bowerrc file.

How to know which file is needed ?

In each folder above, there is a new bower.json file. When you open this file you will found something like this :

{
  "name": "moment",
  "version": "2.8.3",
  "main": "moment.js",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests",
    "tasks",
    "component.json",
    "composer.json",
    "CONTRIBUTING.md",
    "ender.js",
    "Gruntfile.js",
    "package.js",
    "package.json"
  ]
}

For each dependcy, files to be parse are indicates in the key "main". So for momentjs dependency, we need to parse file store in bower_components/momentjs/moment.js

By convention, these files are not minified.

You can found more informations at https://github.com/bower/bower.json-spec

sample-4-angularjs-eclipse's People

Contributors

jabby avatar

Watchers

James Cloos avatar  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.