diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..f2d2ff7
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,59 @@
+image: hosttoday/ht-docker-node:npmts
+
+stages:
+- test
+- release
+- trigger
+- pages
+
+testLEGACY:
+ stage: test
+ script:
+ - npmci test legacy
+ tags:
+ - docker
+ allow_failure: true
+
+testLTS:
+ stage: test
+ script:
+ - npmci test lts
+ tags:
+ - docker
+
+testSTABLE:
+ stage: test
+ script:
+ - npmci test stable
+ tags:
+ - docker
+
+release:
+ stage: release
+ script:
+ - npmci publish
+ only:
+ - tags
+ tags:
+ - docker
+
+trigger:
+ stage: trigger
+ script:
+ - npmci trigger
+ only:
+ - tags
+ tags:
+ - docker
+
+pages:
+ image: hosttoday/ht-docker-node:npmpage
+ stage: pages
+ script:
+ - npmci command npmpage --host gitlab
+ only:
+ - tags
+ artifacts:
+ expire_in: 1 week
+ paths:
+ - public
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 47dae33..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: node_js
-node_js:
-- 4
-- stable
-deploy:
- provider: npm
- email: npm@lossless.digital
- api_key:
- secure: W6bKXwA7fNE+SNc4cNMkG4T6avf3JTpygukjuL++NKSc69W8aBrGgB2YFGbeIMiiORGLVqdQ6RCBg3Qk1o9Fi4i94dqS+8HjqBB7bYyz8FprtTnrcxJSIZPmEkRD5UNCAdYkDLrofeihnrojsNRLOTvM4x8hSIJpp+2W/WgdYGOzoUJK7qRMWM9TcAMBtVVrww2kVUDoDeHLWIj5w6jvlpl+rUJqmA/x3Gnom+wIVwClyy+mTnwjn9y6ICzoSmHKeL70Vun9AmgjshhVJOW51R4DYt8lkIYvT8DhwIqNOgvf2+uK2rg52pI0v86FL5XbdSCt6AwKtHZFR4J07h/bIr9J/teMrSlX0aI/J7tZnUgFAkUPKtqpvFZm/GD8/549YaG9koUQjwL5pcCUmuPl4djBy22q0NXw/bQIu59fW4KS7cS0KXBrofLCskXAc/CI+EzOX6LXnzryXLh4kDJiWNMLXOeSpdPkvAPzFj9MNYNnF6vjmhUJvoaN1TGO1oOEjIN68BfQY/4EvJDvwgVnqxihomvn95uUYB8f4EnTp2RVnbGKTlsY7J1zzwnMQrWbSRIT/XLsK2rP1oDGbSF1iLX06/sFLXbBDVYsw55jovOvF/dxlZjTJEUWvBV56s81bmKebskr9EdFCTUkP7oegexx4v6rins5WOr1Gele634=
- on:
- tags: true
- repo: pushrocks/smartenv
-notifications:
- slack:
- secure: f5Uss0z9RPl/QcA/DroB8loyE93aOYI6bqCkrsiUscmZtlv/TVQtT4dxqGA6uvcG6iTQDBi3Ul88dQxWkRm4IqbhY35/iMaV2dHW4FVYMAh8GQMbsfL2sALCcufxD9blw47awv3iFcwhV1EeyesscjgL0JIjduk96v/7G/6QIO2838M1lzlgtj+kRUkim8qkaEs1je3gRrhMUIjLuAdscMXyUKYFMjWo9ACSjVUl30R/ZNemb18itIja6i92GotreBgcfEMczvy58ovDC7xdJUsY8LjMI01DwY+WPRnI0tAhsuI8moBwwcdM4e3bAjKjucQRjO33O5bMWRZ6QCiYd0DnCEFyCPQLJ4GSy/tkD00n8ijLHAOSV3AH1zNbdK1EAdSPQXDvlI36KJn/2hyQLoitGHVUPr76ujJWP82ypO2tgIp3XQU0dJVCxDuHnwJO2+hjdI+gCPqxNTpjeujHx3UdkTGNRjuuf9dlZ/D08fApjYxy2fxItTqo3QjP/nrqvBXUOPP8yPHpjIT4H2t5Pr4SJjBGI6X4qhKyFj6s9rA/Xu1rL+45zu1C3uC3z+u3T9UwrbzJ/cZM6r6UQvQmUvIfBNaMlg4I/diQCDIPL+Rhop2nylY3IcHmJnk2itn7kOqj1tohCpFEml5pRuSZy4udWywkdtyBAsHWFLF7oiQ=
diff --git a/dist/index.d.ts b/dist/index.d.ts
index 9b241ed..2aa9f22 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -1,5 +1,5 @@
-import * as classes from "./smartenv.classes";
-declare var smartenv: {
+import * as classes from './smartenv.classes';
+declare let smartenv: {
getEnv: () => classes.Environment;
printEnv: () => void;
obs: any;
diff --git a/dist/index.js b/dist/index.js
index d70cd84..b65ba78 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,12 +1,10 @@
-///
"use strict";
-var SmartenvEnvironment = require("./smartenv.environment");
-var SmartenvObjectstorage = require("./smartenv.objectstorage");
-var smartenv = {
+const SmartenvEnvironment = require("./smartenv.environment");
+const SmartenvObjectstorage = require("./smartenv.objectstorage");
+let smartenv = {
getEnv: SmartenvEnvironment.getEnv,
printEnv: SmartenvEnvironment.printEnv,
obs: SmartenvObjectstorage.obs
-}; //create smartenv object
+}; // create smartenv object
module.exports = smartenv;
-
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDBDQUEwQzs7QUFJMUMsSUFBWSxtQkFBbUIsV0FBTSx3QkFBd0IsQ0FBQyxDQUFBO0FBQzlELElBQVkscUJBQXFCLFdBQU0sMEJBQTBCLENBQUMsQ0FBQTtBQUVsRSxJQUFJLFFBQVEsR0FBRztJQUNYLE1BQU0sRUFBRSxtQkFBbUIsQ0FBQyxNQUFNO0lBQ2xDLFFBQVEsRUFBRSxtQkFBbUIsQ0FBQyxRQUFRO0lBQ3RDLEdBQUcsRUFBRSxxQkFBcUIsQ0FBQyxHQUFHO0NBQ2pDLENBQUMsQ0FBQyx3QkFBd0I7QUFFM0IsaUJBQVMsUUFBUSxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cInR5cGluZ3MvbWFpbi5kLnRzXCIgLz5cblxuaW1wb3J0ICogYXMgcGx1Z2lucyBmcm9tIFwiLi9zbWFydGVudi5wbHVnaW5zXCI7XG5pbXBvcnQgKiBhcyBjbGFzc2VzIGZyb20gXCIuL3NtYXJ0ZW52LmNsYXNzZXNcIjtcbmltcG9ydCAqIGFzIFNtYXJ0ZW52RW52aXJvbm1lbnQgZnJvbSBcIi4vc21hcnRlbnYuZW52aXJvbm1lbnRcIjtcbmltcG9ydCAqIGFzIFNtYXJ0ZW52T2JqZWN0c3RvcmFnZSBmcm9tIFwiLi9zbWFydGVudi5vYmplY3RzdG9yYWdlXCI7XG5cbnZhciBzbWFydGVudiA9IHtcbiAgICBnZXRFbnY6IFNtYXJ0ZW52RW52aXJvbm1lbnQuZ2V0RW52LFxuICAgIHByaW50RW52OiBTbWFydGVudkVudmlyb25tZW50LnByaW50RW52LFxuICAgIG9iczogU21hcnRlbnZPYmplY3RzdG9yYWdlLm9ic1xufTsgLy9jcmVhdGUgc21hcnRlbnYgb2JqZWN0XG5cbmV4cG9ydCA9IHNtYXJ0ZW52O1xuIl19
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRUEsOERBQTZEO0FBQzdELGtFQUFpRTtBQUVqRSxJQUFJLFFBQVEsR0FBRztJQUNYLE1BQU0sRUFBRSxtQkFBbUIsQ0FBQyxNQUFNO0lBQ2xDLFFBQVEsRUFBRSxtQkFBbUIsQ0FBQyxRQUFRO0lBQ3RDLEdBQUcsRUFBRSxxQkFBcUIsQ0FBQyxHQUFHO0NBQ2pDLENBQUEsQ0FBQyx5QkFBeUI7QUFFM0IsaUJBQVMsUUFBUSxDQUFBIn0=
\ No newline at end of file
diff --git a/dist/smartenv.classes.helpers.js b/dist/smartenv.classes.helpers.js
index 7a221ae..4d2aed4 100644
--- a/dist/smartenv.classes.helpers.js
+++ b/dist/smartenv.classes.helpers.js
@@ -1,11 +1,10 @@
-///
"use strict";
exports.getEnvString = function () {
- if (typeof window !== "undefined") {
- return "browser";
+ if (typeof window !== 'undefined') {
+ return 'browser';
}
- else if (typeof process !== "undefined") {
- return "node";
+ else if (typeof process !== 'undefined') {
+ return 'node';
}
};
exports.getUserAgentString = function () {
@@ -17,7 +16,7 @@ exports.getUserAgentString = function () {
}
};
exports.isNode = function () {
- return exports.getEnvString() === "node";
+ return exports.getEnvString() === 'node';
};
exports.getNodeVersion = function () {
return process.version;
@@ -51,5 +50,4 @@ exports.isTravis = function () {
}
;
};
-
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0ZW52LmNsYXNzZXMuaGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwwQ0FBMEM7O0FBRS9CLG9CQUFZLEdBQUc7SUFDdEIsRUFBRSxDQUFDLENBQUMsT0FBTyxNQUFNLEtBQUssV0FBVyxDQUFDLENBQUMsQ0FBQztRQUNoQyxNQUFNLENBQUMsU0FBUyxDQUFDO0lBQ3JCLENBQUM7SUFBQyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUMsT0FBTyxPQUFPLEtBQUssV0FBVyxDQUFDLENBQUMsQ0FBQztRQUN4QyxNQUFNLENBQUMsTUFBTSxDQUFDO0lBQ2xCLENBQUM7QUFDTCxDQUFDLENBQUM7QUFFUywwQkFBa0IsR0FBRztJQUM1QixFQUFFLENBQUEsQ0FBQyxpQkFBUyxFQUFFLENBQUMsQ0FBQSxDQUFDO1FBQ1osTUFBTSxDQUFFLFNBQVMsQ0FBQyxTQUFTLENBQUM7SUFDaEMsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ0osTUFBTSxDQUFDLFNBQVMsQ0FBQztJQUNyQixDQUFDO0FBQ0wsQ0FBQyxDQUFDO0FBRVMsY0FBTSxHQUFHO0lBQ2hCLE1BQU0sQ0FBQyxvQkFBWSxFQUFFLEtBQUssTUFBTSxDQUFBO0FBQ3BD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LEtBQUssQ0FBQTtJQUNoQixDQUFDO0lBQUEsQ0FBQztBQUNOLENBQUMsQ0FBQSJ9
\ No newline at end of file
diff --git a/dist/smartenv.classes.js b/dist/smartenv.classes.js
index 47e5444..3378d58 100644
--- a/dist/smartenv.classes.js
+++ b/dist/smartenv.classes.js
@@ -1,8 +1,7 @@
-///
"use strict";
-var helpers = require("./smartenv.classes.helpers");
-var Environment = (function () {
- function Environment() {
+const helpers = require("./smartenv.classes.helpers");
+class Environment {
+ constructor() {
this.runtimeEnv = helpers.getEnvString();
this.isBrowser = helpers.isBrowser();
this.userAgent = helpers.getUserAgentString();
@@ -13,8 +12,6 @@ var Environment = (function () {
this.isC9 = helpers.isC9();
}
;
- return Environment;
-}());
+}
exports.Environment = Environment;
-
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0ZW52LmNsYXNzZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsMENBQTBDOztBQUUxQyxJQUFPLE9BQU8sV0FBVyw0QkFBNEIsQ0FBQyxDQUFDO0FBQ3ZEO0lBU0k7UUFDSSxJQUFJLENBQUMsVUFBVSxHQUFHLE9BQU8sQ0FBQyxZQUFZLEVBQUUsQ0FBQztRQUN6QyxJQUFJLENBQUMsU0FBUyxHQUFHLE9BQU8sQ0FBQyxTQUFTLEVBQUUsQ0FBQztRQUNyQyxJQUFJLENBQUMsU0FBUyxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsRUFBRSxDQUFDO1FBQzlDLElBQUksQ0FBQyxNQUFNLEdBQUcsT0FBTyxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBQy9CLElBQUksQ0FBQyxXQUFXLEdBQUcsT0FBTyxDQUFDLGNBQWMsRUFBRSxDQUFDO1FBQzVDLElBQUksQ0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksRUFBRSxDQUFDO1FBQzNCLElBQUksQ0FBQyxR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KTtcbiAgICAgICAgdGhpcy5pc1RyYXZpcyA9IGhlbHBlcnMuaXNUcmF2aXMoKTtcbiAgICAgICAgdGhpcy5pc0M5ID0gaGVscGVycy5pc0M5KCk7XG4gICAgfTtcbn1cbiJdfQ==
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuY2xhc3Nlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LmNsYXNzZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHNEQUFzRDtBQUV0RDtJQVNJO1FBQ0ksSUFBSSxDQUFDLFVBQVUsR0FBRyxPQUFPLENBQUMsWUFBWSxFQUFFLENBQUE7UUFDeEMsSUFBSSxDQUFDLFNBQVMsR0FBRyxPQUFPLENBQUMsU0FBUyxFQUFFLENBQUE7UUFDcEMsSUFBSSxDQUFDLFNBQVMsR0FBRyxPQUFPLENBQUMsa0JBQWtCLEVBQUUsQ0FBQTtRQUM3QyxJQUFJLENBQUMsTUFBTSxHQUFHLE9BQU8sQ0FBQyxNQUFNLEVBQUUsQ0FBQTtRQUM5QixJQUFJLENBQUMsV0FBVyxHQUFHLE9BQU8sQ0FBQyxjQUFjLEVBQUUsQ0FBQTtRQUMzQyxJQUFJLENBQUMsSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQTtRQUMxQixJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQyxRQUFRLEVBQUUsQ0FBQTtRQUNsQyxJQUFJLENBQUMsSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQTtJQUM5QixDQUFDO0lBQUEsQ0FBQztDQUNMO0FBbkJELGtDQW1CQyJ9
\ No newline at end of file
diff --git a/dist/smartenv.environment.d.ts b/dist/smartenv.environment.d.ts
index e663ef8..03dbd71 100644
--- a/dist/smartenv.environment.d.ts
+++ b/dist/smartenv.environment.d.ts
@@ -1,4 +1,4 @@
-import classes = require("./smartenv.classes");
+import * as classes from './smartenv.classes';
/**
* returns the environment
* @returns {Environment}
diff --git a/dist/smartenv.environment.js b/dist/smartenv.environment.js
index ed2dde4..692c7eb 100644
--- a/dist/smartenv.environment.js
+++ b/dist/smartenv.environment.js
@@ -1,8 +1,8 @@
"use strict";
-var classes = require("./smartenv.classes");
-var objectStorage = require("./smartenv.objectstorage");
-var environment;
-var envDetermined = false;
+const classes = require("./smartenv.classes");
+const objectStorage = require("./smartenv.objectstorage");
+let environment;
+let envDetermined = false;
/**
* returns the environment
* @returns {Environment}
@@ -20,16 +20,15 @@ exports.getEnv = function () {
*/
exports.printEnv = function () {
if (this.getEnv().isNode) {
- console.log("running on NODE");
- var smartenvVersion = require("../package.json").version;
- console.log("node version is " + this.getEnv().nodeVersion + " and smartenv version is " + smartenvVersion);
+ console.log('running on NODE');
+ let smartenvVersion = require('../package.json').version;
+ console.log('node version is ' + this.getEnv().nodeVersion + ' and smartenv version is ' + smartenvVersion);
}
else {
- console.log("running on BROWSER");
- console.log("browser is " + this.getEnv().userAgent);
+ console.log('running on BROWSER');
+ console.log('browser is ' + this.getEnv().userAgent);
}
- console.log("the smartenv registration store currently holds the following properties:");
+ console.log('the smartenv registration store currently holds the following properties:');
console.log(Object.getOwnPropertyNames(objectStorage.obs.getAll()));
};
-
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0ZW52LmVudmlyb25tZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFLQSxJQUFPLE9BQU8sV0FBVyxvQkFBb0IsQ0FBQyxDQUFDO0FBQy9DLElBQU8sYUFBYSxXQUFXLDBCQUEwQixDQUFDLENBQUM7QUFHM0QsSUFBSSxXQUErQixDQUFDO0FBQ3BDLElBQUksYUFBYSxHQUFXLEtBQUssQ0FBQztBQUVsQzs7O0dBR0c7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W5jdGlvbigpIHtcbiAgICBpZiAodGhpcy5nZXRFbnYoKS5pc05vZGUpIHtcbiAgICAgICAgY29uc29sZS5sb2coXCJydW5uaW5nIG9uIE5PREVcIik7XG4gICAgICAgIHZhciBzbWFydGVudlZlcnNpb24gPSByZXF1aXJlKFwiLi4vcGFja2FnZS5qc29uXCIpLnZlcnNpb247XG4gICAgICAgIGNvbnNvbGUubG9nKFwibm9kZSB2ZXJzaW9uIGlzIFwiICsgdGhpcy5nZXRFbnYoKS5ub2RlVmVyc2lvbiArIFwiIGFuZCBzbWFydGVudiB2ZXJzaW9uIGlzIFwiICsgc21hcnRlbnZWZXJzaW9uKTtcbiAgICB9IGVsc2Uge1xuICAgICAgICBjb25zb2xlLmxvZyhcInJ1bm5pbmcgb24gQlJPV1NFUlwiKTtcbiAgICAgICAgY29uc29sZS5sb2coXCJicm93c2VyIGlzIFwiICsgdGhpcy5nZXRFbnYoKS51c2VyQWdlbnQpO1xuICAgIH1cbiAgICBjb25zb2xlLmxvZyhcInRoZSBzbWFydGVudiByZWdpc3RyYXRpb24gc3RvcmUgY3VycmVudGx5IGhvbGRzIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcIik7XG4gICAgY29uc29sZS5sb2coT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMob2JqZWN0U3RvcmFnZS5vYnMuZ2V0QWxsKCkpKTtcbn07Il19
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuZW52aXJvbm1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGVudi5lbnZpcm9ubWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBSUEsOENBQTZDO0FBQzdDLDBEQUF5RDtBQUd6RCxJQUFJLFdBQWdDLENBQUE7QUFDcEMsSUFBSSxhQUFhLEdBQVksS0FBSyxDQUFBO0FBRWxDOzs7R0FHRztBQUNRLFFBQUE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QyxDQUFDLENBQUE7QUFDdkUsQ0FBQyxDQUFBIn0=
\ No newline at end of file
diff --git a/dist/smartenv.objectstorage.js b/dist/smartenv.objectstorage.js
index 7b08d2c..d8b9870 100644
--- a/dist/smartenv.objectstorage.js
+++ b/dist/smartenv.objectstorage.js
@@ -1,22 +1,19 @@
"use strict";
-///
-var plugins = require("./smartenv.plugins");
+const plugins = require("./smartenv.plugins");
exports.obs = {
- add: function (paramNameArg, objectArg) {
- if (paramNameArg === void 0) { paramNameArg = "undefined"; }
- if (objectArg === void 0) { objectArg = "undefined"; }
- if (paramNameArg == "undefined") {
- console.log("paramName is undefined");
+ add: function (paramNameArg = 'undefined', objectArg = 'undefined') {
+ if (paramNameArg === 'undefined') {
+ console.log('paramName is undefined');
return;
}
- if (objectArg == "undefined") {
- console.log("objectArg is undefined");
+ if (objectArg === 'undefined') {
+ console.log('objectArg is undefined');
}
- if (typeof exports.obsItems[paramNameArg] === "undefined") {
+ if (typeof exports.obsItems[paramNameArg] === 'undefined') {
exports.obsItems[paramNameArg] = objectArg;
}
else {
- console.log("object is already present, so add operation has failed.");
+ console.log('object is already present, so add operation has failed.');
}
return exports.obsItems[paramNameArg];
},
@@ -24,11 +21,11 @@ exports.obs = {
exports.obsItems[paramNameArg] = objectArg;
},
merge: function (paramNameArg, objectArg) {
- if (!(typeof exports.obsItems[paramNameArg] === "undefined")) {
+ if (!(typeof exports.obsItems[paramNameArg] === 'undefined')) {
exports.obsItems[paramNameArg] = plugins._.assign(exports.obsItems[paramNameArg], objectArg);
}
else {
- console.log("object is not present, so there is nothing to merge");
+ console.log('object is not present, so there is nothing to merge');
}
},
get: function (keyName) {
@@ -43,5 +40,4 @@ exports.obs = {
}
};
exports.obsItems = {};
-
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0ZW52Lm9iamVjdHN0b3JhZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQ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FBTSxDQUFDLGdCQUFRLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDNUIsQ0FBQztJQUNELE1BQU0sRUFBRTtRQUNKLE1BQU0sQ0FBQyxnQkFBUSxDQUFBO0lBQ25CLENBQUM7SUFDRCxXQUFXLEVBQUUsVUFBUyxRQUFRO1FBQzFCLGdCQUFRLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsZ0JBQVEsRUFBQyxRQUFRLENBQUMsQ0FBQTtRQUM5QyxNQUFNLENBQUMsZ0JBQVEsQ0FBQTtJQUNuQixDQUFDO0NBQ0osQ0FBQTtBQUNVLFFBQUEsUUFBUSxHQUFRLEVBQUUsQ0FBQSJ9
\ No newline at end of file
diff --git a/dist/smartenv.plugins.d.ts b/dist/smartenv.plugins.d.ts
index e0ae5e6..1ad666e 100644
--- a/dist/smartenv.plugins.d.ts
+++ b/dist/smartenv.plugins.d.ts
@@ -1,5 +1,4 @@
-declare var plugins: {
- Q: any;
- _: any;
-};
-export = plugins;
+import 'typings-global';
+import * as Q from 'q';
+import * as _ from 'lodash';
+export { Q, _ };
diff --git a/dist/smartenv.plugins.js b/dist/smartenv.plugins.js
index 3b869c4..524aaea 100644
--- a/dist/smartenv.plugins.js
+++ b/dist/smartenv.plugins.js
@@ -1,9 +1,7 @@
"use strict";
-///
-var plugins = {
- Q: require("q"),
- _: require("lodash")
-};
-module.exports = plugins;
-
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0ZW52LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBDQUEwQztBQUMxQyxJQUFJLE9BQU8sR0FBRztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUMsR0FBRyxDQUFDO0lBQ2YsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxRQUFRLENBQUM7Q0FDdkIsQ0FBQztBQUVGLGlCQUFTLE9BQU8sQ0FBQyIsImZpbGUiOiJzbWFydGVudi5wbHVnaW5zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cInR5cGluZ3MvbWFpbi5kLnRzXCIgLz5cbnZhciBwbHVnaW5zID0ge1xuICAgIFE6IHJlcXVpcmUoXCJxXCIpLFxuICAgIF86IHJlcXVpcmUoXCJsb2Rhc2hcIilcbn07XG5cbmV4cG9ydCA9IHBsdWdpbnM7Il19
+require("typings-global");
+const Q = require("q");
+exports.Q = Q;
+const _ = require("lodash");
+exports._ = _;
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF1QjtBQUN2Qix1QkFBc0I7QUFJbEIsY0FBQztBQUhMLDRCQUEyQjtBQUl2QixjQUFDIn0=
\ No newline at end of file
diff --git a/package.json b/package.json
index 087e680..d2f9a8a 100644
--- a/package.json
+++ b/package.json
@@ -22,11 +22,14 @@
},
"homepage": "https://github.com/pushrocks/smartenv",
"dependencies": {
- "beautylog": "^4.1.2",
- "lodash": "^4.11.1",
- "q": "^1.4.1"
+ "@types/q": "x.x.x",
+ "lodash": "^4.17.2",
+ "q": "^1.4.1",
+ "typings-global": "^1.0.14"
},
"devDependencies": {
- "npmts": "^5.1.5"
+ "@types/should": "^8.1.30",
+ "beautylog": "^6.0.0",
+ "should": "^11.1.1"
}
}
diff --git a/test/browser/index.html b/test/browser/index.html
deleted file mode 100644
index a3f2ff7..0000000
--- a/test/browser/index.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/browser/index.js b/test/browser/index.js
deleted file mode 100644
index 1adc069..0000000
--- a/test/browser/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var smartenv = require("./index.js");
-smartenv.printEnv();
\ No newline at end of file
diff --git a/test/test.d.ts b/test/test.d.ts
index 5fe3b81..3bb32d4 100644
--- a/test/test.d.ts
+++ b/test/test.d.ts
@@ -1,3 +1,3 @@
-declare var smartenv: any;
-declare var beautylog: any;
-declare var key2: string;
+declare let smartenv: any;
+declare let beautylog: any;
+declare let key2: string;
diff --git a/test/test.js b/test/test.js
index 6919e4a..6e6ae7b 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1,21 +1,20 @@
-///
-var smartenv = require("../dist/index.js");
-var beautylog = require("beautylog");
+let smartenv = require('../dist/index.js');
+let beautylog = require('beautylog');
smartenv.printEnv();
-//test smartenv.obs.add
-smartenv.obs.add("myTestObject", { key1: "Peter" });
-smartenv.obs.add("myTestObject", { key1: "Klaus" }); //now trying to add a second
+// test smartenv.obs.add
+smartenv.obs.add('myTestObject', { key1: 'Peter' });
+smartenv.obs.add('myTestObject', { key1: 'Klaus' }); //now trying to add a second
smartenv.printEnv();
-beautylog.log(smartenv.obs.get("myTestObject").key1); // this should be Peter
-//test smartenv.obs.replace
-smartenv.obs.replace("myTestObject", { key1: "Klaus" });
-beautylog.log(smartenv.obs.get("myTestObject").key1); // this should be Klaus
-//test smartenv.obs.merge
-smartenv.obs.merge("myTestObject", { key2: "Peter" });
-beautylog.log(smartenv.obs.get("myTestObject").key1 + smartenv.obs.get("myTestObject").key2); // this should be KlausPeter
-var key2 = "hello";
-smartenv.obs.get("myTestObject").key2 = key2;
-beautylog.log(smartenv.obs.get("myTestObject").key2);
-beautylog.success("Success!");
-
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksUUFBUSxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQzND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dE9iamVjdFwiLHtrZXkxOlwiS2xhdXNcIn0pO1xuYmVhdXR5bG9nLmxvZyhzbWFydGVudi5vYnMuZ2V0KFwibXlUZXN0T2JqZWN0XCIpLmtleTEpOyAvLyB0aGlzIHNob3VsZCBiZSBLbGF1c1xuXG4vL3Rlc3Qgc21hcnRlbnYub2JzLm1lcmdlXG5zbWFydGVudi5vYnMubWVyZ2UoXCJteVRlc3RPYmplY3RcIix7a2V5MjpcIlBldGVyXCJ9KTtcbmJlYXV0eWxvZy5sb2coc21hcnRlbnYub2JzLmdldChcIm15VGVzdE9iamVjdFwiKS5rZXkxICsgc21hcnRlbnYub2JzLmdldChcIm15VGVzdE9iamVjdFwiKS5rZXkyKTsgLy8gdGhpcyBzaG91bGQgYmUgS2xhdXNQZXRlclxuXG52YXIga2V5MiA9IFwiaGVsbG9cIjtcbnNtYXJ0ZW52Lm9icy5nZXQoXCJteVRlc3RPYmplY3RcIikua2V5MiA9IGtleTI7XG5iZWF1dHlsb2cubG9nKHNtYXJ0ZW52Lm9icy5nZXQoXCJteVRlc3RPYmplY3RcIikua2V5Mik7XG5cbmJlYXV0eWxvZy5zdWNjZXNzKFwiU3VjY2VzcyFcIik7Il19
+beautylog.log(smartenv.obs.get('myTestObject').key1); // this should be Peter
+// test smartenv.obs.replace
+smartenv.obs.replace('myTestObject', { key1: 'Klaus' });
+beautylog.log(smartenv.obs.get('myTestObject').key1); // this should be Klaus
+// test smartenv.obs.merge
+smartenv.obs.merge('myTestObject', { key2: 'Peter' });
+beautylog.log(smartenv.obs.get('myTestObject').key1 + smartenv.obs.get('myTestObject').key2);
+// this should be KlausPeter
+let key2 = 'hello';
+smartenv.obs.get('myTestObject').key2 = key2;
+beautylog.log(smartenv.obs.get('myTestObject').key2);
+beautylog.success('Success!');
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiX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BQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsY0FBYyxDQUFDLENBQUMsSUFBSSxHQUFHLFFBQVEsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLGNBQWMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFBO0FBQzVGLDRCQUE0QjtBQUU1QixJQUFJLElBQUksR0FBRyxPQUFPLENBQUE7QUFDbEIsUUFBUSxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsY0FBYyxDQUFDLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQTtBQUM1QyxTQUFTLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLGNBQWMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFBO0FBRXBELFNBQVMsQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUEifQ==
\ No newline at end of file
diff --git a/test/test.ts b/test/test.ts
index 7fde278..aeaa51f 100644
--- a/test/test.ts
+++ b/test/test.ts
@@ -1,24 +1,24 @@
-///
-var smartenv = require("../dist/index.js");
-var beautylog = require("beautylog");
-smartenv.printEnv();
+import * as smartenv from '../dist/index.js'
+import * as beautylog from 'beautylog'
+smartenv.printEnv()
-//test smartenv.obs.add
-smartenv.obs.add("myTestObject",{key1:"Peter"});
-smartenv.obs.add("myTestObject",{key1:"Klaus"}); //now trying to add a second
-smartenv.printEnv();
-beautylog.log(smartenv.obs.get("myTestObject").key1); // this should be Peter
+// test smartenv.obs.add
+smartenv.obs.add('myTestObject',{key1:'Peter'})
+smartenv.obs.add('myTestObject',{key1:'Klaus'}) //now trying to add a second
+smartenv.printEnv()
+beautylog.log(smartenv.obs.get('myTestObject').key1) // this should be Peter
-//test smartenv.obs.replace
-smartenv.obs.replace("myTestObject",{key1:"Klaus"});
-beautylog.log(smartenv.obs.get("myTestObject").key1); // this should be Klaus
+// test smartenv.obs.replace
+smartenv.obs.replace('myTestObject',{key1:'Klaus'})
+beautylog.log(smartenv.obs.get('myTestObject').key1) // this should be Klaus
-//test smartenv.obs.merge
-smartenv.obs.merge("myTestObject",{key2:"Peter"});
-beautylog.log(smartenv.obs.get("myTestObject").key1 + smartenv.obs.get("myTestObject").key2); // this should be KlausPeter
+// test smartenv.obs.merge
+smartenv.obs.merge('myTestObject',{key2:'Peter'})
+beautylog.log(smartenv.obs.get('myTestObject').key1 + smartenv.obs.get('myTestObject').key2)
+// this should be KlausPeter
-var key2 = "hello";
-smartenv.obs.get("myTestObject").key2 = key2;
-beautylog.log(smartenv.obs.get("myTestObject").key2);
+let key2 = 'hello'
+smartenv.obs.get('myTestObject').key2 = key2
+beautylog.log(smartenv.obs.get('myTestObject').key2)
-beautylog.success("Success!");
\ No newline at end of file
+beautylog.success('Success!')
diff --git a/test/testbrowser.ts b/test/testbrowser.ts
deleted file mode 100644
index 43445f9..0000000
--- a/test/testbrowser.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-///
-var plugins = {
- beautylog: require("beautylog")("os"),
- gulp: require("gulp"),
- gulpBrowser: require("gulp-browser"),
- easyserve: require("easyserve")
-};
-
-plugins.gulp.task('compileBrowserJS', function() {
- var stream = plugins.gulp.src('test/browser/index.js')
- .pipe(plugins.gulpBrowser.browserify())
- .pipe(plugins.gulp.dest("test/browser/browserified/"));
- return stream;
-});
-
-plugins.gulp.task('default',['compileBrowserJS'], function() {
- plugins.beautylog.success('browserJS has been browserified');
- plugins.easyserve("test/browser/");
-});
-
-plugins.gulp.start.apply(plugins.gulp, ['default']);
\ No newline at end of file
diff --git a/ts/index.ts b/ts/index.ts
index 749415a..d09ccbf 100644
--- a/ts/index.ts
+++ b/ts/index.ts
@@ -1,14 +1,12 @@
-///
+import * as plugins from './smartenv.plugins'
+import * as classes from './smartenv.classes'
+import * as SmartenvEnvironment from './smartenv.environment'
+import * as SmartenvObjectstorage from './smartenv.objectstorage'
-import * as plugins from "./smartenv.plugins";
-import * as classes from "./smartenv.classes";
-import * as SmartenvEnvironment from "./smartenv.environment";
-import * as SmartenvObjectstorage from "./smartenv.objectstorage";
-
-var smartenv = {
+let smartenv = {
getEnv: SmartenvEnvironment.getEnv,
printEnv: SmartenvEnvironment.printEnv,
obs: SmartenvObjectstorage.obs
-}; //create smartenv object
+} // create smartenv object
-export = smartenv;
+export = smartenv
diff --git a/ts/smartenv.classes.helpers.ts b/ts/smartenv.classes.helpers.ts
index cdedb28..fca2fe1 100644
--- a/ts/smartenv.classes.helpers.ts
+++ b/ts/smartenv.classes.helpers.ts
@@ -1,53 +1,51 @@
-///
-
-export var getEnvString = function():string {
- if (typeof window !== "undefined") {
- return "browser";
- } else if (typeof process !== "undefined") {
- return "node";
+export var getEnvString = function(): string {
+ if (typeof window !== 'undefined') {
+ return 'browser'
+ } else if (typeof process !== 'undefined') {
+ return 'node'
}
-};
+}
-export var getUserAgentString = function():string{
- if(isBrowser()){
- return navigator.userAgent;
+export var getUserAgentString = function(): string{
+ if (isBrowser()) {
+ return navigator.userAgent
} else {
- return undefined;
+ return undefined
}
-};
+}
-export var isNode = function():boolean {
- return getEnvString() === "node"
-};
+export var isNode = function(): boolean {
+ return getEnvString() === 'node'
+}
-export var getNodeVersion = function():string {
- return process.version;
-};
+export var getNodeVersion = function(): string {
+ return process.version
+}
-export var isBrowser = function():boolean {
- return !isNode();
-};
+export var isBrowser = function(): boolean {
+ return !isNode()
+}
export var isCI = function(){
- if(process.env.CI){
- return true;
+ if (process.env.CI) {
+ return true
} else {
- return false;
+ return false
};
-};
+}
export var isC9 = function(){
- if (process.env.C9_HOSTNAME){
- return true;
+ if (process.env.C9_HOSTNAME) {
+ return true
} else {
- return false;
+ return false
}
-};
+}
export var isTravis = function(){
- if(process.env.TRAVIS){
- return true;
+ if (process.env.TRAVIS) {
+ return true
} else {
- return false;
+ return false
};
-};
\ No newline at end of file
+}
diff --git a/ts/smartenv.classes.ts b/ts/smartenv.classes.ts
index c4042ea..dccb99d 100644
--- a/ts/smartenv.classes.ts
+++ b/ts/smartenv.classes.ts
@@ -1,23 +1,22 @@
-///
+import helpers = require('./smartenv.classes.helpers')
-import helpers = require("./smartenv.classes.helpers");
export class Environment {
- runtimeEnv:string;
- isBrowser:boolean;
- userAgent:string;
- isNode:boolean;
- nodeVersion:string;
- isCI:boolean;
- isTravis:boolean;
- isC9:boolean;
+ runtimeEnv: string
+ isBrowser: boolean
+ userAgent: string
+ isNode: boolean
+ nodeVersion: string
+ isCI: boolean
+ isTravis: boolean
+ isC9: boolean
constructor() {
- this.runtimeEnv = helpers.getEnvString();
- this.isBrowser = helpers.isBrowser();
- this.userAgent = helpers.getUserAgentString();
- this.isNode = helpers.isNode();
- this.nodeVersion = helpers.getNodeVersion();
- this.isCI = helpers.isCI();
- this.isTravis = helpers.isTravis();
- this.isC9 = helpers.isC9();
+ this.runtimeEnv = helpers.getEnvString()
+ this.isBrowser = helpers.isBrowser()
+ this.userAgent = helpers.getUserAgentString()
+ this.isNode = helpers.isNode()
+ this.nodeVersion = helpers.getNodeVersion()
+ this.isCI = helpers.isCI()
+ this.isTravis = helpers.isTravis()
+ this.isC9 = helpers.isC9()
};
}
diff --git a/ts/smartenv.environment.ts b/ts/smartenv.environment.ts
index e617b50..85f3a3e 100644
--- a/ts/smartenv.environment.ts
+++ b/ts/smartenv.environment.ts
@@ -1,14 +1,13 @@
-///
/**
* Deals with the environment the current JS script is running in.
*/
-import plugins = require("./smartenv.plugins");
-import classes = require("./smartenv.classes");
-import objectStorage = require("./smartenv.objectstorage");
+import * as plugins from './smartenv.plugins'
+import * as classes from './smartenv.classes'
+import * as objectStorage from './smartenv.objectstorage'
-var environment:classes.Environment;
-var envDetermined:boolean = false;
+let environment: classes.Environment
+let envDetermined: boolean = false
/**
* returns the environment
@@ -16,24 +15,24 @@ var envDetermined:boolean = false;
*/
export var getEnv = function(){
if (!envDetermined) {
- environment = new classes.Environment();
- envDetermined = true; // ensure code above only runs once
+ environment = new classes.Environment()
+ envDetermined = true // ensure code above only runs once
};
- return environment;
-};
+ return environment
+}
/**
* prints the environment to console
*/
export var printEnv = function() {
if (this.getEnv().isNode) {
- console.log("running on NODE");
- var smartenvVersion = require("../package.json").version;
- console.log("node version is " + this.getEnv().nodeVersion + " and smartenv version is " + smartenvVersion);
+ console.log('running on NODE')
+ let smartenvVersion = require('../package.json').version
+ console.log('node version is ' + this.getEnv().nodeVersion + ' and smartenv version is ' + smartenvVersion)
} else {
- console.log("running on BROWSER");
- console.log("browser is " + this.getEnv().userAgent);
+ console.log('running on BROWSER')
+ console.log('browser is ' + this.getEnv().userAgent)
}
- console.log("the smartenv registration store currently holds the following properties:");
- console.log(Object.getOwnPropertyNames(objectStorage.obs.getAll()));
-};
\ No newline at end of file
+ console.log('the smartenv registration store currently holds the following properties:')
+ console.log(Object.getOwnPropertyNames(objectStorage.obs.getAll()))
+}
diff --git a/ts/smartenv.objectstorage.ts b/ts/smartenv.objectstorage.ts
index c2e9d9c..c4b5a57 100644
--- a/ts/smartenv.objectstorage.ts
+++ b/ts/smartenv.objectstorage.ts
@@ -1,40 +1,39 @@
-///
-import plugins = require("./smartenv.plugins");
-export var obs:any = {
- add: function(paramNameArg = "undefined",objectArg = "undefined") {
- if (paramNameArg == "undefined"){
- console.log("paramName is undefined");
- return;
+import plugins = require('./smartenv.plugins')
+export var obs: any = {
+ add: function(paramNameArg = 'undefined',objectArg = 'undefined') {
+ if (paramNameArg === 'undefined') {
+ console.log('paramName is undefined')
+ return
}
- if (objectArg == "undefined"){
- console.log("objectArg is undefined");
+ if (objectArg === 'undefined') {
+ console.log('objectArg is undefined')
}
- if (typeof obsItems[paramNameArg] === "undefined"){
- obsItems[paramNameArg] = objectArg;
+ if (typeof obsItems[paramNameArg] === 'undefined') {
+ obsItems[paramNameArg] = objectArg
} else {
- console.log("object is already present, so add operation has failed.");
+ console.log('object is already present, so add operation has failed.')
}
- return obsItems[paramNameArg];
+ return obsItems[paramNameArg]
},
replace: function(paramNameArg,objectArg){
- obsItems[paramNameArg] = objectArg;
+ obsItems[paramNameArg] = objectArg
},
merge: function(paramNameArg,objectArg){
- if(!(typeof obsItems[paramNameArg] === "undefined")){
- obsItems[paramNameArg] = plugins._.assign(obsItems[paramNameArg],objectArg);
+ if (!(typeof obsItems[paramNameArg] === 'undefined')) {
+ obsItems[paramNameArg] = plugins._.assign(obsItems[paramNameArg],objectArg)
} else {
- console.log("object is not present, so there is nothing to merge");
+ console.log('object is not present, so there is nothing to merge')
}
},
get: function(keyName) {
- return obsItems[keyName];
+ return obsItems[keyName]
},
getAll: function () {
- return obsItems;
+ return obsItems
},
addComplete: function(itemsArg) {
- obsItems = plugins._.assign(obsItems,itemsArg);
- return obsItems;
+ obsItems = plugins._.assign(obsItems,itemsArg)
+ return obsItems
}
-};
-export var obsItems:any = {};
\ No newline at end of file
+}
+export var obsItems: any = {}
diff --git a/ts/smartenv.plugins.ts b/ts/smartenv.plugins.ts
index 487e40a..629777d 100644
--- a/ts/smartenv.plugins.ts
+++ b/ts/smartenv.plugins.ts
@@ -1,7 +1,8 @@
-///
-var plugins = {
- Q: require("q"),
- _: require("lodash")
-};
+import 'typings-global'
+import * as Q from 'q'
+import * as _ from 'lodash'
-export = plugins;
\ No newline at end of file
+export {
+ Q,
+ _
+}
diff --git a/ts/typings.json b/ts/typings.json
deleted file mode 100644
index 036cdfa..0000000
--- a/ts/typings.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "ambientDependencies": {
- "node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts"
- }
-}
diff --git a/tslint.json b/tslint.json
new file mode 100644
index 0000000..45052ad
--- /dev/null
+++ b/tslint.json
@@ -0,0 +1,3 @@
+{
+ "extends": "tslint-config-standard"
+}