diff --git a/.circleci/config.yml b/.circleci/config.yml index b7360825de..c594d0ab1f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,7 @@ references: IGNORE_COMMIT_MESSAGE: 'chore(release): publish' NODE_OPTIONS: '--max_old_space_size=8196' CIRCLE_TEST_REPORTS: /tmp/test-results + NX_CLOUD: false yarn_cache_key_1: &yarn_cache_key_1 v2-yarn-{{ arch }}-{{ checksum "yarn.lock" }} diff --git a/nx.json b/nx.json index c3f84ca4d7..bf3d0091c5 100644 --- a/nx.json +++ b/nx.json @@ -11,7 +11,6 @@ "build-storybook" ], "parallel": 3, - "useDaemonProcess": false, "accessToken": "ZmVjZWYxNzctYTdmZC00ODYzLTg4MzEtZTE1YTVmZDdkZmY1fHJlYWQ=" } } @@ -26,6 +25,10 @@ }, "namedInputs": { "babelConfig": ["{workspaceRoot}/babel.defaults.js"], + "ci": [ + "{workspaceRoot}/.circleci/config.yml", + "{workspaceRoot}/.github/push.yml" + ], "default": ["{projectRoot}/**/*"], "production": [ "default", @@ -37,7 +40,7 @@ "targetDefaults": { "build": { "dependsOn": ["^build"], - "inputs": ["production", "^production", "babelConfig"] + "inputs": ["production", "^production", "babelConfig", "ci"] }, "test": { "dependsOn": ["^build"], @@ -45,7 +48,8 @@ "default", "^production", "{workspaceRoot}/jest.preset.js", - "babelConfig" + "babelConfig", + "ci" ] } }, diff --git a/package.json b/package.json index dddfa6f4e1..2505ac8ffd 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,8 @@ "build-all": "yarn build", "build-storybook": "nx run styleguide:build-storybook && lerna run copy-storybook", "build:graph": "nx graph", - "clear-modules": "lerna clean -y && rm -rf node_modules", + "clean-builds": "nx run-many --target=clean --all", + "clear-modules": "yarn clean-builds && lerna clean -y && rm -rf node_modules", "deploy": "cp -r ./dist/static/* ./dist/docs && gh-pages -b gh-pages -d dist", "format": "yarn lint:fix && yarn prettier --write", "format:verify": "yarn prettier --check", diff --git a/packages/gamut-icons/project.json b/packages/gamut-icons/project.json index 040072e365..1fe2a72193 100644 --- a/packages/gamut-icons/project.json +++ b/packages/gamut-icons/project.json @@ -28,11 +28,19 @@ }, "test": { "executor": "@nx/jest:jest", + "dependsOn": ["build"], "outputs": ["{workspaceRoot}/coverage/packages/gamut-icons"], "options": { "jestConfig": "packages/gamut-icons/jest.config.ts", "passWithNoTests": true } + }, + "clean": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "command": "rm -rf ./dist" + } } }, "tags": [] diff --git a/packages/gamut-illustrations/project.json b/packages/gamut-illustrations/project.json index 88d2442f89..428715436d 100644 --- a/packages/gamut-illustrations/project.json +++ b/packages/gamut-illustrations/project.json @@ -24,6 +24,13 @@ "jestConfig": "packages/gamut-illustrations/jest.config.ts", "passWithNoTests": true } + }, + "clean": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "command": "rm -rf ./dist" + } } }, "tags": [] diff --git a/packages/gamut-patterns/project.json b/packages/gamut-patterns/project.json index 42be14fb5e..904beabe92 100644 --- a/packages/gamut-patterns/project.json +++ b/packages/gamut-patterns/project.json @@ -33,6 +33,13 @@ "jestConfig": "packages/gamut-patterns/jest.config.ts", "passWithNoTests": true } + }, + "clean": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "command": "rm -rf ./dist" + } } }, "tags": [] diff --git a/packages/gamut-styles/project.json b/packages/gamut-styles/project.json index 862618e8e8..3c95e1b97b 100644 --- a/packages/gamut-styles/project.json +++ b/packages/gamut-styles/project.json @@ -20,11 +20,19 @@ }, "test": { "executor": "@nx/jest:jest", + "dependsOn": ["^build"], "outputs": ["{workspaceRoot}/coverage/packages/gamut-styles"], "options": { "jestConfig": "packages/gamut-styles/jest.config.ts", "passWithNoTests": false } + }, + "clean": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "command": "rm -rf ./dist" + } } }, "tags": [] diff --git a/packages/gamut-tests/project.json b/packages/gamut-tests/project.json index ced4484724..2b66f526d2 100644 --- a/packages/gamut-tests/project.json +++ b/packages/gamut-tests/project.json @@ -24,6 +24,13 @@ "jestConfig": "packages/gamut-tests/jest.config.ts", "passWithNoTests": true } + }, + "clean": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "command": "rm -rf ./dist" + } } }, "tags": [] diff --git a/packages/gamut/project.json b/packages/gamut/project.json index 6cc9b02a2e..b3ba248349 100644 --- a/packages/gamut/project.json +++ b/packages/gamut/project.json @@ -19,12 +19,20 @@ } }, "test": { + "dependsOn": ["^build"], "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/packages/gamut"], "options": { "jestConfig": "packages/gamut/jest.config.ts", "passWithNoTests": true } + }, + "clean": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "command": "rm -rf ./dist" + } } }, "tags": [] diff --git a/packages/variance/project.json b/packages/variance/project.json index be6e4fa4fe..684b21e5c7 100644 --- a/packages/variance/project.json +++ b/packages/variance/project.json @@ -24,6 +24,13 @@ "jestConfig": "packages/variance/jest.config.ts", "passWithNoTests": true } + }, + "clean": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "command": "rm -rf ./dist" + } } }, "tags": []