Move source code to src/ to keep main directory less cluttered

This commit is contained in:
Ran Benita
2017-09-12 20:05:04 +03:00
parent d1888e7546
commit 8f8e50687f
16 changed files with 10 additions and 8 deletions
+2
View File
@@ -1,5 +1,7 @@
## UNRELEASED ## UNRELEASED
* Require node>=4.0.0. * Require node>=4.0.0.
* Reorganize internal directory structure. The main file moved to
`src/ng-annotate-main.js`.
## v1.6.0 2017-05-28 ## v1.6.0 2017-05-28
* Switch from tilde ~ dependencies to ^ caret dependencies. * Switch from tilde ~ dependencies to ^ caret dependencies.
+2 -2
View File
@@ -29,13 +29,13 @@ controllers, etc.) with a new name when declared and referenced through annotati
Use it like this: `--rename oldname1 newname1 oldname2 newname2` Use it like this: `--rename oldname1 newname1 oldname2 newname2`
*experimental* Use the `--plugin` option to load a user plugin with the provided path, *experimental* Use the `--plugin` option to load a user plugin with the provided path,
1.x may change API). See [plugin-example.js](plugin-example.js) for more info. 1.x may change API). See [plugin-example.js](examples/plugin-example.js) for more info.
*experimental* Use the `--stats` option to print statistics on stderr. *experimental* Use the `--stats` option to print statistics on stderr.
## Library (API) ## Library (API)
ng-annotate can be used as a library. See [ng-annotate.js](ng-annotate.js) for further info about ng-annotate can be used as a library. See [ng-annotate.js](src/ng-annotate.js) for further info about
options and return value. options and return value.
```js ```js
+1 -1
View File
@@ -1,2 +1,2 @@
#!/usr/bin/env node #!/usr/bin/env node
require("./ng-annotate.js"); require("./src/ng-annotate.js");
+2 -2
View File
@@ -2,7 +2,7 @@
"name": "ng-annotate-patched", "name": "ng-annotate-patched",
"version": "1.6.0", "version": "1.6.0",
"description": "add, remove and rebuild angularjs dependency injection annotations", "description": "add, remove and rebuild angularjs dependency injection annotations",
"main": "ng-annotate-main.js", "main": "src/ng-annotate-main.js",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/bluetech/ng-annotate-patched.git" "url": "https://github.com/bluetech/ng-annotate-patched.git"
@@ -37,7 +37,7 @@
"transformation" "transformation"
], ],
"scripts": { "scripts": {
"test": "node run-tests" "test": "node tests/run-tests"
}, },
"bin": "./ng-annotate", "bin": "./ng-annotate",
"author": "Olov Lassus <olov.lassus@gmail.com>", "author": "Olov Lassus <olov.lassus@gmail.com>",
View File
+1 -1
View File
@@ -9,7 +9,7 @@ const fs = require("fs");
const fmt = require("simple-fmt"); const fmt = require("simple-fmt");
const tryor = require("tryor"); const tryor = require("tryor");
const ngAnnotate = require("./ng-annotate-main"); const ngAnnotate = require("./ng-annotate-main");
const version = require("./package.json").version; const version = require("../package.json").version;
const optimist = require("optimist") const optimist = require("optimist")
.usage("ng-annotate v" + version + "\n\nUsage: ng-annotate OPTIONS <file>\n\n" + .usage("ng-annotate v" + version + "\n\nUsage: ng-annotate OPTIONS <file>\n\n" +
"provide - instead of <file> to read from stdin\n" + "provide - instead of <file> to read from stdin\n" +
View File
View File
View File
View File
+2 -2
View File
@@ -4,7 +4,7 @@
"use strict"; "use strict";
const ngAnnotate = require("./ng-annotate-main"); const ngAnnotate = require("../src/ng-annotate-main");
const fs = require("fs"); const fs = require("fs");
const os = require("os"); const os = require("os");
const path = require("path"); const path = require("path");
@@ -16,7 +16,7 @@ const coffee = require("coffee-script");
const convertSourceMap = require("convert-source-map"); const convertSourceMap = require("convert-source-map");
// optionals // optionals
const ngAnnotateAdfPlugin = require("./optionals/angular-dashboard-framework.js"); const ngAnnotateAdfPlugin = require("../src/optionals/angular-dashboard-framework.js");
function slurp(filename) { function slurp(filename) {
return String(fs.readFileSync(filename)); return String(fs.readFileSync(filename));