From 1ffe1803769ef5525657a8903cabb115db482dd7 Mon Sep 17 00:00:00 2001 From: PhilKunz Date: Mon, 25 Jan 2016 01:01:07 +0100 Subject: [PATCH] move to use npmts --- index.d.ts | 31 +++++++++++++++++++++++++++++++ index.js | 2 ++ package.json | 4 ++-- ts/compile/compile.js | 38 -------------------------------------- ts/compile/readme.md | 2 -- 5 files changed, 35 insertions(+), 42 deletions(-) create mode 100644 index.d.ts delete mode 100644 ts/compile/compile.js delete mode 100644 ts/compile/readme.md diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..34beba1 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,31 @@ +/// +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; diff --git a/index.js b/index.js index 0609348..211a127 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +#!/usr/bin/env node + /// var BeautylogPlugins; (function (BeautylogPlugins) { diff --git a/package.json b/package.json index 8b011c5..ffdc578 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "beautiful logging", "main": "index.js", "scripts": { - "test": "(cd ts/compile && node compile.js) && (node ./test.js)", + "test": "(npmts) && (node ./test.js)", "testbrowser": "(npm test) && (node testbrowser.js)", "gitsetup": "(git config push.followTags true)", "push": "(git push origin master && git push origin release && git push --follow-tags)", @@ -39,6 +39,6 @@ "easyserve": "0.0.4", "gulp": "^3.9.0", "gulp-browser": "0.0.18", - "gulp-typescript": "^2.10.0" + "npmts": "^1.0.9" } } diff --git a/ts/compile/compile.js b/ts/compile/compile.js deleted file mode 100644 index 8ba4db6..0000000 --- a/ts/compile/compile.js +++ /dev/null @@ -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']); \ No newline at end of file diff --git a/ts/compile/readme.md b/ts/compile/readme.md deleted file mode 100644 index b43dc07..0000000 --- a/ts/compile/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# How to compile. -Make sure gulp and gulp-taypescript from npm are available. Then run the gulpfile in this directory. \ No newline at end of file