From bd6c856ebb6b71f5515733535ee07721035ccd8e Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Sat, 11 May 2019 14:12:16 +0200 Subject: [PATCH] Prepared project to move to Typescript --- .gitignore | 1 + .npmignore | 2 ++ package.json | 4 +++- tsconfig.json | 11 +++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index a23e66e..0f2d170 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ passModels/ certificates/ *.code-workspace .vscode/ +*.js diff --git a/.npmignore b/.npmignore index a680d0e..322b356 100644 --- a/.npmignore +++ b/.npmignore @@ -3,3 +3,5 @@ certificates/ *.code-workspace examples/ .vscode/ +*.ts +!*.d.ts diff --git a/package.json b/package.json index 389e9c3..1efd4b8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "The easiest way to generate custom Apple Wallet passes in Node.js", "main": "index.js", "scripts": { - "test": "jasmine spec/index.js" + "build": "tsc", + "prepublish": "npm run build", + "test": "npm run build && jasmine spec/index.js" }, "author": "Alexander Patrick Cerutti", "license": "MIT", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..6665423 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "target": "es2018", + "esModuleInterop": true, + "newLine": "LF", + "noImplicitAny": true, + "noUnusedLocals": true, + } +}