Skip to content

Commit

Permalink
feat(monorepo): Update target tasks to use tsup plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sullivanpj committed Dec 26, 2024
1 parent 235ed75 commit 914c970
Show file tree
Hide file tree
Showing 13 changed files with 732 additions and 449 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ CONSOLA_LEVEL=1000
# For more info, see: https://nx.dev/concepts/inferred-tasks
# NX_ADD_PLUGINS=false


ROLLUP_WATCH=false
NX_VERBOSE_LOGGING=true
# ROLLUP_WATCH=false
20 changes: 0 additions & 20 deletions build/core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,6 @@
"sourceRoot": "build/core/src",
"tags": ["platform:node"],
"targets": {
"build-base": {
"cache": false,
"executor": "nx:run-commands",
"dependsOn": ["clean", "^build"],
"options": {
"command": "tsup --config=\"tsup.config.ts\"",
"cwd": "{projectRoot}"
}
},
"build": {
"executor": "nx:run-commands",
"dependsOn": ["build-base"],
"options": {
"commands": [
"pnpm copyfiles LICENSE dist/build/core",
"pnpm copyfiles --up=2 ./build/core/README.md ./build/core/package.json dist/build/core",
"pnpm copyfiles --up=3 ./build/core/dist/* dist/build/core/dist"
]
}
},
"nx-release-publish": {
"executor": "@storm-software/workspace-tools:npm-publish"
}
Expand Down
2 changes: 1 addition & 1 deletion build/core/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-------------------------------------------------------------------*/

import { getTsupConfig } from "@storm-stack/tools-config";
import { getTsupConfig } from "@storm-stack/tools-config/tsup.shared";
import type { Options } from "tsup";

const config: Options = getTsupConfig({
Expand Down
22 changes: 11 additions & 11 deletions build/nx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
"directory": "build/nx"
},
"private": false,
"main": "./index.js",
"main": "./dist/index.js",
"exports": {
".": "./index.js",
".": "./dist/index.js",
"./package.json": "./package.json",
"./migrations.json": "./migrations.json",
"./generators.json": "./generators.json",
"./generators/*/schema.json": "./generators/*/schema.json",
"./executors.json": "./executors.json",
"./executors/*/schema.json": "./executors/*/schema.json"
},
"typings": "./index.d.ts",
"typings": "./dist/index.d.ts",
"peerDependencies": {
"@nx/devkit": "^20.0.11",
"@nx/js": "^20.0.11",
"@nx/workspace": "^20.0.11",
"@nx/devkit": "20.3.0",
"@nx/js": "20.3.0",
"@nx/workspace": "20.3.0",
"@samchon/openapi": "^2.3.1",
"@swc/core": "1.7.26",
"@swc/wasm": "^1.10.1",
"nx": "^20.0.11"
"nx": "20.3.0"
},
"peerDependenciesMeta": {
"@nx/devkit": {
Expand All @@ -51,14 +51,14 @@
"@storm-software/workspace-tools": "latest"
},
"devDependencies": {
"@nx/devkit": "^20.0.11",
"@nx/js": "^20.0.11",
"@nx/workspace": "^20.0.11",
"@nx/devkit": "20.3.0",
"@nx/js": "20.3.0",
"@nx/workspace": "20.3.0",
"@samchon/openapi": "^2.3.1",
"@swc/core": "1.7.26",
"@swc/wasm": "^1.10.1",
"@types/node": "^22.10.2",
"nx": "^20.0.11",
"nx": "20.3.0",
"tsup": "^8.3.5"
},
"executors": "./executors.json"
Expand Down
8 changes: 0 additions & 8 deletions build/nx/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
"projectType": "library",
"tags": ["platform:node"],
"targets": {
"build-base": {
"executor": "nx:run-commands",
"dependsOn": ["clean", "^build"],
"options": {
"command": "tsup --config=\"tsup.config.ts\"",
"cwd": "{projectRoot}"
}
},
"build": {
"executor": "nx:run-commands",
"dependsOn": ["build-base"],
Expand Down
2 changes: 1 addition & 1 deletion build/nx/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-------------------------------------------------------------------*/

import { getTsupConfig } from "@storm-stack/tools-config";
import { getTsupConfig } from "@storm-stack/tools-config/tsup.shared";
import type { Options } from "tsup";

const config: Options = getTsupConfig({
Expand Down
19 changes: 0 additions & 19 deletions build/plugin/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,6 @@
"sourceRoot": "build/plugin/src",
"tags": ["platform:node"],
"targets": {
"build-base": {
"executor": "nx:run-commands",
"dependsOn": ["clean", "^build"],
"options": {
"command": "tsup --config=\"tsup.config.ts\"",
"cwd": "{projectRoot}"
}
},
"build": {
"executor": "nx:run-commands",
"dependsOn": ["build-base"],
"options": {
"commands": [
"pnpm copyfiles LICENSE dist/build/plugin",
"pnpm copyfiles --up=2 ./build/plugin/README.md ./build/plugin/package.json dist/build/plugin",
"pnpm copyfiles --up=3 ./build/plugin/dist/* dist/build/plugin/dist"
]
}
},
"nx-release-publish": {
"executor": "@storm-software/workspace-tools:npm-publish"
}
Expand Down
2 changes: 1 addition & 1 deletion build/plugin/src/core/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function generateESLintFlatConfigs(imports: Import[], eslint: ESLint) {
const userConfigs = eslint.userConfigs ?? [];

return `
// Generated by unplugin-storm-stack
// Generated by @storm-stack/build-plugin
import { getStormConfig } from "@storm-software/eslint";
Expand Down
4 changes: 3 additions & 1 deletion build/plugin/src/core/typia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ function transform(
};
}

/** Warn diagnostics */
/**
* Warn diagnostics.
*/
function warnDiagnostic(
diagnostics: ts.Diagnostic[],
transformed: ts.SourceFile[],
Expand Down
2 changes: 1 addition & 1 deletion build/plugin/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-------------------------------------------------------------------*/

import { getTsupConfig } from "@storm-stack/tools-config";
import { getTsupConfig } from "@storm-stack/tools-config/tsup.shared";
import type { Options } from "tsup";

const config: Options = getTsupConfig({
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@
"readme-gen": "pnpm storm-git readme-gen --templates=\"docs/readme-templates\"",
"release": "pnpm storm-git release",
"start": "nx serve",
"syncpack": "pnpm syncpack fix-mismatches --config=\"./syncpack.config.js\""
"syncpack": "pnpm exec syncpack fix-mismatches --config=\"./syncpack.config.js\""
},
"dependencies": {
"@commitlint/cli": "^19.5.0",
"@ls-lint/ls-lint": "^2.2.3",
"@nx/devkit": "^20.0.11",
"@nx/eslint-plugin": "20.0.11",
"@nx/jest": "20.0.11",
"@nx/js": "^20.0.11",
"@nx/plugin": "20.0.11",
"@nx/react": "20.0.11",
"@nx/workspace": "^20.0.11",
"@nx/devkit": "20.3.0",
"@nx/eslint-plugin": "20.3.0",
"@nx/jest": "20.3.0",
"@nx/js": "20.3.0",
"@nx/plugin": "20.3.0",
"@nx/react": "20.3.0",
"@nx/workspace": "20.3.0",
"@storm-software/build-tools": "latest",
"@storm-software/config": "latest",
"@storm-software/eslint": "latest",
Expand Down Expand Up @@ -124,7 +124,7 @@
"log4brains": "1.0.1",
"ls-lint": "^0.1.2",
"make-dir-cli": "^4.0.0",
"nx": "^20.0.11",
"nx": "20.3.0",
"prettier": "^3.3.3",
"react": "19.0.0-rc-f6cce072-20240723",
"react-dom": "19.0.0-rc-f6cce072-20240723",
Expand Down
Loading

0 comments on commit 914c970

Please sign in to comment.