Skip to content

Commit

Permalink
Fix build output
Browse files Browse the repository at this point in the history
  • Loading branch information
brijeshb42 committed May 14, 2024
1 parent 9091fad commit 960394c
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
- checkout
- install_js
- run:
name: Tests fake browser
name: Unit Tests
command: pnpm test:coverage:ci
# - run:
# name: Check coverage generated
Expand Down
9 changes: 3 additions & 6 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"extends": "nx/presets/npm.json",
"targetDefaults": {
"copy-license": {
"outputs": ["{projectRoot}/LICENSE"]
},
"build": {
"cache": true,
"dependsOn": ["copy-license", "^build"],
Expand All @@ -14,15 +11,15 @@
"dependsOn": ["^build"]
},
"test": {
"cache": false,
"dependsOn": ["build"]
},
"test:update": {
"cache": false,
"dependsOn": ["build"]
},
"test:ci": {
"cache": false,
"dependsOn": ["build"]
},
"test:ci:html": {
"dependsOn": ["build"]
}
}
Expand Down
19 changes: 16 additions & 3 deletions packages/pigment-css-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"clean": "rimraf build types processors utils",
"clean": "rimraf build types processors utils coverage html",
"watch": "tsup --watch --clean false",
"copy-license": "node ../../scripts/pigment-license.mjs",
"build": "tsup",
"test": "vitest run",
"test:update": "UPDATE_FIXTURES=true vitest run",
"test:ci": "vitest run --coverage --reporter=html --coverage.reportsDirectory=./coverage",
"test-update": "UPDATE_FIXTURES=true vitest run",
"test:ci": "vitest run --coverage --reporter=json",
"test:ci:html": "vitest run --coverage --reporter=html",
"typecheck": "tsc --noEmit -p ."
},
"dependencies": {
Expand Down Expand Up @@ -151,5 +152,17 @@
"require": "./build/RtlProvider.js",
"default": "./build/RtlProvider.js"
}
},
"nx": {
"targets": {
"build": {
"outputs": [
"{projectRoot}/build",
"{projectRoot}/theme",
"{projectRoot}/utils",
"{projectRoot}/processors"
]
}
}
}
}
2 changes: 1 addition & 1 deletion packages/pigment-css-react/tests/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
transform as wywTransform,
createFileReporter,
} from '@wyw-in-js/transform';
import { PluginCustomOptions, preprocessor } from '@pigment-css/react/utils';
import * as prettier from 'prettier';
import { PluginCustomOptions, preprocessor } from '../src/utils';

import sxTransformPlugin from '../exports/sx-plugin';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { extendTheme, generateTokenCss, generateThemeTokens } from '@pigment-css/react/utils';
import { extendTheme, generateTokenCss, generateThemeTokens } from '../../src/utils';

describe('theme-tokens', () => {
describe('generateTokenCss', () => {
Expand Down
8 changes: 8 additions & 0 deletions packages/pigment-css-react/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { defineConfig } from 'vitest/config';
import viteReact from '@vitejs/plugin-react';

import baseConfig from '../../vitest.config';

export default defineConfig({
...baseConfig,
plugins: [...(baseConfig.plugins ?? []), viteReact()],
test: {
...baseConfig.test,
coverage: {
...baseConfig.test?.coverage,
exclude: [...(baseConfig.test?.coverage?.exclude ?? []), 'utils/', 'theme/'],
},
},
});
3 changes: 2 additions & 1 deletion packages/pigment-css-unplugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"build": "tsup --tsconfig tsconfig.build.json",
"typecheck": "tsc --noEmit -p .",
"test": "vitest run",
"test:ci": "vitest run --coverage --reporter=html --coverage.reportsDirectory=./coverage"
"test:ci": "vitest run --coverage --reporter=html --coverage.reportsDirectory=./coverage",
"test:ci:html": "vitest run --coverage --reporter=html --coverage.reportsDirectory=./coverage"
},
"dependencies": {
"@babel/core": "^7.24.5",
Expand Down
3 changes: 3 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ export default defineConfig({
include: ['tests/**/*.test.(js|jsx|ts|tsx)'],
exclude: ['**/*.spec.*'],
setupFiles: [path.join(__dirname, 'vitest-setup.ts')],
coverage: {
exclude: ['build/', 'coverage/', 'tests'],
},
},
});

0 comments on commit 960394c

Please sign in to comment.