Skip to content

Commit

Permalink
ts config
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Dec 25, 2023
1 parent 2875df4 commit 3d21e77
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
8 changes: 6 additions & 2 deletions fusionfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export async function js() {
// Compile Start
return wait(
babel('resources/assets/src/**/*.{js,mjs}', 'www/assets/js/', { module: 'systemjs' }),
ts('resources/assets/src/**/*.ts', 'www/assets/js/', { tsconfig: 'tsconfig.json' }),
ts('resources/assets/src/**/*.ts', 'www/assets/js/', { tsconfig: 'tsconfig.js.json' }),
syncJS()
);
// Compile end
Expand All @@ -91,7 +91,11 @@ export async function js() {
export async function syncJS() {
// Compile Start
return wait(
...syncModuleScripts()
...syncModuleScripts({
ts: {
tsconfig: 'tsconfig.js.json'
}
})
);
// Compile end
}
Expand Down
25 changes: 25 additions & 0 deletions tsconfig.js.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": [
"@windwalker-io/unicorn/tsconfig.js.json"
],
"include": [
"vendor/**/src/Module/**/assets/**/*.ts",
"resources/assets/vue/**/*",
"resources/assets/vue/**/*.vue",
"resources/assets/src/**/*.ts",
"src/Module/**/*.ts"
],
"exclude": [
"node_modules/**/*"
],
"types": ["reflect-metadata"],
"compilerOptions": {
"allowJs": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noEmit": false,
"paths": {
"@/*": ["./resources/assets/*"]
}
}
}
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
"allowJs": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noEmit": false,
"paths": {
"@/*": ["./resources/assets/*"]
"@/*": ["./resources/assets/*"],
// "@/*": ["./resources/assets/vue/*"], // If compile vue, uncomment this line
}
}
}

0 comments on commit 3d21e77

Please sign in to comment.