0.0.7 • Published 7 years ago

generator-acquisition-gateway v0.0.7

Weekly downloads
3
License
BSD-2-Clause
Repository
github
Last release
7 years ago

generator-acquisition-gateway

Getting Started

Using global

npm install -g yo - To install the Yeoman
npm install -g generator-acquisition-gateway - To install the generator
cd CAP-ACQUISITION_GATEWAY/hallways - To go to project root folder
yo acquisition-gateway - Sets the project root folder (creating the .yo-rc.json file)
yo acquisition-gateway:service name - Generates AngularJS service code

Generators

App

Sets the Project root

Service

Generates an AngularJS Service and test files. This is useful when a Singleton is needed.

Example:

yo acquisition-gateway:service my-singleton

Produces hallways/ag-app/app/scripts/components/services/my-singleton-service.js:

.service('MySingletonService', function () {
  // ...
});

Produces hallways/ag-app/app/scripts/components/services/tests/my-singleton-service_test.js:

describe('My Singleton Service', function () {
  // ...
});

Factory

Generates an AngularJS Factory. This factory returns a Factory function to instantiate a new instance of a service. This is useful when many instances of the same service are needed.

Example:

yo acquisition-gateway:factory my-factory

Produces hallways/ag-app/app/scripts/components/services/my-factory-service.js:

.factory('MyFactoryService', function () {
  
  // returns a factory function
  return function () {
    // ...
  }
  
});

Produces hallways/ag-app/app/scripts/components/services/tests/my-factory-service_test.js:

describe('My Factory Service', function () {
  // ...
});
0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago