fix(core): update
This commit is contained in:
@ -1,27 +0,0 @@
|
||||
/// <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() {
|
||||
var localTable = beautylog.table.new("checks");
|
||||
for (var check in this.checks){
|
||||
localTable.push([this.checks[check].name,this.checks[check].result]);
|
||||
}
|
||||
localTable.print();
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
// 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']);
|
@ -1,2 +0,0 @@
|
||||
# How to compile.
|
||||
Make sure gulp and gulp-taypescript from npm are available. Then run the gulpfile in this directory.
|
18
ts/index.ts
18
ts/index.ts
@ -1,10 +1,10 @@
|
||||
/// <reference path="typings/tsd.d.ts" />
|
||||
/// <reference path="./classes.ts" />
|
||||
var beautylog = require("beautylog")("os");
|
||||
var smartcheck:any = {};
|
||||
import * as plugins from './smartcheck.plugins';
|
||||
|
||||
smartcheck.newStorage = function() {
|
||||
return new CheckStorage;
|
||||
};
|
||||
|
||||
module.exports = smartcheck;
|
||||
/**
|
||||
* smartcheck
|
||||
*/
|
||||
export class Smartcheck {
|
||||
checkServiceStatus() {
|
||||
|
||||
}
|
||||
}
|
||||
|
3
ts/smartcheck.plugins.ts
Normal file
3
ts/smartcheck.plugins.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import * as puppeteer from 'puppeteer';
|
||||
|
||||
export { puppeteer };
|
11
ts/test.ts
11
ts/test.ts
@ -1,11 +0,0 @@
|
||||
/// <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
12
ts/tsd.json
@ -1,12 +0,0 @@
|
||||
{
|
||||
"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
2079
ts/typings/node/node.d.ts
vendored
File diff suppressed because it is too large
Load Diff
1
ts/typings/tsd.d.ts
vendored
1
ts/typings/tsd.d.ts
vendored
@ -1 +0,0 @@
|
||||
/// <reference path="node/node.d.ts" />
|
Reference in New Issue
Block a user