This commit is contained in:
Philipp Kunz 2016-03-21 13:56:12 +01:00
parent d3a796accf
commit 33f77ee5f2
7 changed files with 1 additions and 91 deletions

View File

@ -26,7 +26,6 @@
"beautylog": "^1.0.4" "beautylog": "^1.0.4"
}, },
"devDependencies": { "devDependencies": {
"gulp": "^3.9.0", "npmts": "^3.5.0"
"gulp-typescript": "^2.9.2"
} }
} }

View File

@ -1,7 +0,0 @@
/// <reference path="index.ts" />
var Environment = (function () {
function Environment() {
}
return Environment;
})();
//# sourceMappingURL=classes.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"classes.js","sourceRoot":"","sources":["classes.ts"],"names":["Environment","Environment.constructor"],"mappings":"AAAA,iCAAiC;AACjC;IAAAA;IAKAC,CAACA;IAADD,kBAACA;AAADA,CAACA,AALD,IAKC"}

View File

@ -1,28 +0,0 @@
// import gulp
var gulp = require("gulp");
var gulpTypescript = require("gulp-typescript");
var bl = require("beautylog")("os");
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() {
bl.success('Typescript compiled');
});
gulp.start.apply(gulp, ['default']);

View File

@ -1,2 +0,0 @@
# How to compile.
Make sure gulp and gulp-taypescript from npm are available. Then run the gulpfile in this directory.

View File

@ -1,50 +0,0 @@
/// <reference path="typings/tsd.d.ts" />
/// <reference path="classes.ts" />
var beautylog = require("beautylog")("os");
var addToGlobal = function (objectArg, paramName) {
global[paramName] = objectArg;
};
var smartenv = {}; //create smartenv object
smartenv.items = {}; // create the items object to store items to.
smartenv.makeGlobal = function () {
addToGlobal(smartenv, "smartenv"); //add object smartenv as global["smartenv"]
};
smartenv.info = {};
smartenv.info.jsenv = function () {
var app = {
env: '',
agent: ''
};
if (window) {
app.env = 'browser';
app.agent = navigator.userAgent;
}
else if (process) {
app.env = 'node';
}
};
smartenv.info.node = {};
smartenv.info.node.version = process.version;
smartenv.info.print = function () {
var pck = require("./package.json");
beautylog.log("node version is " + smartenv.info.node.version + " and smartenv version is " + pck.version);
beautylog.log("the smartenv module currently holds the following properties:");
console.log(Object.getOwnPropertyNames(smartenv.items).sort());
};
smartenv.register = function (objectArg, paramName) {
if (paramName === void 0) { paramName = "undefined"; }
if (paramName == "undefined") {
beautylog.error("paramName is undefined");
return;
}
smartenv.items[paramName] = objectArg;
};
smartenv.get = function (keyName) {
return smartenv.items[keyName];
};
smartenv.exportEnv = function () {
};
smartenv.importEnv = function () {
};
module.exports = smartenv;
//# sourceMappingURL=index.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,mCAAmC;AACnC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3C,IAAI,WAAW,GAAG,UAAS,SAAS,EAAC,SAAS;IAC1C,MAAM,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAClC,CAAC,CAAC;AACF,IAAI,QAAQ,GAAO,EAAE,CAAC,CAAC,wBAAwB;AAC/C,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,6CAA6C;AAClE,QAAQ,CAAC,UAAU,GAAG;IAClB,WAAW,CAAC,QAAQ,EAAC,UAAU,CAAC,CAAC,CAAA,2CAA2C;AAChF,CAAC,CAAC;AAGF,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC;AACnB,QAAQ,CAAC,IAAI,CAAC,KAAK,GAAG;IAClB,IAAI,GAAG,GAAG;QACN,GAAG,EAAE,EAAE;QACP,KAAK,EAAE,EAAE;KACZ,CAAC;IAEF,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACT,GAAG,CAAC,GAAG,GAAG,SAAS,CAAC;QACpB,G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