now working
This commit is contained in:
parent
b3fc69631e
commit
d203149fd2
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
node_modules/
|
||||||
|
.settings/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
|
||||||
|
#npm devug
|
||||||
|
npm-debug.log
|
||||||
|
|
||||||
|
ts/*.js
|
||||||
|
ts/*.js.map
|
16
.travis.yml
Normal file
16
.travis.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- "4.1"
|
||||||
|
before_install:
|
||||||
|
- npm install -g tsd
|
||||||
|
deploy:
|
||||||
|
provider: npm
|
||||||
|
email: npm@smart-coordination.com
|
||||||
|
api_key:
|
||||||
|
secure: y7l1JyBDihAYxbqfuPAUXJfY+PC7RSSCkAtXtBIjPA6wytSBnz55te/Vdy8RFgVty6O/k4hHzrhgUJMSoWKmPuGQ5bMBgkyV9OI5PPp4uEUyy5UdcJZv3cZYpGGDRjLjCHP4pF7AHdRcDUMEiE5ZrDtmUH1SBLoRswieO0TKsiMr3u45yR6rHFoPnnw1YlatoAPpiuP3SLnCrIjQeSOS7y9SL6PpakiquJNtpseVOr60sp39L6vLAeqJ7xTjjNJk23LF/60lfiKtM7QFg9qqE7cxFUWJs7Zmgfg4/hGcU9XRfDfZQgSNntcdFczPejO5juv2KOb1tzH7EhXrWlcF1yd70RBdJbcOn7O6ctHjMCGrCSn6IQPzcNWNErFELfMLsjVQUxbfHSc0iA1JxcYWeXUivrStwVOa9ufuG2KZCQZyEjra3zPdCu9yrE30c/mTace7eJXPYTsNn2tmxvTnFoTWmeQ0xL9Iyz9zceADpxjYJoJ8r4XMDWxWga5G9OPaqCINHxjKhOX0C36YEjYTaeNMNHv6F6BPLdKwQ9SmklMtcyC312nJsXwKy+KYJSoY6WqMef9Zk3ez0o09W0UkSr0qiQkyYCoNm8b1L7VrYuccPH24GE0fn8QMWmeE5TBThYbEIdt6NBoYCDeocflUm5KBrImFGo1peeYS1aQnpoQ=
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
repo: pushrocks/gulp-bootstrap
|
||||||
|
notifications:
|
||||||
|
slack:
|
||||||
|
secure: f5Uss0z9RPl/QcA/DroB8loyE93aOYI6bqCkrsiUscmZtlv/TVQtT4dxqGA6uvcG6iTQDBi3Ul88dQxWkRm4IqbhY35/iMaV2dHW4FVYMAh8GQMbsfL2sALCcufxD9blw47awv3iFcwhV1EeyesscjgL0JIjduk96v/7G/6QIO2838M1lzlgtj+kRUkim8qkaEs1je3gRrhMUIjLuAdscMXyUKYFMjWo9ACSjVUl30R/ZNemb18itIja6i92GotreBgcfEMczvy58ovDC7xdJUsY8LjMI01DwY+WPRnI0tAhsuI8moBwwcdM4e3bAjKjucQRjO33O5bMWRZ6QCiYd0DnCEFyCPQLJ4GSy/tkD00n8ijLHAOSV3AH1zNbdK1EAdSPQXDvlI36KJn/2hyQLoitGHVUPr76ujJWP82ypO2tgIp3XQU0dJVCxDuHnwJO2+hjdI+gCPqxNTpjeujHx3UdkTGNRjuuf9dlZ/D08fApjYxy2fxItTqo3QjP/nrqvBXUOPP8yPHpjIT4H2t5Pr4SJjBGI6X4qhKyFj6s9rA/Xu1rL+45zu1C3uC3z+u3T9UwrbzJ/cZM6r6UQvQmUvIfBNaMlg4I/diQCDIPL+Rhop2nylY3IcHmJnk2itn7kOqj1tohCpFEml5pRuSZy4udWywkdtyBAsHWFLF7oiQ=
|
33
index.js
Normal file
33
index.js
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/// <reference path="./index.ts" />
|
||||||
|
var Check = (function () {
|
||||||
|
function Check(nameArg, resultArg) {
|
||||||
|
this.name = nameArg;
|
||||||
|
this.result = resultArg;
|
||||||
|
}
|
||||||
|
return Check;
|
||||||
|
})();
|
||||||
|
var CheckStorage = (function () {
|
||||||
|
function CheckStorage() {
|
||||||
|
this.checks = [];
|
||||||
|
}
|
||||||
|
CheckStorage.prototype.addCheck = function (name, result) {
|
||||||
|
var localCheck = new Check(name, result);
|
||||||
|
this.checks.push(localCheck);
|
||||||
|
};
|
||||||
|
CheckStorage.prototype.print = function () {
|
||||||
|
for (var check in this.checks) {
|
||||||
|
var localTable = beautylog.table.new("checks");
|
||||||
|
localTable.push([this.checks[check].name, this.checks[check].result]);
|
||||||
|
localTable.print();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return CheckStorage;
|
||||||
|
})();
|
||||||
|
/// <reference path="typings/tsd.d.ts" />
|
||||||
|
/// <reference path="./classes.ts" />
|
||||||
|
var beautylog = require("beautylog")("os");
|
||||||
|
var smartcheck = {};
|
||||||
|
smartcheck.newStorage = function () {
|
||||||
|
return new CheckStorage;
|
||||||
|
};
|
||||||
|
module.exports = smartcheck;
|
35
package.json
Normal file
35
package.json
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"name": "smartcheck",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "Make sure gulp and gulp-taypescript from npm are available. Then run the gulpfile in this directory.",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "(cd ts/compile && node compile.js) && (node test.js)",
|
||||||
|
"reinstall": "(rm -r node_modules && npm install)",
|
||||||
|
"release": "(npm test) && (git pull origin master && npm version patch && git push origin master && git checkout release && git merge master && git push origin release && git checkout master)",
|
||||||
|
"startdev": "(git checkout master && git pull origin master)"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/pushrocks/smartcheck.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"json",
|
||||||
|
"jade",
|
||||||
|
"template"
|
||||||
|
],
|
||||||
|
"author": "Smart Coordination GmbH <office@push.rocks> (https://push.rocks)",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/pushrocks/smartcheck/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/pushrocks/smartcheck",
|
||||||
|
"dependencies": {
|
||||||
|
"beautylog": "^1.0.4",
|
||||||
|
"pushrocks": "^1.0.23"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"gulp": "3.9.0",
|
||||||
|
"gulp-typescript": "2.9.2"
|
||||||
|
}
|
||||||
|
}
|
7
test.js
Normal file
7
test.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/// <reference path="typings/tsd.d.ts" />
|
||||||
|
var smartcheck = require("./index.js");
|
||||||
|
var pr = require("pushrocks");
|
||||||
|
var myCheckStorage = smartcheck.newStorage();
|
||||||
|
myCheckStorage.addCheck("Check1", "success");
|
||||||
|
myCheckStorage.print();
|
||||||
|
pr.beautylog.success("success");
|
27
ts/classes.ts
Normal file
27
ts/classes.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/// <reference path="./index.ts" />
|
||||||
|
class Check {
|
||||||
|
name:string;
|
||||||
|
result:string;
|
||||||
|
constructor(nameArg:string,resultArg:string){
|
||||||
|
this.name = nameArg;
|
||||||
|
this.result = resultArg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CheckStorage {
|
||||||
|
checks:Check[];
|
||||||
|
constructor() {
|
||||||
|
this.checks = [];
|
||||||
|
}
|
||||||
|
addCheck(name:string,result:string){
|
||||||
|
var localCheck = new Check(name,result);
|
||||||
|
this.checks.push(localCheck);
|
||||||
|
}
|
||||||
|
print() {
|
||||||
|
for (var check in this.checks){
|
||||||
|
var localTable = beautylog.table.new("checks");
|
||||||
|
localTable.push([this.checks[check].name,this.checks[check].result]);
|
||||||
|
localTable.print();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
ts/compile/compile.js
Normal file
30
ts/compile/compile.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// import gulp
|
||||||
|
var gulp = require("gulp")
|
||||||
|
var gulpTypescript = require("gulp-typescript");
|
||||||
|
var pr = require("pushrocks");
|
||||||
|
|
||||||
|
gulp.task('compileTS', function() {
|
||||||
|
var stream = gulp.src('../index.ts')
|
||||||
|
.pipe(gulpTypescript({
|
||||||
|
out: "index.js"
|
||||||
|
}))
|
||||||
|
.pipe(gulp.dest("../../"));
|
||||||
|
return stream;
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('compileTestTS', function() {
|
||||||
|
var stream = gulp.src('../test.ts')
|
||||||
|
.pipe(gulpTypescript({
|
||||||
|
out: "test.js"
|
||||||
|
}))
|
||||||
|
.pipe(gulp.dest("../../"));
|
||||||
|
return stream;
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('default',['compileTS','compileTestTS'], function() {
|
||||||
|
pr.beautylog.success('Typescript compiled');
|
||||||
|
});
|
||||||
|
|
||||||
|
//lets tell gulp to start with the default task.
|
||||||
|
pr.beautylog.log('Starting Gulp to compile TypeScript');
|
||||||
|
gulp.start.apply(gulp, ['default']);
|
2
ts/compile/readme.md
Normal file
2
ts/compile/readme.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# How to compile.
|
||||||
|
Make sure gulp and gulp-taypescript from npm are available. Then run the gulpfile in this directory.
|
10
ts/index.ts
Normal file
10
ts/index.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/// <reference path="typings/tsd.d.ts" />
|
||||||
|
/// <reference path="./classes.ts" />
|
||||||
|
var beautylog = require("beautylog")("os");
|
||||||
|
var smartcheck:any = {};
|
||||||
|
|
||||||
|
smartcheck.newStorage = function() {
|
||||||
|
return new CheckStorage;
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = smartcheck;
|
11
ts/test.ts
Normal file
11
ts/test.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/// <reference path="typings/tsd.d.ts" />
|
||||||
|
var smartcheck = require("./index.js");
|
||||||
|
var pr = require("pushrocks");
|
||||||
|
|
||||||
|
var myCheckStorage = smartcheck.newStorage();
|
||||||
|
|
||||||
|
myCheckStorage.addCheck("Check1","success");
|
||||||
|
myCheckStorage.print();
|
||||||
|
|
||||||
|
pr.beautylog.success("success");
|
||||||
|
|
12
ts/tsd.json
Normal file
12
ts/tsd.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"version": "v4",
|
||||||
|
"repo": "borisyankov/DefinitelyTyped",
|
||||||
|
"ref": "master",
|
||||||
|
"path": "typings",
|
||||||
|
"bundle": "typings/tsd.d.ts",
|
||||||
|
"installed": {
|
||||||
|
"node/node.d.ts": {
|
||||||
|
"commit": "efa0c1196d7280640e624ac1e7fa604502e7bd63"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2079
ts/typings/node/node.d.ts
vendored
Normal file
2079
ts/typings/node/node.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
ts/typings/tsd.d.ts
vendored
Normal file
1
ts/typings/tsd.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/// <reference path="node/node.d.ts" />
|
Loading…
Reference in New Issue
Block a user