Miss any of our Open RFC calls?Watch the recordings here! »

generator-acquisition-gateway

0.0.7 • Public • Published

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 () {
  // ...
});

Install

npm i generator-acquisition-gateway

DownloadsWeekly Downloads

0

Version

0.0.7

License

BSD-2-Clause

Unpacked Size

13 kB

Total Files

10

Last publish

Collaborators

  • avatar