Skip to content

Commit

Permalink
Upgrade and improve NX setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Mar 1, 2024
1 parent a47fc43 commit 6e3748e
Show file tree
Hide file tree
Showing 103 changed files with 738 additions and 593 deletions.
4 changes: 4 additions & 0 deletions code/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Nx 18 enables using plugins to infer targets by default
# This is disabled for existing workspaces to maintain compatibility
# For more info, see: https://nx.dev/concepts/inferred-tasks
NX_ADD_PLUGINS=false
6 changes: 6 additions & 0 deletions code/.nxignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Seems like NX get confused as our gitignore directory is not in the NX root
dist
node_modules
storybook-static
tsconfig.tsbuildinfo
coverage
8 changes: 5 additions & 3 deletions code/addons/a11y/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-a11y",
"name": "addon-a11y",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/actions/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-actions",
"name": "addon-actions",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/backgrounds/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-backgrounds",
"name": "addon-backgrounds",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/controls/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-controls",
"name": "addon-controls",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/docs/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-docs",
"name": "addon-docs",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/essentials/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-essentials",
"name": "addon-essentials",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/gfm/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-mdx-gfm",
"name": "addon-mdx-gfm",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/highlight/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-highlight",
"name": "addon-highlight",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
1 change: 0 additions & 1 deletion code/addons/highlight/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"],
"strict": true
},
Expand Down
8 changes: 5 additions & 3 deletions code/addons/interactions/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-interactions",
"name": "addon-interactions",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/jest/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-jest",
"name": "addon-jest",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/links/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-links",
"name": "addon-links",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/measure/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-measure",
"name": "addon-measure",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/onboarding/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-onboarding",
"name": "addon-onboarding",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/outline/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-outline",
"name": "addon-outline",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/storysource/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-storysource",
"name": "addon-storysource",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/themes/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-themes",
"name": "addon-themes",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/toolbars/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-toolbars",
"name": "addon-toolbars",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/addons/viewport/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/addon-viewport",
"name": "addon-viewport",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/builders/builder-manager/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/builder-manager",
"name": "builder-manager",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/builders/builder-vite/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/builder-vite",
"name": "builder-vite",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/builders/builder-webpack5/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/builder-webpack5",
"name": "builder-webpack5",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
21 changes: 18 additions & 3 deletions code/frameworks/angular/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@storybook/angular",
"name": "angular",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {},
"check": {
"executor": "nx:run-commands",
"options": {
"command": "echo 'angular only does check with the flag -c production'",
"description": "See code/storybook/storybook/scripts/prepare/check.ts"
},
"configurations": {
"production": {
"cwd": "{projectRoot}",
"command": "yarn check"
}
}
}
}
}
1 change: 0 additions & 1 deletion code/frameworks/angular/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"lib": ["es2020", "dom", "dom.iterable"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declaration": true,
Expand Down
8 changes: 5 additions & 3 deletions code/frameworks/ember/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/ember",
"name": "ember",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/frameworks/html-vite/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/html-vite",
"name": "html-vite",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
1 change: 0 additions & 1 deletion code/frameworks/html-vite/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["node"],
"resolveJsonModule": true,
"strict": true
Expand Down
8 changes: 5 additions & 3 deletions code/frameworks/html-webpack5/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/html-webpack5",
"name": "html-webpack5",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/frameworks/nextjs/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/nextjs",
"name": "nextjs",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
8 changes: 5 additions & 3 deletions code/frameworks/preact-vite/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/preact-vite",
"name": "preact-vite",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
1 change: 0 additions & 1 deletion code/frameworks/preact-vite/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["node"],
"resolveJsonModule": true,
"jsx": "react-jsx",
Expand Down
8 changes: 5 additions & 3 deletions code/frameworks/preact-webpack5/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@storybook/preact-webpack5",
"name": "preact-webpack5",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": [],
"type": "library"
"type": "library",
"targets": {
"build": {}
}
}
Loading

0 comments on commit 6e3748e

Please sign in to comment.