From fc47e2c9b1bd1dfdaeea7b86227c7b75be14a071 Mon Sep 17 00:00:00 2001 From: Alexandre Galays Date: Tue, 8 Aug 2017 16:56:03 +0200 Subject: [PATCH] Add package.json/module --- .gitignore | 1 + package.json | 5 ++++- tsconfig.json | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 45b87e4..91de20a 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ node_modules /vnode.js.map /modules /helpers +/es diff --git a/package.json b/package.json index 4ad7158..8355532 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.7.0", "description": "A virtual DOM library with focus on simplicity, modularity, powerful features and performance.", "main": "snabbdom.js", + "module": "es/snabbdom.js", "typings": "snabbdom.d.ts", "directories": { "example": "examples", @@ -26,7 +27,9 @@ "scripts": { "pretest": "npm run compile", "test": "testem", - "compile": "tsc", + "compile": "npm run compile-es && npm run compile-commonjs", + "compile-es": "tsc --outDir es --module es6 --moduleResolution node", + "compile-commonjs": "tsc --outDir ./", "prepublish": "npm run compile", "release-major": "xyz --repo git@github.com:paldepind/snabbdom.git --increment major", "release-minor": "xyz --repo git@github.com:paldepind/snabbdom.git --increment minor", diff --git a/tsconfig.json b/tsconfig.json index 3bd5be3..ed1e9b5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,6 @@ { "compilerOptions": { - "module": "commonjs", "target": "ES5", - "outDir": "./", "noImplicitAny": true, "sourceMap": true, "strictNullChecks": true,