Skip to content

Commit

Permalink
refactor(tooling): remove unnecessary built dependencies from turbo s…
Browse files Browse the repository at this point in the history
…cripts (#3467)

* refactor: remove unnecessary built dependencies from turbo scripts

* fix: reduce ui kit content import path to speed up compilation

* chore: remove @storybook/addon-a11y

* fix: remove unnecessary declarations from tsconfigs

* chore: remove unnecessary CI tree debugs on lint

* chore: remove unnecessary no-emit

* chore: fix linter

* revert: noEmit

* replace noEmit with emitDeclarationOnly

---------

Co-authored-by: marc2332 <[email protected]>
  • Loading branch information
begonaalvarezd and marc2332 authored Oct 25, 2024
1 parent 68a46ce commit ea38fa7
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"iota-wallet",
"iota-explorer",
"wallet-dashboard",
"@iota/apps-ui-kit",
"apps-backend",
"@iota/core",
"@iota/apps-ui-kit",
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/_turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ jobs:
- name: (debug-before) Check SDK dist folder
continue-on-error: true
run: tree ./sdk/typescript/dist
- name: (debug) Lint
continue-on-error: true
run: pnpm turbo lint
- name: (debug-after) Check SDK dist folder
continue-on-error: true
run: tree ./sdk/typescript/dist
- name: Lint
run: pnpm turbo lint
- name: Install wasm-pack for mbf package
Expand Down
5 changes: 3 additions & 2 deletions apps/explorer/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
import preset from '@iota/core/tailwind.config';
import colors from 'tailwindcss/colors';
import { type Config } from 'tailwindcss';
import { uiKitResponsivePreset } from '@iota/apps-ui-kit';
// Note: exception for the tailwind preset import
import uiKitResponsivePreset from '../../apps/ui-kit/src/lib/tailwind/responsive.preset';

export default {
presets: [preset, uiKitResponsivePreset],
content: ['./src/**/*.{js,jsx,ts,tsx}', './node_modules/@iota/apps-ui-kit/dist/**/*.js'],
content: ['./src/**/*.{js,jsx,ts,tsx}', './../ui-kit/src/lib/**/*.{js,jsx,ts,tsx}'],
theme: {
// This COLOR are duplicated from @iota/core tailwind.config.ts!!!
// They are repeated here cause uiKitResponsivePreset overwrites the colors, and they are still used throughout Explorer
Expand Down
3 changes: 2 additions & 1 deletion apps/explorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"references": [
{ "path": "../../sdk/typescript/" },
{ "path": "../../sdk/kiosk/" },
{ "path": "../../sdk/dapp-kit/" }
{ "path": "../../sdk/dapp-kit/" },
{ "path": "../ui-kit" }
]
}
6 changes: 5 additions & 1 deletion apps/ui-kit/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"noEmit": true,
"isolatedModules": true,
"sourceMap": true,
"jsx": "react-jsx",
"composite": true,
"declaration": true,
"declarationMap": true,
"outDir": "dist",
"emitDeclarationOnly": true,
"paths": {
"@/*": ["./src/*"],
"@/components": ["./src/lib/components"],
Expand Down
3 changes: 2 additions & 1 deletion apps/wallet/configs/ts/tsconfig.common.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@
}
},
"include": ["../../src", "../../tests"],
"exclude": ["../../build", "../../node_modules"]
"exclude": ["../../build", "../../node_modules"],
"references": [{ "path": "../ui-kit" }]
}
5 changes: 3 additions & 2 deletions apps/wallet/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
import preset from '@iota/core/tailwind.config';
import { type Config } from 'tailwindcss';
import animatePlugin from 'tailwindcss-animate';
import { uiKitStaticPreset } from '@iota/apps-ui-kit';
// Note: exception for the tailwind preset import
import uiKitStaticPreset from '../../apps/ui-kit/src/lib/tailwind/static.preset';

export default {
presets: [preset, uiKitStaticPreset],
content: ['./src/**/*.{js,jsx,ts,tsx}', './node_modules/@iota/apps-ui-kit/dist/**/*.js'],
content: ['./src/**/*.{js,jsx,ts,tsx}', './../ui-kit/src/lib/**/*.{js,jsx,ts,tsx}'],
theme: {
extend: {
colors: {
Expand Down
4 changes: 1 addition & 3 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"ui": "tui",
"$schema": "https://turbo.build/schema.json",
"tasks": {
"lint": {
"dependsOn": ["^build"]
},
"lint": { },
"lint:fix": {
"dependsOn": ["^build"]
},
Expand Down

0 comments on commit ea38fa7

Please sign in to comment.