Skip to content

Commit

Permalink
Merge pull request #49 from arkahna/bugfix/UpdateNxPluginPackage
Browse files Browse the repository at this point in the history
Fix package process
  • Loading branch information
emlyn-arkahna authored Oct 27, 2023
2 parents 255976f + 41f499f commit 40c66bf
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changeset/modern-tips-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@featureboard/code-generator': patch
'@featureboard/nx-plugin': patch
---

Fix package process
5 changes: 4 additions & 1 deletion libs/code-generator/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"executor": "nx:run-commands",
"options": {
"commands": [
"tsup src/index.ts -d dist --sourcemap --format esm,cjs --dts --tsconfig tsconfig.build.json"
"tsup src/index.ts -d dist --sourcemap --format esm --legacy-output",
"tsup src/index.ts -d dist/legacycjs --sourcemap --format cjs --legacy-output",
"tsup src/index.ts -d dist --sourcemap --format esm,cjs",
"tsc --emitDeclarationOnly --declaration --outDir dist"
],
"cwd": "libs/code-generator",
"parallel": false
Expand Down
2 changes: 1 addition & 1 deletion libs/code-generator/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.settings.json",
"compilerOptions": {
"outDir": "./tsc-out",
"outDir": "./dist",
"rootDir": "./src",
"types": [
"node",
Expand Down
13 changes: 11 additions & 2 deletions libs/nx-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@
"prompts": "^2.4.2"
},
"publishConfig": {
"main": "dist/index.js",
"types": "dist/index.d.ts"
"main": "dist/legacycjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.cjs"
}
}
}
}
7 changes: 5 additions & 2 deletions libs/nx-plugin/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
"executor": "nx:run-commands",
"options": {
"commands": [
"tsup src/index.ts -d dist --sourcemap --format cjs --legacy-output",
"tsup src/index.ts -d dist --sourcemap --format esm --legacy-output --external @featureboard/code-generator",
"tsup src/index.ts -d dist/legacycjs --sourcemap --format cjs --legacy-output --external @featureboard/code-generator",
"tsup src/index.ts -d dist --sourcemap --format esm,cjs --external @featureboard/code-generator",
"tsc --emitDeclarationOnly --declaration --outDir dist"
],
"cwd": "libs/nx-plugin",
"parallel": false
}
},
"dependsOn": ["^package"]
},
"lint": {
"executor": "@nx/eslint:lint",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

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

0 comments on commit 40c66bf

Please sign in to comment.