add travis
This commit is contained in:
parent
2d4b445377
commit
cfcf49b154
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
.idea/
|
||||||
|
coverage/
|
||||||
|
node_modules
|
||||||
|
|
11
.travis.yml
Normal file
11
.travis.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- 'stable'
|
||||||
|
deploy:
|
||||||
|
provider: npm
|
||||||
|
email: npm@lossless.digital
|
||||||
|
api_key:
|
||||||
|
secure: G2ZQYeDEokGCWQcXeT9SJ4aUF0uZ41B1kM9WD7hZKMGM5hzbGSTXjd/bLWf2HfujvN9FWQYVv0y5OpbRck4xTuEDBPmC5AqXCfrtNj77n151VLO0cF4+Ya1l8OQWvw13hX+cux8UfxRVHUAxUt7CoW3q6FBO/vt1Mvo9u9ucxKdB4QHXmPdq8TwuFusPJYC+l2LdWiaSCEz2LpnyrDf6OjLl2Bt+8rID3Ikbi+5yXWv/n7bfiXyIlpJX/i4Efh/mqsSWp+ziVWaSdKdpYMFPxqyOfqQ/kjbzLCwdR72cD3+UoJPdGQ46Vq3ncZRq3KighWkYRzN76EOTI/quzfcAoz5CekETPh419lPuqs2w8wEeE2oP0yCCSH1SG1ljH8ASrADWsoHzWyVa8c/ovzWMOc3hgLey6xgbYVar0sC94bjjqJh8Y5qOak4idOpI/SXf0UT1TkirZTGfdSgRzg/E1Zqj262sxLeIv0yHsbnzgwUduj6PjfLztgLVAGO13csxksUSiKxT8Mbbqozv1sdz/0SgoZTMYfZSO5kYdBCqguJkJdEj1Dr4tM/0ca+mugHibavQxPJiWqnfNqxdlmywpzPHPHe5G2wzba2W62l3yPHF4rJBJuUi35ddWWOkAN1g9D2NHlByWfqF+WYRuTv1DPlw7ZpmgEVPPUlBPhC5YO8=
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
repo: pushrocks/projectinfo
|
9
dist/index.js
vendored
Normal file
9
dist/index.js
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
//import classes
|
||||||
|
var ProjectinfoNPM = require("./projectinfo.npm");
|
||||||
|
var projectinfo = {};
|
||||||
|
projectinfo.npm = function (cwdArg) {
|
||||||
|
return new ProjectinfoNPM(cwdArg);
|
||||||
|
};
|
||||||
|
module.exports = projectinfo;
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLGdCQUFnQjtBQUNoQixJQUFPLGNBQWMsV0FBVyxtQkFBbUIsQ0FBQyxDQUFDO0FBRXJELElBQUksV0FBVyxHQUFPLEVBQUUsQ0FBQztBQUV6QixXQUFXLENBQUMsR0FBRyxHQUFHLFVBQVMsTUFBTTtJQUM3QixNQUFNLENBQUMsSUFBSSxjQUFjLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDdEMsQ0FBQyxDQUFDO0FBWUYsaUJBQVMsV0FBVyxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxuaW1wb3J0IHBsdWdpbnMgPSByZXF1aXJlKFwiLi9wcm9qZWN0aW5mby5wbHVnaW5zXCIpO1xuXG4vL2ltcG9ydCBjbGFzc2VzXG5pbXBvcnQgUHJvamVjdGluZm9OUE0gPSByZXF1aXJlKFwiLi9wcm9qZWN0aW5mby5ucG1cIik7XG5cbnZhciBwcm9qZWN0aW5mbzphbnkgPSB7fTtcblxucHJvamVjdGluZm8ubnBtID0gZnVuY3Rpb24oY3dkQXJnKXtcbiAgICByZXR1cm4gbmV3IFByb2plY3RpbmZvTlBNKGN3ZEFyZyk7XG59O1xuXG4vKiBUT0RPXG5wcm9qZWN0aW5mby5naXQgPSBmdW5jdGlvbigpe1xuXG59O1xuXG5wcm9qZWN0aW5mby5tb2pvID0gZnVuY3Rpb24oKXtcblxufTtcbiovXG5cbmV4cG9ydCA9IHByb2plY3RpbmZvOyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
|
13
dist/projectinfo.npm.js
vendored
Normal file
13
dist/projectinfo.npm.js
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
var plugins = require("./projectinfo.plugins");
|
||||||
|
var ProjectinfoNPM = (function () {
|
||||||
|
function ProjectinfoNPM(cwdArg) {
|
||||||
|
this.packageJson = plugins.smartfile.readFileToObject(plugins.path.join(plugins.path.resolve(cwdArg), "package.json"));
|
||||||
|
this.name = this.packageJson.name;
|
||||||
|
this.version = this.packageJson.version;
|
||||||
|
}
|
||||||
|
return ProjectinfoNPM;
|
||||||
|
})();
|
||||||
|
module.exports = ProjectinfoNPM;
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByb2plY3RpbmZvLm5wbS50cyJdLCJuYW1lcyI6WyJQcm9qZWN0aW5mb05QTSIsIlByb2plY3RpbmZvTlBNLmNvbnN0cnVjdG9yIl0sIm1hcHBpbmdzIjoiQUFBQSw0Q0FBNEM7QUFDNUMsSUFBTyxPQUFPLFdBQVcsdUJBQXVCLENBQUMsQ0FBQztBQUNsRDtJQUtJQSx3QkFBWUEsTUFBTUE7UUFDZEMsSUFBSUEsQ0FBQ0EsV0FBV0EsR0FBR0EsT0FBT0EsQ0FBQ0EsU0FBU0EsQ0FBQ0EsZ0JBQWdCQSxDQUNqREEsT0FBT0EsQ0FBQ0EsSUFBSUEsQ0FBQ0EsSUFBSUEsQ0FDYkEsT0FBT0EsQ0FBQ0EsSUFBSUEsQ0FBQ0EsT0FBT0EsQ0FBQ0EsTUFBTUEsQ0FBQ0EsRUFDNUJBLGNBQWNBLENBQ2pCQSxDQUNKQSxDQUFDQTtRQUNGQSxJQUFJQ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9
|
9
dist/projectinfo.plugins.js
vendored
Normal file
9
dist/projectinfo.plugins.js
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
var plugins = {
|
||||||
|
path: require("path"),
|
||||||
|
Q: require("q"),
|
||||||
|
smartfile: require("smartfile")
|
||||||
|
};
|
||||||
|
module.exports = plugins;
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByb2plY3RpbmZvLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsNENBQTRDO0FBQzVDLElBQUksT0FBTyxHQUFHO0lBQ1YsSUFBSSxFQUFFLE9BQU8sQ0FBQyxNQUFNLENBQUM7SUFDckIsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUM7SUFDZixTQUFTLEVBQUUsT0FBTyxDQUFDLFdBQVcsQ0FBQztDQUNsQyxDQUFDO0FBRUYsaUJBQVMsT0FBTyxDQUFDIiwiZmlsZSI6InByb2plY3RpbmZvLnBsdWdpbnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XG52YXIgcGx1Z2lucyA9IHtcbiAgICBwYXRoOiByZXF1aXJlKFwicGF0aFwiKSxcbiAgICBROiByZXF1aXJlKFwicVwiKSxcbiAgICBzbWFydGZpbGU6IHJlcXVpcmUoXCJzbWFydGZpbGVcIilcbn07XG5cbmV4cG9ydCA9IHBsdWdpbnM7Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
34
package.json
Normal file
34
package.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"name": "projectinfo",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "gather information about projects. supports npm, git etc.",
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "(npmts)"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/pushrocks/projectinfo.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"project",
|
||||||
|
"npm",
|
||||||
|
"git",
|
||||||
|
"info",
|
||||||
|
"package"
|
||||||
|
],
|
||||||
|
"author": "Lossless GmbH",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/pushrocks/projectinfo/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/pushrocks/projectinfo#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"npmts": "^3.1.2",
|
||||||
|
"should": "^8.2.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"q": "^1.4.1",
|
||||||
|
"smartfile": "0.0.11"
|
||||||
|
}
|
||||||
|
}
|
11
test/package.json
Normal file
11
test/package.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "testpackage",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "some test",
|
||||||
|
"main": "test.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "Lossless GmbH",
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
26
test/test.js
Normal file
26
test/test.js
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/// <reference path="../ts/typings/main.d.ts" />
|
||||||
|
var projectinfo = require("../dist/index.js");
|
||||||
|
var should = require("should");
|
||||||
|
var path = require("path");
|
||||||
|
var testBasePath = path.resolve(__dirname);
|
||||||
|
describe("projectinfo", function () {
|
||||||
|
describe(".npm() return", function () {
|
||||||
|
var myNpm = projectinfo.npm(testBasePath);
|
||||||
|
it("should have .packageJson", function () {
|
||||||
|
myNpm.packageJson
|
||||||
|
.should.have.property("version", "1.0.0");
|
||||||
|
myNpm.packageJson
|
||||||
|
.should.have.property("name", "testpackage");
|
||||||
|
});
|
||||||
|
it("should have .version", function () {
|
||||||
|
myNpm
|
||||||
|
.should.have.property("name", "testpackage");
|
||||||
|
});
|
||||||
|
it("should have .name", function () {
|
||||||
|
myNpm
|
||||||
|
.should.have.property("name", "testpackage");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksV0FBVyxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQzlDLElBQUksTUFBTSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMvQixJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDM0IsSUFBSSxZQUFZLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztBQUUzQyxRQUFRLENBQUMsYUFBYSxFQUFDO0lBQ25CLFFBQVEsQ0FBQyxlQUFlLEVBQUM7UUFDckIsSUFBSSxLQUFLLEdBQUcsV0FBVyxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsQ0FBQztRQUMxQyxFQUFFLENBQUMsMEJBQTBCLEVBQUM7WUFDMUIsS0FBSyxDQUFDLFdBQVc7aUJBQ2IsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsU0FBUyxFQUFDLE9BQU8sQ0FBQyxDQUFDO1lBQzVDLEtBQUssQ0FBQyxXQUFXO2lCQUNiLE1BQU0sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLE1BQU0sRUFBQyxhQUFhLENBQUMsQ0FBQztRQUNuRCxDQUFDLENBQUMsQ0FBQztRQUVILEVBQUUsQ0FBQyxzQkFBc0IsRUFBQztZQUN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uXG4gICAgICAgICAgICAgICAuc2hvdWxkLmhhdmUucHJvcGVydHkoXCJuYW1lXCIsXCJ0ZXN0cGFja2FnZVwiKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgaXQoXCJzaG91bGQgaGF2ZSAudmVyc2lvblwiLGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICBteU5wbVxuICAgICAgICAgICAgICAgIC5zaG91bGQuaGF2ZS5wcm9wZXJ0eShcIm5hbWVcIixcInRlc3RwYWNrYWdlXCIpXG4gICAgICAgIH0pO1xuXG4gICAgICAgIGl0KFwic2hvdWxkIGhhdmUgLm5hbWVcIixmdW5jdGlvbigpe1xuICAgICAgICAgICAgbXlOcG1cbiAgICAgICAgICAgICAgICAuc2hvdWxkLmhhdmUucHJvcGVydHkoXCJuYW1lXCIsXCJ0ZXN0cGFja2FnZVwiKTtcbiAgICAgICAgfSlcblxuICAgIH0pO1xufSk7Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
1
test/test.js.map
Normal file
1
test/test.js.map
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,IAAI,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/B,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC3B,IAAI,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAE3C,QAAQ,CAAC,aAAa,EAAC;IACnB,QAAQ,CAAC,eAAe,EAAC;QACrB,IAAI,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC1C,EAAE,CAAC,0BAA0B,EAAC;YAC1B,KAAK,CAAC,WAAW;iBACb,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAC,OAAO,CAAC,CAAC;YAC5C,KAAK,CAAC,WAAW;iBACb,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAC,aAAa,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,sBAAsB,EAAC;YACtB,KAAK;iBACA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAC,aAAa,CAAC,CAAA;QACnD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mBAAmB,EAAC;YACnB,KAAK;iBACA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAC,aAAa,CAAC,CAAC;QACpD,CAAC,CAAC,CAAA;IAEN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
28
test/test.ts
Normal file
28
test/test.ts
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/// <reference path="../ts/typings/main.d.ts" />
|
||||||
|
var projectinfo = require("../dist/index.js");
|
||||||
|
var should = require("should");
|
||||||
|
var path = require("path");
|
||||||
|
var testBasePath = path.resolve(__dirname);
|
||||||
|
|
||||||
|
describe("projectinfo",function(){
|
||||||
|
describe(".npm() return",function(){
|
||||||
|
var myNpm = projectinfo.npm(testBasePath);
|
||||||
|
it("should have .packageJson",function(){
|
||||||
|
myNpm.packageJson
|
||||||
|
.should.have.property("version","1.0.0");
|
||||||
|
myNpm.packageJson
|
||||||
|
.should.have.property("name","testpackage");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should have .version",function(){
|
||||||
|
myNpm
|
||||||
|
.should.have.property("name","testpackage")
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should have .name",function(){
|
||||||
|
myNpm
|
||||||
|
.should.have.property("name","testpackage");
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
8
ts/index.js
Normal file
8
ts/index.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//import classes
|
||||||
|
var ProjectinfoNPM = require("./projectinfo.npm");
|
||||||
|
var projectinfo = {};
|
||||||
|
projectinfo.npm = function (cwdArg) {
|
||||||
|
return new ProjectinfoNPM(cwdArg);
|
||||||
|
};
|
||||||
|
module.exports = projectinfo;
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
ts/index.js.map
Normal file
1
ts/index.js.map
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,gBAAgB;AAChB,IAAO,cAAc,WAAW,mBAAmB,CAAC,CAAC;AAErD,IAAI,WAAW,GAAO,EAAE,CAAC;AAEzB,WAAW,CAAC,GAAG,GAAG,UAAS,MAAM;IAC7B,MAAM,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC,CAAC;AAYF,iBAAS,WAAW,CAAC"}
|
23
ts/index.ts
Normal file
23
ts/index.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
import plugins = require("./projectinfo.plugins");
|
||||||
|
|
||||||
|
//import classes
|
||||||
|
import ProjectinfoNPM = require("./projectinfo.npm");
|
||||||
|
|
||||||
|
var projectinfo:any = {};
|
||||||
|
|
||||||
|
projectinfo.npm = function(cwdArg){
|
||||||
|
return new ProjectinfoNPM(cwdArg);
|
||||||
|
};
|
||||||
|
|
||||||
|
/* TODO
|
||||||
|
projectinfo.git = function(){
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
projectinfo.mojo = function(){
|
||||||
|
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
export = projectinfo;
|
12
ts/projectinfo.npm.js
Normal file
12
ts/projectinfo.npm.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
var plugins = require("./projectinfo.plugins");
|
||||||
|
var ProjectinfoNPM = (function () {
|
||||||
|
function ProjectinfoNPM(cwdArg) {
|
||||||
|
this.packageJson = plugins.smartfile.readFileToObject(plugins.path.join(plugins.path.resolve(cwdArg), "package.json"));
|
||||||
|
this.name = this.packageJson.name;
|
||||||
|
this.version = this.packageJson.version;
|
||||||
|
}
|
||||||
|
return ProjectinfoNPM;
|
||||||
|
})();
|
||||||
|
module.exports = ProjectinfoNPM;
|
||||||
|
//# sourceMappingURL=projectinfo.npm.js.map
|
1
ts/projectinfo.npm.js.map
Normal file
1
ts/projectinfo.npm.js.map
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"projectinfo.npm.js","sourceRoot":"","sources":["projectinfo.npm.ts"],"names":["ProjectinfoNPM","ProjectinfoNPM.constructor"],"mappings":"AAAA,4CAA4C;AAC5C,IAAO,OAAO,WAAW,uBAAuB,CAAC,CAAC;AAClD;IAKIA,wBAAYA,MAAMA;QACdC,IAAIA,CAACA,WAAWA,GAAGA,OAAOA,CAACA,SAASA,CAACA,gBAAgBA,CACjDA,OAAOA,CAACA,IAAIA,CAACA,IAAIA,CACbA,OAAOA,CAACA,IAAIA,CAACA,OAAOA,CAACA,MAAMA,CAACA,EAC5BA,cAAcA,CACjBA,CACJA,CAACA;QACFA,IAAIA,CAACA,IAAIA,GAAGA,IAAIA,CAACA,WAAWA,CAACA,IAAIA,CAACA;QAClCA,IAAIA,CAACA,OAAOA,GAAGA,IAAIA,CAACA,WAAWA,CAACA,OAAOA,CAACA;IAC5CA,CAACA;IACLD,qBAACA;AAADA,CAACA,AAfD,IAeC;AAED,iBAAS,cAAc,CAAC"}
|
20
ts/projectinfo.npm.ts
Normal file
20
ts/projectinfo.npm.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
import plugins = require("./projectinfo.plugins");
|
||||||
|
class ProjectinfoNPM {
|
||||||
|
packageJson;
|
||||||
|
name:string;
|
||||||
|
version:string;
|
||||||
|
|
||||||
|
constructor(cwdArg){
|
||||||
|
this.packageJson = plugins.smartfile.readFileToObject(
|
||||||
|
plugins.path.join(
|
||||||
|
plugins.path.resolve(cwdArg),
|
||||||
|
"package.json"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
this.name = this.packageJson.name;
|
||||||
|
this.version = this.packageJson.version;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ProjectinfoNPM;
|
8
ts/projectinfo.plugins.js
Normal file
8
ts/projectinfo.plugins.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
var plugins = {
|
||||||
|
path: require("path"),
|
||||||
|
Q: require("q"),
|
||||||
|
smartfile: require("smartfile")
|
||||||
|
};
|
||||||
|
module.exports = plugins;
|
||||||
|
//# sourceMappingURL=projectinfo.plugins.js.map
|
1
ts/projectinfo.plugins.js.map
Normal file
1
ts/projectinfo.plugins.js.map
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"projectinfo.plugins.js","sourceRoot":"","sources":["projectinfo.plugins.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,IAAI,OAAO,GAAG;IACV,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;IACrB,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC;IACf,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC;CAClC,CAAC;AAEF,iBAAS,OAAO,CAAC"}
|
8
ts/projectinfo.plugins.ts
Normal file
8
ts/projectinfo.plugins.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
|
var plugins = {
|
||||||
|
path: require("path"),
|
||||||
|
Q: require("q"),
|
||||||
|
smartfile: require("smartfile")
|
||||||
|
};
|
||||||
|
|
||||||
|
export = plugins;
|
7
ts/typings.json
Normal file
7
ts/typings.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"ambientDependencies": {
|
||||||
|
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts",
|
||||||
|
"mocha": "github:Bartvds/tsd-deftools/typings/DefinitelyTyped/mocha/mocha.d.ts",
|
||||||
|
"colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts"
|
||||||
|
}
|
||||||
|
}
|
3
ts/typings/browser.d.ts
vendored
Normal file
3
ts/typings/browser.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/// <reference path="browser/ambient/colors/colors.d.ts" />
|
||||||
|
/// <reference path="browser/ambient/mocha/mocha.d.ts" />
|
||||||
|
/// <reference path="browser/ambient/node/node.d.ts" />
|
125
ts/typings/browser/ambient/colors/colors.d.ts
vendored
Normal file
125
ts/typings/browser/ambient/colors/colors.d.ts
vendored
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
// Compiled using typings@0.6.8
|
||||||
|
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/colors/colors.d.ts
|
||||||
|
// Type definitions for Colors.js 0.6.0-1
|
||||||
|
// Project: https://github.com/Marak/colors.js
|
||||||
|
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||||
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||||
|
|
||||||
|
declare module "colors" {
|
||||||
|
interface Color {
|
||||||
|
(text: string): string;
|
||||||
|
|
||||||
|
black: Color;
|
||||||
|
red: Color;
|
||||||
|
green: Color;
|
||||||
|
yellow: Color;
|
||||||
|
blue: Color;
|
||||||
|
magenta: Color;
|
||||||
|
cyan: Color;
|
||||||
|
white: Color;
|
||||||
|
gray: Color;
|
||||||
|
grey: Color;
|
||||||
|
|
||||||
|
bgBlack: Color;
|
||||||
|
bgRed: Color;
|
||||||
|
bgGreen: Color;
|
||||||
|
bgYellow: Color;
|
||||||
|
bgBlue: Color;
|
||||||
|
bgMagenta: Color;
|
||||||
|
bgCyan: Color;
|
||||||
|
bgWhite: Color;
|
||||||
|
|
||||||
|
reset: Color;
|
||||||
|
bold: Color;
|
||||||
|
dim: Color;
|
||||||
|
italic: Color;
|
||||||
|
underline: Color;
|
||||||
|
inverse: Color;
|
||||||
|
hidden: Color;
|
||||||
|
strikethrough: Color;
|
||||||
|
|
||||||
|
rainbow: Color;
|
||||||
|
zebra: Color;
|
||||||
|
america: Color;
|
||||||
|
trap: Color;
|
||||||
|
random: Color;
|
||||||
|
}
|
||||||
|
|
||||||
|
module e {
|
||||||
|
export function setTheme(theme:any): void;
|
||||||
|
|
||||||
|
export var black: Color;
|
||||||
|
export var red: Color;
|
||||||
|
export var green: Color;
|
||||||
|
export var yellow: Color;
|
||||||
|
export var blue: Color;
|
||||||
|
export var magenta: Color;
|
||||||
|
export var cyan: Color;
|
||||||
|
export var white: Color;
|
||||||
|
export var gray: Color;
|
||||||
|
export var grey: Color;
|
||||||
|
|
||||||
|
export var bgBlack: Color;
|
||||||
|
export var bgRed: Color;
|
||||||
|
export var bgGreen: Color;
|
||||||
|
export var bgYellow: Color;
|
||||||
|
export var bgBlue: Color;
|
||||||
|
export var bgMagenta: Color;
|
||||||
|
export var bgCyan: Color;
|
||||||
|
export var bgWhite: Color;
|
||||||
|
|
||||||
|
export var reset: Color;
|
||||||
|
export var bold: Color;
|
||||||
|
export var dim: Color;
|
||||||
|
export var italic: Color;
|
||||||
|
export var underline: Color;
|
||||||
|
export var inverse: Color;
|
||||||
|
export var hidden: Color;
|
||||||
|
export var strikethrough: Color;
|
||||||
|
|
||||||
|
export var rainbow: Color;
|
||||||
|
export var zebra: Color;
|
||||||
|
export var america: Color;
|
||||||
|
export var trap: Color;
|
||||||
|
export var random: Color;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = e;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface String {
|
||||||
|
black: string;
|
||||||
|
red: string;
|
||||||
|
green: string;
|
||||||
|
yellow: string;
|
||||||
|
blue: string;
|
||||||
|
magenta: string;
|
||||||
|
cyan: string;
|
||||||
|
white: string;
|
||||||
|
gray: string;
|
||||||
|
grey: string;
|
||||||
|
|
||||||
|
bgBlack: string;
|
||||||
|
bgRed: string;
|
||||||
|
bgGreen: string;
|
||||||
|
bgYellow: string;
|
||||||
|
bgBlue: string;
|
||||||
|
bgMagenta: string;
|
||||||
|
bgCyan: string;
|
||||||
|
bgWhite: string;
|
||||||
|
|
||||||
|
reset: string;
|
||||||
|
bold: string;
|
||||||
|
dim: string;
|
||||||
|
italic: string;
|
||||||
|
underline: string;
|
||||||
|
inverse: string;
|
||||||
|
hidden: string;
|
||||||
|
strikethrough: string;
|
||||||
|
|
||||||
|
rainbow: string;
|
||||||
|
zebra: string;
|
||||||
|
america: string;
|
||||||
|
trap: string;
|
||||||
|
random: string;
|
||||||
|
}
|
40
ts/typings/browser/ambient/mocha/mocha.d.ts
vendored
Normal file
40
ts/typings/browser/ambient/mocha/mocha.d.ts
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Compiled using typings@0.6.8
|
||||||
|
// Source: https://raw.githubusercontent.com/Bartvds/tsd-deftools/master/typings/DefinitelyTyped/mocha/mocha.d.ts
|
||||||
|
// Type definitions for mocha 1.9.0
|
||||||
|
// Project: http://visionmedia.github.io/mocha/
|
||||||
|
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
|
||||||
|
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
|
||||||
|
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
|
||||||
|
|
||||||
|
declare var describe : {
|
||||||
|
(description: string, spec: () => void): void;
|
||||||
|
only(description: string, spec: () => void): void;
|
||||||
|
skip(description: string, spec: () => void): void;
|
||||||
|
timeout(ms: number);
|
||||||
|
}
|
||||||
|
|
||||||
|
declare var it: {
|
||||||
|
(expectation: string, assertion?: () => void): void;
|
||||||
|
(expectation: string, assertion?: (done: () => void) => void): void;
|
||||||
|
only(expectation: string, assertion?: () => void): void;
|
||||||
|
only(expectation: string, assertion?: (done: () => void) => void): void;
|
||||||
|
skip(expectation: string, assertion?: () => void): void;
|
||||||
|
skip(expectation: string, assertion?: (done: () => void) => void): void;
|
||||||
|
timeout(ms: number);
|
||||||
|
};
|
||||||
|
|
||||||
|
declare function before(action: () => void): void;
|
||||||
|
|
||||||
|
declare function before(action: (done: () => void) => void): void;
|
||||||
|
|
||||||
|
declare function aftet(action: () => void): void;
|
||||||
|
|
||||||
|
declare function after(action: (done: () => void) => void): void;
|
||||||
|
|
||||||
|
declare function beforeEach(action: () => void): void;
|
||||||
|
|
||||||
|
declare function beforeEach(action: (done: () => void) => void): void;
|
||||||
|
|
||||||
|
declare function afterEach(action: () => void): void;
|
||||||
|
|
||||||
|
declare function afterEach(action: (done: () => void) => void): void;
|
2196
ts/typings/browser/ambient/node/node.d.ts
vendored
Normal file
2196
ts/typings/browser/ambient/node/node.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
ts/typings/main.d.ts
vendored
Normal file
3
ts/typings/main.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/// <reference path="main/ambient/colors/colors.d.ts" />
|
||||||
|
/// <reference path="main/ambient/mocha/mocha.d.ts" />
|
||||||
|
/// <reference path="main/ambient/node/node.d.ts" />
|
125
ts/typings/main/ambient/colors/colors.d.ts
vendored
Normal file
125
ts/typings/main/ambient/colors/colors.d.ts
vendored
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
// Compiled using typings@0.6.8
|
||||||
|
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/colors/colors.d.ts
|
||||||
|
// Type definitions for Colors.js 0.6.0-1
|
||||||
|
// Project: https://github.com/Marak/colors.js
|
||||||
|
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||||
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||||
|
|
||||||
|
declare module "colors" {
|
||||||
|
interface Color {
|
||||||
|
(text: string): string;
|
||||||
|
|
||||||
|
black: Color;
|
||||||
|
red: Color;
|
||||||
|
green: Color;
|
||||||
|
yellow: Color;
|
||||||
|
blue: Color;
|
||||||
|
magenta: Color;
|
||||||
|
cyan: Color;
|
||||||
|
white: Color;
|
||||||
|
gray: Color;
|
||||||
|
grey: Color;
|
||||||
|
|
||||||
|
bgBlack: Color;
|
||||||
|
bgRed: Color;
|
||||||
|
bgGreen: Color;
|
||||||
|
bgYellow: Color;
|
||||||
|
bgBlue: Color;
|
||||||
|
bgMagenta: Color;
|
||||||
|
bgCyan: Color;
|
||||||
|
bgWhite: Color;
|
||||||
|
|
||||||
|
reset: Color;
|
||||||
|
bold: Color;
|
||||||
|
dim: Color;
|
||||||
|
italic: Color;
|
||||||
|
underline: Color;
|
||||||
|
inverse: Color;
|
||||||
|
hidden: Color;
|
||||||
|
strikethrough: Color;
|
||||||
|
|
||||||
|
rainbow: Color;
|
||||||
|
zebra: Color;
|
||||||
|
america: Color;
|
||||||
|
trap: Color;
|
||||||
|
random: Color;
|
||||||
|
}
|
||||||
|
|
||||||
|
module e {
|
||||||
|
export function setTheme(theme:any): void;
|
||||||
|
|
||||||
|
export var black: Color;
|
||||||
|
export var red: Color;
|
||||||
|
export var green: Color;
|
||||||
|
export var yellow: Color;
|
||||||
|
export var blue: Color;
|
||||||
|
export var magenta: Color;
|
||||||
|
export var cyan: Color;
|
||||||
|
export var white: Color;
|
||||||
|
export var gray: Color;
|
||||||
|
export var grey: Color;
|
||||||
|
|
||||||
|
export var bgBlack: Color;
|
||||||
|
export var bgRed: Color;
|
||||||
|
export var bgGreen: Color;
|
||||||
|
export var bgYellow: Color;
|
||||||
|
export var bgBlue: Color;
|
||||||
|
export var bgMagenta: Color;
|
||||||
|
export var bgCyan: Color;
|
||||||
|
export var bgWhite: Color;
|
||||||
|
|
||||||
|
export var reset: Color;
|
||||||
|
export var bold: Color;
|
||||||
|
export var dim: Color;
|
||||||
|
export var italic: Color;
|
||||||
|
export var underline: Color;
|
||||||
|
export var inverse: Color;
|
||||||
|
export var hidden: Color;
|
||||||
|
export var strikethrough: Color;
|
||||||
|
|
||||||
|
export var rainbow: Color;
|
||||||
|
export var zebra: Color;
|
||||||
|
export var america: Color;
|
||||||
|
export var trap: Color;
|
||||||
|
export var random: Color;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = e;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface String {
|
||||||
|
black: string;
|
||||||
|
red: string;
|
||||||
|
green: string;
|
||||||
|
yellow: string;
|
||||||
|
blue: string;
|
||||||
|
magenta: string;
|
||||||
|
cyan: string;
|
||||||
|
white: string;
|
||||||
|
gray: string;
|
||||||
|
grey: string;
|
||||||
|
|
||||||
|
bgBlack: string;
|
||||||
|
bgRed: string;
|
||||||
|
bgGreen: string;
|
||||||
|
bgYellow: string;
|
||||||
|
bgBlue: string;
|
||||||
|
bgMagenta: string;
|
||||||
|
bgCyan: string;
|
||||||
|
bgWhite: string;
|
||||||
|
|
||||||
|
reset: string;
|
||||||
|
bold: string;
|
||||||
|
dim: string;
|
||||||
|
italic: string;
|
||||||
|
underline: string;
|
||||||
|
inverse: string;
|
||||||
|
hidden: string;
|
||||||
|
strikethrough: string;
|
||||||
|
|
||||||
|
rainbow: string;
|
||||||
|
zebra: string;
|
||||||
|
america: string;
|
||||||
|
trap: string;
|
||||||
|
random: string;
|
||||||
|
}
|
40
ts/typings/main/ambient/mocha/mocha.d.ts
vendored
Normal file
40
ts/typings/main/ambient/mocha/mocha.d.ts
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Compiled using typings@0.6.8
|
||||||
|
// Source: https://raw.githubusercontent.com/Bartvds/tsd-deftools/master/typings/DefinitelyTyped/mocha/mocha.d.ts
|
||||||
|
// Type definitions for mocha 1.9.0
|
||||||
|
// Project: http://visionmedia.github.io/mocha/
|
||||||
|
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
|
||||||
|
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
|
||||||
|
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
|
||||||
|
|
||||||
|
declare var describe : {
|
||||||
|
(description: string, spec: () => void): void;
|
||||||
|
only(description: string, spec: () => void): void;
|
||||||
|
skip(description: string, spec: () => void): void;
|
||||||
|
timeout(ms: number);
|
||||||
|
}
|
||||||
|
|
||||||
|
declare var it: {
|
||||||
|
(expectation: string, assertion?: () => void): void;
|
||||||
|
(expectation: string, assertion?: (done: () => void) => void): void;
|
||||||
|
only(expectation: string, assertion?: () => void): void;
|
||||||
|
only(expectation: string, assertion?: (done: () => void) => void): void;
|
||||||
|
skip(expectation: string, assertion?: () => void): void;
|
||||||
|
skip(expectation: string, assertion?: (done: () => void) => void): void;
|
||||||
|
timeout(ms: number);
|
||||||
|
};
|
||||||
|
|
||||||
|
declare function before(action: () => void): void;
|
||||||
|
|
||||||
|
declare function before(action: (done: () => void) => void): void;
|
||||||
|
|
||||||
|
declare function aftet(action: () => void): void;
|
||||||
|
|
||||||
|
declare function after(action: (done: () => void) => void): void;
|
||||||
|
|
||||||
|
declare function beforeEach(action: () => void): void;
|
||||||
|
|
||||||
|
declare function beforeEach(action: (done: () => void) => void): void;
|
||||||
|
|
||||||
|
declare function afterEach(action: () => void): void;
|
||||||
|
|
||||||
|
declare function afterEach(action: (done: () => void) => void): void;
|
2196
ts/typings/main/ambient/node/node.d.ts
vendored
Normal file
2196
ts/typings/main/ambient/node/node.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user