This commit is contained in:
Phil Kunz
2015-09-25 23:05:25 +02:00
parent 97d9e9addc
commit 0aadef013e
12 changed files with 2203 additions and 0 deletions

2
ts/compile/compile.sh Normal file
View File

@ -0,0 +1,2 @@
nvm use v0.12.7
gulp

16
ts/compile/gulpfile.js Normal file
View File

@ -0,0 +1,16 @@
// import gulp
var gulp = require("gulp"),
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('default',['compileTS'], function() {
console.log('Typescript compiled');
});

2
ts/compile/readme.md Normal file
View 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.

22
ts/index.ts Normal file
View File

@ -0,0 +1,22 @@
/// <reference path="typings/tsd.d.ts" />
var path = require("path");
var bl = require("beautylog");
/**
*
* @type {{getPath: (function(any): undefined)}}
*/
var smartpath:any = {
getAbsPath: function(varPath,logBool = false) {
var absPath = path.resolve(varPath);
if (logBool == true) {
bl.log('varPath is' + varPath);
bl.log('absPath is' + absPath);
}
return absPath;
}
};
module.exports = smartpath;

12
ts/tsd.json Normal file
View 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

File diff suppressed because it is too large Load Diff

1
ts/typings/tsd.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference path="node/node.d.ts" />