Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
dist
/tmp
/out-tsc
out-tsc
/packages/*/dist/bundle-size

# TypeScript build info
Expand Down
20 changes: 10 additions & 10 deletions apps/website/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
"executor": "nx:run-commands",
"options": {
"cwd": "apps/website",
"commands": [{ "command": "docusaurus build --out-dir ../../dist/apps/website" }]
"commands": [
{
"command": "docusaurus build --out-dir ../../dist/apps/website"
}
]
},
"outputs": ["{workspaceRoot}/dist/apps/website"]
},
"serve": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/website",
"commands": [{ "command": "docusaurus start" }]
}
},
"type-check": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/website",
"commands": [{ "command": "tsc -b --pretty" }],
"outputPath": []
"commands": [
{
"command": "docusaurus start"
}
]
}
}
},
Expand Down
12 changes: 9 additions & 3 deletions apps/website/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@
"checkJs": true,
"jsx": "react",
"noEmit": true,
"outDir": "../../dist/out-tsc",
"outDir": "./out-tsc",
"types": [
"../../node_modules/@docusaurus/module-type-aliases",
"../../node_modules/@docusaurus/theme-classic",
"environment",
"static-assets",
"webpack-env"
]
],
"composite": false
},
"include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.js"]
"include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.js"],
"references": [
{
"path": "../../packages/core"
}
]
}
7 changes: 6 additions & 1 deletion e2e/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
"name": "@griffel/e2e-eslint",
"version": "0.0.0",
"private": true,
"type": "module"
"type": "module",
"devDependencies": {
"@griffel/e2e-utils": "workspace:*",
"@griffel/eslint-plugin": "workspace:*",
"@griffel/react": "workspace:*"
}
}
21 changes: 11 additions & 10 deletions e2e/eslint/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@
"targets": {
"test": {
"executor": "nx:run-commands",
"dependsOn": [{ "target": "build", "dependencies": true }],
"dependsOn": [
{
"target": "build",
"dependencies": true
}
],
"options": {
"cwd": "e2e/eslint",
"commands": [{ "command": "node src/test.ts" }]
"commands": [
{
"command": "node src/test.ts"
}
]
},
"outputs": []
},
"type-check": {
"executor": "nx:run-commands",
"options": {
"cwd": "e2e/eslint",
"commands": [{ "command": "tsc -b --pretty" }],
"outputPath": []
}
}
},
"tags": []
Expand Down
8 changes: 0 additions & 8 deletions e2e/eslint/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"noEmit": true
},
"files": [],
"include": [],
"references": [
Expand Down
22 changes: 18 additions & 4 deletions e2e/eslint/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"extends": "./tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"emitDeclarationOnly": true,
"outDir": "./dist",
"types": ["node", "environment"]
},
"include": ["**/*.ts", "**/*.js"],
"exclude": ["src/assets"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"references": [
{
"path": "../../packages/react/tsconfig.lib.json"
},
{
"path": "../../packages/eslint-plugin/tsconfig.lib.json"
},
{
"path": "../utils/tsconfig.lib.json"
}
]
}
8 changes: 7 additions & 1 deletion e2e/rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"name": "@griffel/e2e-rspack",
"version": "0.0.0",
"private": true,
"type": "module"
"type": "module",
"devDependencies": {
"@griffel/e2e-utils": "workspace:*",
"@griffel/react": "workspace:*",
"@griffel/webpack-extraction-plugin": "workspace:*",
"@griffel/webpack-loader": "workspace:*"
}
}
21 changes: 11 additions & 10 deletions e2e/rspack/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@
"targets": {
"test": {
"executor": "nx:run-commands",
"dependsOn": [{ "target": "build", "dependencies": true }],
"dependsOn": [
{
"target": "build",
"dependencies": true
}
],
"options": {
"cwd": "e2e/rspack",
"commands": [{ "command": "node src/test.ts" }]
"commands": [
{
"command": "node src/test.ts"
}
]
},
"outputs": []
},
"type-check": {
"executor": "nx:run-commands",
"options": {
"cwd": "e2e/rspack",
"commands": [{ "command": "tsc -b --pretty" }],
"outputPath": []
}
}
},
"tags": []
Expand Down
10 changes: 0 additions & 10 deletions e2e/rspack/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"target": "es2020",
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"jsx": "react-jsx",
"noEmit": true
},
"files": [],
"include": [],
"references": [
Expand Down
27 changes: 24 additions & 3 deletions e2e/rspack/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
{
"extends": "./tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"emitDeclarationOnly": true,
"outDir": "./dist",
"types": ["node", "environment"]
},
"include": ["**/*.ts", "**/*.tsx", "**/*.js"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"references": [
{
"path": "../../packages/webpack-plugin/tsconfig.lib.json"
},
{
"path": "../../packages/webpack-loader/tsconfig.lib.json"
},
{
"path": "../../packages/webpack-extraction-plugin/tsconfig.lib.json"
},
{
"path": "../../packages/react/tsconfig.lib.json"
},
{
"path": "../utils/tsconfig.lib.json"
}
]
}
6 changes: 5 additions & 1 deletion e2e/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
"name": "@griffel/e2e-typescript",
"version": "0.0.0",
"private": true,
"type": "module"
"type": "module",
"devDependencies": {
"@griffel/e2e-utils": "workspace:*",
"@griffel/style-types": "workspace:*"
}
}
21 changes: 11 additions & 10 deletions e2e/typescript/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@
"targets": {
"test": {
"executor": "nx:run-commands",
"dependsOn": [{ "target": "build", "dependencies": true }],
"dependsOn": [
{
"target": "build",
"dependencies": true
}
],
"options": {
"cwd": "e2e/typescript",
"commands": [{ "command": "node src/test.ts" }]
"commands": [
{
"command": "node src/test.ts"
}
]
},
"outputs": []
},
"type-check": {
"executor": "nx:run-commands",
"options": {
"cwd": "e2e/typescript",
"commands": [{ "command": "tsc -b --pretty" }],
"outputPath": []
}
}
},
"tags": []
Expand Down
8 changes: 0 additions & 8 deletions e2e/typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"noEmit": true
},
"files": [],
"include": [],
"references": [
Expand Down
18 changes: 15 additions & 3 deletions e2e/typescript/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "./tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"emitDeclarationOnly": true,
"outDir": "./dist",
"types": ["node", "environment"]
},
"include": ["**/*.ts", "**/*.js"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"references": [
{
"path": "../../packages/style-types/tsconfig.lib.json"
},
{
"path": "../utils/tsconfig.lib.json"
}
]
}
7 changes: 6 additions & 1 deletion e2e/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"private": true,
"type": "module",
"exports": {
".": "./src/index.ts"
".": {
"@griffel/source": "./src/index.ts",
"types": "./src/index.ts",
"default": "./src/index.ts"
},
"./package.json": "./package.json"
}
}
11 changes: 1 addition & 10 deletions e2e/utils/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/utils/src",
"projectType": "library",
"targets": {
"type-check": {
"executor": "nx:run-commands",
"options": {
"cwd": "e2e/utils",
"commands": [{ "command": "tsc -b --pretty" }]
},
"outputs": []
}
},
"targets": {},
"tags": []
}
9 changes: 5 additions & 4 deletions e2e/utils/src/packLocalPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import fs from 'fs';
import { sh } from './sh.ts';

export async function packLocalPackage(rootDir: string, tempDir: string, packageName: string) {
const packagePath = path.resolve(rootDir, 'dist', 'packages', packageName.split('/')[1]);
const packagePathExists = !!(await fs.promises.stat(packagePath).catch(() => false));
const packagePath = path.resolve(rootDir, 'packages', packageName.split('/')[1]);
const distPath = path.resolve(packagePath, 'dist');
const distExists = !!(await fs.promises.stat(distPath).catch(() => false));

if (!packagePathExists) {
throw new Error(`A directory with artifacts (${packagePath}) does not exist`);
if (!distExists) {
throw new Error(`Build artifacts not found at "${distPath}" — run "nx run ${packageName}:build" first`);
}

// Use `npm pack` because `yarn pack` incorrectly calculates the included files when the
Expand Down
8 changes: 0 additions & 8 deletions e2e/utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"noEmit": true
},
"files": [],
"include": [],
"references": [
Expand Down
Loading
Loading