Skip to content

Commit

Permalink
fix(nx, turbo): emit utils js and types
Browse files Browse the repository at this point in the history
  • Loading branch information
EladBezalel committed Sep 27, 2023
1 parent 8c5d4cb commit 50b8457
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libs/nx/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "@traf/nx",
"version": "0.0.11",
"type": "commonjs",
"type": "module",
"main": "index.js",
"types": "src/index.d.ts",
"license": "MIT",
"description": "A cli tool that wraps `@traf/core` to be used with Nx.",
"repository": {
Expand Down
9 changes: 9 additions & 0 deletions libs/nx/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@
"sourceRoot": "libs/nx/src",
"projectType": "library",
"targets": {
"emit-types": {
"executor": "nx:run-commands",
"options": {
"command": "npx tsc --emitDeclarationOnly --declaration --outDir dist --project libs/nx/tsconfig.lib.json"
}
},
"build": {
"dependsOn": ["emit-types"],
"executor": "@nx/esbuild:esbuild",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/nx",
"main": "libs/nx/src/cli.ts",
"additionalEntryPoints": ["libs/nx/src/index.ts"],
"tsConfig": "libs/nx/tsconfig.lib.json",
"assets": ["libs/nx/*.md", "libs/nx/bin/*"],
"generatePackageJson": true,
"deleteOutputPath": false,
"esbuildOptions": {
"banner": {
"js": "import { dirname as __dirname__ } from 'path';import { fileURLToPath } from 'url';import { createRequire as topLevelCreateRequire } from 'module';const require = topLevelCreateRequire(import.meta.url);const __filename = fileURLToPath(import.meta.url);const __dirname = __dirname__(__filename);"
Expand Down
1 change: 1 addition & 0 deletions libs/nx/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './nx';
4 changes: 3 additions & 1 deletion libs/turbo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "@traf/turbo",
"version": "0.0.11",
"type": "commonjs",
"type": "module",
"main": "index.js",
"types": "src/index.d.ts",
"license": "MIT",
"description": "A cli tool that wraps `@traf/core` to be used with Turborepo.",
"repository": {
Expand Down
9 changes: 9 additions & 0 deletions libs/turbo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@
"sourceRoot": "libs/turbo/src",
"projectType": "library",
"targets": {
"emit-types": {
"executor": "nx:run-commands",
"options": {
"command": "npx tsc --emitDeclarationOnly --declaration --outDir dist --project libs/turbo/tsconfig.lib.json"
}
},
"build": {
"dependsOn": ["emit-types"],
"executor": "@nx/esbuild:esbuild",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/turbo",
"main": "libs/turbo/src/cli.ts",
"additionalEntryPoints": ["libs/turbo/src/index.ts"],
"tsConfig": "libs/turbo/tsconfig.lib.json",
"assets": ["libs/turbo/*.md", "libs/turbo/bin/*"],
"generatePackageJson": true,
"deleteOutputPath": false,
"esbuildOptions": {
"banner": {
"js": "import { dirname as __dirname__ } from 'path';import { fileURLToPath } from 'url';import { createRequire as topLevelCreateRequire } from 'module';const require = topLevelCreateRequire(import.meta.url);const __filename = fileURLToPath(import.meta.url);const __dirname = __dirname__(__filename);"
Expand Down
1 change: 1 addition & 0 deletions libs/turbo/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './turbo';

0 comments on commit 50b8457

Please sign in to comment.