Skip to content

Commit

Permalink
update build and typescript config
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Apr 21, 2022
1 parent 73c15ed commit 60e0839
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
node_modules
lib
es
types
coverage
examples
.vscode
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
"description": "A library to easily use Split JS SDK with Redux and React Redux",
"main": "lib/index.js",
"module": "es/index.js",
"types": "lib/index.d.ts",
"types": "types/index.d.ts",
"files": [
"README.md",
"CONTRIBUTORS-GUIDE.md",
"LICENSE",
"CHANGES.txt",
"src",
"lib",
"es"
"es",
"types"
],
"scripts": {
"build": "rimraf lib/* es/* && tsc && tsc -m es2015 -d false --outDir es",
"build": "rimraf lib/* es/* types/* && tsc && tsc -m commonjs --outDir lib -d true --declarationDir types",
"postbuild": "./version_replace.sh",
"check": "npm run check:lint && npm run check:types",
"check:lint": "tslint -p tsconfig.json",
Expand Down Expand Up @@ -81,7 +82,7 @@
"rimraf": "^3.0.0",
"ts-jest": "^27.0.5",
"tslint": "^5.20.1",
"typescript": "^4.0.2"
"typescript": "4.4.4"
},
"peerDependencies": {
"redux": "^2.0.0 || ^3.0.0 || ^4.0.0-0",
Expand Down
14 changes: 6 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"module": "es6", /* 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. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
// "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": false, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
"sourceMap": false, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "lib", /* Redirect output structure to the directory. */
"outDir": "es", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */

// @TODO uncomment the following when migrating to JS-commons and Rollup, to avoid duplicated helpers code in builds.
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
"importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */

Expand Down

0 comments on commit 60e0839

Please sign in to comment.