move to use npmts
This commit is contained in:
parent
14bae9cbfd
commit
1ffe180376
31
index.d.ts
vendored
Normal file
31
index.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/// <reference path="ts/typings/tsd.d.ts" />
|
||||||
|
declare module BeautylogPlugins {
|
||||||
|
var init: () => {
|
||||||
|
smartenv: any;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
declare var tableHelpers: {
|
||||||
|
makeRow: (cellCounterArg?: number, colorArg?: string) => any[];
|
||||||
|
};
|
||||||
|
declare class ConsoleTable {
|
||||||
|
tableHead: string[];
|
||||||
|
rows: any;
|
||||||
|
type: string;
|
||||||
|
constructor(tableTypeArg: string, tableHeadArrayArg?: string[]);
|
||||||
|
push(row: string[]): void;
|
||||||
|
print(): void;
|
||||||
|
}
|
||||||
|
declare module BeautylogNode {
|
||||||
|
function init(): any;
|
||||||
|
}
|
||||||
|
declare module BeautylogOsTable {
|
||||||
|
var cliTable: any;
|
||||||
|
function init(): any;
|
||||||
|
}
|
||||||
|
declare module BeautylogBrowser {
|
||||||
|
function init(): any;
|
||||||
|
}
|
||||||
|
declare var plugins: {
|
||||||
|
smartenv: any;
|
||||||
|
};
|
||||||
|
declare var beautylog: any;
|
2
index.js
2
index.js
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
/// <reference path="./index.ts" />
|
/// <reference path="./index.ts" />
|
||||||
var BeautylogPlugins;
|
var BeautylogPlugins;
|
||||||
(function (BeautylogPlugins) {
|
(function (BeautylogPlugins) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "beautiful logging",
|
"description": "beautiful logging",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(cd ts/compile && node compile.js) && (node ./test.js)",
|
"test": "(npmts) && (node ./test.js)",
|
||||||
"testbrowser": "(npm test) && (node testbrowser.js)",
|
"testbrowser": "(npm test) && (node testbrowser.js)",
|
||||||
"gitsetup": "(git config push.followTags true)",
|
"gitsetup": "(git config push.followTags true)",
|
||||||
"push": "(git push origin master && git push origin release && git push --follow-tags)",
|
"push": "(git push origin master && git push origin release && git push --follow-tags)",
|
||||||
@ -39,6 +39,6 @@
|
|||||||
"easyserve": "0.0.4",
|
"easyserve": "0.0.4",
|
||||||
"gulp": "^3.9.0",
|
"gulp": "^3.9.0",
|
||||||
"gulp-browser": "0.0.18",
|
"gulp-browser": "0.0.18",
|
||||||
"gulp-typescript": "^2.10.0"
|
"npmts": "^1.0.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
// import gulp
|
|
||||||
var gulp = require("gulp")
|
|
||||||
var gulpTypescript = require("gulp-typescript");
|
|
||||||
|
|
||||||
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('compileTestBrowserTS', function() {
|
|
||||||
var stream = gulp.src('../testbrowser.ts')
|
|
||||||
.pipe(gulpTypescript({
|
|
||||||
out: "testbrowser.js"
|
|
||||||
}))
|
|
||||||
.pipe(gulp.dest("../../"));
|
|
||||||
return stream;
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('default',['compileTS','compileTestTS','compileTestBrowserTS'], function() {
|
|
||||||
console.log('Typescript compiled');
|
|
||||||
});
|
|
||||||
|
|
||||||
//lets tell gulp to start with the default task.
|
|
||||||
console.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.
|
|
Loading…
Reference in New Issue
Block a user