From 951b002f5ef58ee547f4b5aa736a0dd6dcbbc83b Mon Sep 17 00:00:00 2001 From: Shingo Yamazaki Date: Wed, 6 Feb 2019 02:08:14 +0900 Subject: [PATCH] #290 Enable to compile JS files with tsc --- package.json | 3 ++- tsconfig.json | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index e2ef6331c..0dd20a270 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,8 @@ "lint:src": "eslint --ext .js src/scripts/**", "lint:stories": "eslint --ext .js stories/**", "lint:test": "eslint --ext .js test/**", - "build": "babel -d lib/ src/", + "build:old": "babel -d lib/ src/", + "build": "tsc -p .", "build:assets": "cp -r node_modules/@salesforce-ux/design-system/assets public", "build:storybook": "build-storybook -o public", "deploy": "npm-run-all build:storybook build:assets deploy:ghpage", diff --git a/tsconfig.json b/tsconfig.json index 2c7a9b058..d752d474c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,15 +4,15 @@ "target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ + "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ + "declaration": false, /* Generates corresponding '.d.ts' file. */ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ // "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "lib", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + "rootDir": "src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "removeComments": true, /* Do not emit comments to output. */ // "noEmit": true, /* Do not emit outputs. */ @@ -56,5 +56,8 @@ /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - } -} \ No newline at end of file + }, + "include": [ + "src/**/*" + ] +}