Skip to content

Commit

Permalink
feat: add cjs build (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoncool authored and tsufiev committed Apr 14, 2022
1 parent d906678 commit 59c09a2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@
"description": "i18n library for Yandex Cloud UI services",
"version": "0.4.0",
"license": "MIT",
"main": "build/esm/index.js",
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/esm/index.d.ts",
"repository": "[email protected]:yandex-cloud/i18n",
"scripts": {
"build": "tsc",
"build": "npm run build:clean && npm run build:compile",
"build:compile": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json",
"build:clean": "rm -rf build",
"lint": "eslint src/*",
"prepublish": "rm -rf build && npm run build",
"prepublish": "npm run build",
"test": "jest",
"typecheck": "tsc --noEmit"
},
"files": [
"example",
"build"
],
"types": "build/esm/index.d.ts",
"publishConfig": {
"access": "public"
},
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "@yandex-cloud/tsconfig/tsconfig",
"compilerOptions": {
"outDir": "build/cjs",
"declaration": true
},
"include": ["src/*.ts"],
"exclude": ["**/*.spec.ts"]
}

0 comments on commit 59c09a2

Please sign in to comment.