diff --git a/dist/main.js b/dist/main.js new file mode 100644 index 0000000..dff2f25 --- /dev/null +++ b/dist/main.js @@ -0,0 +1,11 @@ +class Test { + constructor() { + console.log("Test constructed"); + } + exec() { + console.log("Hello world"); + } +} +const test = new Test(); +test.exec(); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..d94fe6e --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,42 @@ +0 info it worked if it ends with ok +1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', +1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', +1 verbose cli 'start' ] +2 info using npm@2.15.9 +3 info using node@v4.5.0 +4 verbose run-script [ 'prestart', 'start', 'poststart' ] +5 info prestart dispatcher_ng@1.0.0 +6 info start dispatcher_ng@1.0.0 +7 verbose unsafe-perm in lifecycle true +8 info dispatcher_ng@1.0.0 Failed to exec start script +9 verbose stack Error: dispatcher_ng@1.0.0 start: `node dist/main.js` +9 verbose stack Exit status 1 +9 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:217:16) +9 verbose stack at emitTwo (events.js:87:13) +9 verbose stack at EventEmitter.emit (events.js:172:7) +9 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) +9 verbose stack at emitTwo (events.js:87:13) +9 verbose stack at ChildProcess.emit (events.js:172:7) +9 verbose stack at maybeClose (internal/child_process.js:829:16) +9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) +10 verbose pkgid dispatcher_ng@1.0.0 +11 verbose cwd C:\Users\dehottgw\workspaces\workspace-nodejs\dispatcher_ng +12 error Windows_NT 6.1.7601 +13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" +14 error node v4.5.0 +15 error npm v2.15.9 +16 error code ELIFECYCLE +17 error dispatcher_ng@1.0.0 start: `node dist/main.js` +17 error Exit status 1 +18 error Failed at the dispatcher_ng@1.0.0 start script 'node dist/main.js'. +18 error This is most likely a problem with the dispatcher_ng package, +18 error not with npm itself. +18 error Tell the author that this fails on your system: +18 error node dist/main.js +18 error You can get information on how to open an issue for this project with: +18 error npm bugs dispatcher_ng +18 error Or if that isn't available, you can get their info via: +18 error +18 error npm owner ls dispatcher_ng +18 error There is likely additional logging output above. +19 verbose exit [ 1, true ] diff --git a/package.json b/package.json index f5f2e71..3d74c55 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "", "main": "main.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "build": "tsc -p ./", + "start": "node dist/main.js" }, "repository": { "type": "git", @@ -18,7 +20,11 @@ "homepage": "https://gitlab.com/wolutator/dispatcher_ng#README", "dependencies": { "mqtt": "^2.15.0", - "node-cron": "^1.2.1", "simple-node-logger": "^0.93.33" + }, + "devDependencies": { + "@types/mqtt": "^2.5.0", + "@types/node": "^8.5.8", + "typescript": "^2.6.2" } } diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..4f5f349 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,14 @@ +class Test { + constructor() { + console.log("Test constructed") + } + + exec() : void { + console.log("Hello world") + } +} + +const test = new Test() +test.exec() + + diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..11656a5 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "lib": ["es6"], + "strictNullChecks": true, + "noImplicitAny": true, + "noEmitOnError": true, + "outDir": "dist", + "typeRoots": [ + "node_modules/@types" + ] + }, + "include": [ + "src/**/*.*" + ], + "exclude": [ + "node_modules", + "dist", + "proto", + "kernel" + ] +}