diff --git a/.eslintrc.json b/.eslintrc.json index 98ce199..2676f4d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,8 @@ "ignorePatterns": [ "*.d.ts", - "*.js" + "*.js", + "dist" ], "env": { diff --git a/package.json b/package.json index 870a9d3..6383b47 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,10 @@ }, "scripts": { "copy-styles": "copyfiles -u 1 src/**/*.scss", - "build:cjs": "tsc -b ./tsconfig.cjs.json && yarn copy-styles dist/cjs", - "build:esm": "tsc -b ./tsconfig.esm.json && yarn copy-styles dist/esm", + "rename-js-ext:cjs": "renamer -f '.js' -r '.cjs' './dist/cjs/**/*.*(js|js.map)'", + "build:cjs": "tsc -b ./tsconfig.cjs.json && yarn rename-js-ext:cjs && yarn copy-styles dist/cjs", + "rename-js-ext:esm": "renamer -f '.js' -r '.mjs' './dist/esm/**/*.*(js|js.map)'", + "build:esm": "tsc -b ./tsconfig.esm.json && yarn rename-js-ext:esm && yarn copy-styles dist/esm", "build:types": "tsc -b ./tsconfig.types.json", "clean": "rm -rf dist", "build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:types",