diff --git a/.travis.yml b/.travis.yml index df27686d..850c82b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ node_js: script: - yarn test - yarn build + - yarn build:modules matrix: allow_failures: [] fast_finish: true diff --git a/package.json b/package.json index 3f15f69b..59e9a935 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,15 @@ "type": "git", "url": "https://github.com/streamich/libreact.git" }, - "files": ["lib/"], + "files": [ + "lib/", + "modules/" + ], "scripts": { "start": "yarn test:story", "clean": "rimraf lib modules && yarn test:story:clean && yarn docs:clean", "build": "tsc", + "build:modules": "tsc --project tsconfig.es6.json", "test": "yarn test:server && yarn test:client", "test:server": "mocha -r ts-node/register src/**/*.test-server.ts*", "test:client": "jest", diff --git a/tsconfig.es6.json b/tsconfig.es6.json new file mode 100644 index 00000000..f2eb5ad0 --- /dev/null +++ b/tsconfig.es6.json @@ -0,0 +1,36 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "Node", + "removeComments": true, + "noImplicitAny": false, + "outDir": "./modules", + "allowJs": false, + "allowSyntheticDefaultImports": true, + "jsx": "react", + "jsxFactory": "h", + "skipDefaultLibCheck": true, + "skipLibCheck": true, + "experimentalDecorators": true, + "importHelpers": true, + "pretty": true, + "sourceMap": false, + "esModuleInterop": true, + "noEmitHelpers": true, + "noErrorTruncation": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "declaration": true, + "lib": ["dom", "es5", "es6", "es7", "es2015", "es2017", "scripthost", "dom.iterable"] + }, + "include": ["typing.d.ts", "src"], + "exclude": [ + "node_modules", + "lib", + "**/__tests__/**/*", + "**/__story__/**/*", + "*.test.ts", + "*.test.tsx" + ] +}