3.0.1 • Published 4 years ago

gulp-ng-const v3.0.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
4 years ago

gulp-ng-const

Generates an angular.js 'constant' object from a JSON file.

This was originally created for a project that uses enums defined in an API that were required in an angular.js app

Arguments

ParamValue
inputJSON file to convert
moduleNameAngular.js module name
constantNameAngular.js constant name to be created
indentSizedefault 4
outputoutput filename

Example

gulp-ng-const --input=generated-json.json --output=generated.js --module=myApp

would generate a file with the following contents

(function() {
  angular.module("myApp").constant("GENERATED_CONSTANTS", {
    // your JSON content here
  });
})();
3.0.1

4 years ago

2.0.0

4 years ago

3.0.0

4 years ago

1.0.0

7 years ago