From 9ace905b3705ea77594b1a94700eaade4bf65d35 Mon Sep 17 00:00:00 2001 From: DanSnow Date: Fri, 12 Apr 2024 13:22:33 +0800 Subject: [PATCH] chore: setup root moon project --- .moon/workspace.yml | 13 ++++++++++--- moon.yml | 14 ++++++++++++++ package.json | 4 ++-- packages/playground/moon.yml | 12 ++++++++---- 4 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 moon.yml diff --git a/.moon/workspace.yml b/.moon/workspace.yml index 0937dbfb..4afb32b6 100644 --- a/.moon/workspace.yml +++ b/.moon/workspace.yml @@ -12,7 +12,14 @@ $schema: 'https://moonrepo.dev/schemas/workspace.json' # path to the project folder as the map value. File paths are relative from the workspace root, # and cannot reference projects located outside the workspace boundary. projects: - - 'packages/*' + karbon-mono: . + code-highlight: packages/code-highlight + create-karbon: packages/create-karbon + custom-field: packages/custom-field + jose-browser: packages/jose-browser + karbon: packages/karbon + playground: packages/playground + typesense-xior: packages/typesense-xior # Configures the version control system to utilize within the workspace. A VCS # is required for determining touched (added, modified, etc) files, calculating file hashes, @@ -20,9 +27,9 @@ projects: vcs: # The client to use when managing the repository. # Accepts "git". Defaults to "git". - manager: 'git' + manager: git # The default branch (master/main/trunk) in the repository for comparing the # local branch against. For git, this is is typically "master" or "main", # and must include the remote prefix (before /). - defaultBranch: 'main' + defaultBranch: main diff --git a/moon.yml b/moon.yml new file mode 100644 index 00000000..8b8cd74b --- /dev/null +++ b/moon.yml @@ -0,0 +1,14 @@ +id: karbon-monorepo + +tasks: + build: + command: noop + deps: + - playground:dev-prepare + test: + command: vitest + inputs: + - packages/**/* + - vitest.workspace.ts + deps: + - ~:build diff --git a/package.json b/package.json index fc57ae02..eb503cfc 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "private": true, "packageManager": "yarn@4.1.1", "scripts": { - "build": "moon run playground:dev-prepare", - "test": "vitest" + "build": "moon run build", + "test": "moon run test" }, "workspaces": [ "packages/*" diff --git a/packages/playground/moon.yml b/packages/playground/moon.yml index d0fbb239..5b5b00e7 100644 --- a/packages/playground/moon.yml +++ b/packages/playground/moon.yml @@ -9,12 +9,14 @@ tasks: - build platform: node deps: - - ^:build + - karbon:build + - custom-field:build bundle: command: karbon platform: node deps: - - ^:build + - karbon:build + - custom-field:build dev: command: - nuxt @@ -23,14 +25,16 @@ tasks: platform: node deps: - dev-prepare - - ^:build + - karbon:build + - custom-field:build dev-prepare: command: - nuxt - prepare platform: node deps: - - ^:build + - karbon:build + - custom-field:build generate: command: - nuxt