File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -318,15 +318,15 @@ export default function (
318318 const jsxDtsFile = path . join (
319319 bricksDir ,
320320 answers . pkgName ,
321- "src/jsx.d. ts"
321+ "src/jsx.ts"
322322 ) ;
323323 /** @type {string } */
324324 let jsxDtsContent ;
325325 if ( ! existsSync ( jsxDtsFile ) ) {
326326 // jsxDtsContent = `import type { DetailedHTMLProps, HTMLAttributes } from "react"`;
327327 const jsxDtsTemplateFile = path . join (
328328 __dirname ,
329- "templates/bricks/src/jsx.d. ts.hbs"
329+ "templates/bricks/src/jsx.ts.hbs"
330330 ) ;
331331 jsxDtsContent = await readFile ( jsxDtsTemplateFile , "utf-8" ) ;
332332 } else {
@@ -361,14 +361,14 @@ export default function (
361361 const newJsxDts = jsxDtsContent . replace ( pattern , replacement ) ;
362362 if ( newJsxDts === jsxDtsContent ) {
363363 throw new Error (
364- `Failed to add definition in jsx.d. ts for ${ tagName } .`
364+ `Failed to add definition in jsx.ts for ${ tagName } .`
365365 ) ;
366366 }
367367 jsxDtsContent = newJsxDts ;
368368 }
369369
370370 await writeFile ( jsxDtsFile , jsxDtsContent ) ;
371- return `Updated jsx.d. ts to include ${ tagName } definition.` ;
371+ return `Updated jsx.ts to include ${ tagName } definition.` ;
372372 } ,
373373 async function modifyCommonBricksJson ( answers ) {
374374 if ( answers . brickType === "common" ) {
Original file line number Diff line number Diff line change 2525 "start": "cross-env NODE_ENV=development build-next-bricks --watch",
2626 "build": "npm run build:main && npm run build:types",
2727 "build:main": "cross-env NODE_ENV=production build-next-bricks",
28- "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist-types --project tsconfig.json && copy-jsx-d-ts ",
28+ "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist-types --project tsconfig.json",
2929 "build:manifest": "cross-env NODE_ENV=production build-next-bricks --manifest-only",
3030 "test": "cross-env NODE_ENV='test' test-next",
3131 "test:ci": "cross-env NODE_ENV='test' CI=true test-next",
Original file line number Diff line number Diff line change 11import type { DetailedHTMLProps, HTMLAttributes } from "react";
22
33declare global {
4+ // eslint-disable-next-line @typescript-eslint/no-namespace
45 namespace JSX {
56 interface IntrinsicElements {
67 // Extend with brick definitions here
You can’t perform that action at this time.
0 commit comments