Skip to content

Commit

Permalink
refactor: fix tw build (#853)
Browse files Browse the repository at this point in the history
* refactor: fix tw build

* refactor: import correct file
  • Loading branch information
henrikbossart authored Dec 1, 2023
1 parent 97a3968 commit 063ba87
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ venv
__pycache__
*.pyc

packages/dm-core/build.css
packages/dm-core-plugins/build.css
packages/dm-core/src/build.css
packages/dm-core-plugins/src/build.css

*.tsbuildinfo
3 changes: 2 additions & 1 deletion example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"src"
],
"exclude": [
"node_modules"
"node_modules",
"tsconfig.tsbuildinfo"
]
}
9 changes: 3 additions & 6 deletions packages/dm-core-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,12 @@
"react-dom": "^18.2.0",
"styled-components": ">=5.1.0"
},
"files": [
"blueprints",
"dist"
],
"files": ["blueprints", "dist"],
"types": "dist/index.d.ts",
"scripts": {
"prebuild": "shx rm -rf dist",
"build": "tsc && npx tailwindcss -o build.css --minify && yarn copy-css-file",
"copy-css-file": "cp ./build.css ./dist/",
"build": "tsc && npx tailwindcss -o ./src/build.css --minify && yarn copy-css-file",
"copy-css-file": "cp ./src/build.css ./dist/",
"test": "jest test",
"test-watch": "jest test --watchAll"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dm-core-plugins/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TUiPluginMap } from '@development-framework/dm-core'
import { lazy } from 'react'
import '../build.css'
import './build.css'

export { WidgetProvider } from './form/context/WidgetContext'

Expand Down
10 changes: 3 additions & 7 deletions packages/dm-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@
"ts-loader": "^9.3.1",
"typescript": "^5.1.6"
},
"files": [
"dist",
"src",
"tsconfig.json"
],
"files": ["dist", "src", "tsconfig.json"],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"prebuild": "shx rm -rf dist",
"build": "tsc && npx tailwindcss -o build.css && yarn copy-css-file",
"copy-css-file": "cp ./build.css ./dist/ && cp ./src/styles/main.css ./dist/",
"build": "tsc && npx tailwindcss -o ./src/build.css --minify && yarn copy-css-file",
"copy-css-file": "cp ./src/build.css ./dist/ && cp ./src/styles/main.css ./dist/",
"test": "jest test"
}
}
2 changes: 1 addition & 1 deletion packages/dm-core/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../build.css'
import './build.css'

export * from './hooks'

Expand Down
5 changes: 3 additions & 2 deletions packages/dm-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dom.iterable",
"esnext"
],
"incremental": true,

"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
Expand Down Expand Up @@ -35,6 +35,7 @@
"exclude": [
"node_modules",
"src/**/*.spec.ts",
"dist"
"dist",
"tsconfig.tsbuildinfo"
]
}

0 comments on commit 063ba87

Please sign in to comment.