Skip to content

Commit

Permalink
fix: remove sourcemap and compile to commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ritesh404 committed Dec 2, 2020
1 parent 871feef commit 6c55206
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "cross-env npm run build:clean && NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\", \"noImplicitAny\": false}' nyc tape --reporter=lcov --require ts-node/register src/**/*.test.ts | tap-spec",
"check-coverage": "nyc check-coverage",
"report-coverage": "cat ./coverage/lcov.info | codecov",
"build:typescript": "cross-env tsc",
"build:typescript": "cross-env tsc -m \"commonjs\"",
"build:js": "cross-env rollup -c",
"build": "cross-env npm run build:clean && rollup -c && npm run build:typescript && cp -r ./dist/* . && rm -rf ./dist",
"build:clean": "cross-env rm -rf ./dist && rm -rf ./interfaces && rm -rf ./functions && rm -rf ./data-types && rm -rf ./index.* && rm -rf ./kudo.*",
Expand Down
9 changes: 3 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,17 @@ export default [
{
file: "dist/kudo.iife.js",
format: "iife",
name: "kudoJS",
sourcemap: true
name: "kudoJS"
},
{
file: "dist/kudo.cjs.js",
format: "cjs",
name: "kudoJS",
sourcemap: true
name: "kudoJS"
},
{
file: "dist/kudo.es.js",
format: "es",
name: "kudoJS",
sourcemap: true
name: "kudoJS"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
"module": "es2015" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"module": "ES2015" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"lib": [
"es6"
] /* Specify library files to be included in the compilation: */,
Expand All @@ -15,7 +15,7 @@
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true /* Generates corresponding '.d.ts' file. */,
// "declarationDir": "./dist/types/",
"sourceMap": true /* Generates corresponding '.map' file. */,
"sourceMap": false /* Generates corresponding '.map' file. */,
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./dist" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
Expand Down

0 comments on commit 6c55206

Please sign in to comment.