Skip to content

Commit

Permalink
Update tsconfig files for production build
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Feb 25, 2024
1 parent ce05c43 commit 0d6b7fb
Show file tree
Hide file tree
Showing 37 changed files with 3,646 additions and 457 deletions.
7 changes: 2 additions & 5 deletions packages/class-variant/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "react-jsx"
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/class-variant/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 2 additions & 5 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src"
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/cli/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 2 additions & 5 deletions packages/create/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src"
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/create/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 3 additions & 4 deletions packages/css/src/config/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import cssEscape from 'css-shared/utils/css-escape'
import { START_SYMBOLS } from '../constants/start-symbol'
import type { Rule, RuleDefinition } from '../rule'
import { Layer } from '../layer'
import { PropertiesHyphen } from 'csstype'

export const BORDER_STYLES = ['none', 'auto', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset']

Expand Down Expand Up @@ -419,7 +418,7 @@ const rules = {
match: /^size:/,
layer: Layer.CoreShorthand,
unit: 'rem',
declare(value, valueComponents) {
declare(_value, valueComponents) {
const length = valueComponents.length
return {
width: length === 1
Expand All @@ -435,7 +434,7 @@ const rules = {
match: /^min:/,
layer: Layer.CoreShorthand,
unit: 'rem',
declare(value, valueComponents) {
declare(_value, valueComponents) {
const length = valueComponents.length
return {
'min-width': length === 1
Expand All @@ -451,7 +450,7 @@ const rules = {
match: /^max:/,
layer: Layer.CoreShorthand,
unit: 'rem',
declare(value, valueComponents) {
declare(_value, valueComponents) {
const length = valueComponents.length
return {
'max-width': length === 1
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export class Rule {
+ propertiesText.join(';')
+ '}'

for (const key of Object.keys(this.at).sort((a, b) => b === 'supports' ? -1 : 1)) {
for (const key of Object.keys(this.at).sort((_a, b) => b === 'supports' ? -1 : 1)) {
cssText = '@' + key + (key.includes(' ') ? '' : ' ') + this.at[key] + '{' + cssText + '}'
}

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/utils/define-visitors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RuleListener } from '@typescript-eslint/utils/dist/ts-eslint'
import type { RuleListener } from '@typescript-eslint/utils/ts-eslint'
import { Rule } from 'eslint'

export default function defineVisitors({ context, settings }: { context: Rule.RuleContext, settings: any }, visitNode) {
Expand Down
8 changes: 2 additions & 6 deletions packages/eslint-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"moduleResolution": "Node",
"outDir": "dist",
"strict": false
},
"include": [
"src/**/*"
]
}
}
10 changes: 10 additions & 0 deletions packages/eslint-plugin/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
6 changes: 1 addition & 5 deletions packages/extractor.vite/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": [
"src/**/*"
]
}
}
10 changes: 10 additions & 0 deletions packages/extractor.vite/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 2 additions & 5 deletions packages/extractor.webpack/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "."
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/extractor.webpack/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 2 additions & 5 deletions packages/extractor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src"
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/extractor/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 2 additions & 5 deletions packages/language-server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "."
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/language-server/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 2 additions & 5 deletions packages/language-service/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "."
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/language-service/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
4 changes: 2 additions & 2 deletions packages/react/src/ThemeServiceProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default function ThemeServiceProvider({
}) {
const themeService = useMemo(() => new ThemeService(options, host), [options, host])
// Make React hook theme members
const [current, setCurrent] = useState<string>(themeService.current)
const [value, setValue] = useState<ThemeValue>(themeService.value)
const [current, setCurrent] = useState<ThemeService['current']>(themeService.current)
const [value, setValue] = useState<ThemeService['value']>(themeService.value)

const switchValue = useCallback((value: ThemeValue, options?: {
store?: boolean;
Expand Down
5 changes: 1 addition & 4 deletions packages/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@
"DOM",
"DOM.Iterable"
]
},
"include": [
"src/**/*"
]
}
}
10 changes: 10 additions & 0 deletions packages/react/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
10 changes: 1 addition & 9 deletions packages/runtime/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": [
"./src/**/*",
"./setup-jest.ts"
],
"exclude": [
"**/*.d.ts"
]
}
}
10 changes: 10 additions & 0 deletions packages/runtime/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 2 additions & 5 deletions packages/server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src"
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/server/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
7 changes: 2 additions & 5 deletions packages/theme-service/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src"
},
"include": [
"src/**/*"
]
"outDir": "dist"
}
}
10 changes: 10 additions & 0 deletions packages/theme-service/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
},
"include": [
"src/**/*"
]
}
1 change: 1 addition & 0 deletions packages/validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"css-tree": "^2.3.1"
},
"devDependencies": {
"@types/css-tree": "^2.3.6",
"css-shared": "workspace:^",
"ts-jest": "^29.1.2"
}
Expand Down
Loading

0 comments on commit 0d6b7fb

Please sign in to comment.