@next-core/yo 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/yo",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "Generator for next v3",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/yo",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"@next-core/theme": "^1.6.1",
|
|
36
36
|
"react": "0.0.0-experimental-ee8509801-20230117"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "2b28c80d484ce5381586f84a16e46eb3336e91a1"
|
|
39
39
|
}
|
package/src/plopfile.js
CHANGED
|
@@ -318,7 +318,7 @@ export default function (
|
|
|
318
318
|
const jsxDtsFile = path.join(
|
|
319
319
|
bricksDir,
|
|
320
320
|
answers.pkgName,
|
|
321
|
-
"src/jsx.
|
|
321
|
+
"src/jsx.ts"
|
|
322
322
|
);
|
|
323
323
|
/** @type {string} */
|
|
324
324
|
let jsxDtsContent;
|
|
@@ -326,7 +326,7 @@ export default function (
|
|
|
326
326
|
// jsxDtsContent = `import type { DetailedHTMLProps, HTMLAttributes } from "react"`;
|
|
327
327
|
const jsxDtsTemplateFile = path.join(
|
|
328
328
|
__dirname,
|
|
329
|
-
"templates/bricks/src/jsx.
|
|
329
|
+
"templates/bricks/src/jsx.ts.hbs"
|
|
330
330
|
);
|
|
331
331
|
jsxDtsContent = await readFile(jsxDtsTemplateFile, "utf-8");
|
|
332
332
|
} else {
|
|
@@ -361,14 +361,14 @@ export default function (
|
|
|
361
361
|
const newJsxDts = jsxDtsContent.replace(pattern, replacement);
|
|
362
362
|
if (newJsxDts === jsxDtsContent) {
|
|
363
363
|
throw new Error(
|
|
364
|
-
`Failed to add definition in jsx.
|
|
364
|
+
`Failed to add definition in jsx.ts for ${tagName}.`
|
|
365
365
|
);
|
|
366
366
|
}
|
|
367
367
|
jsxDtsContent = newJsxDts;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
await writeFile(jsxDtsFile, jsxDtsContent);
|
|
371
|
-
return `Updated jsx.
|
|
371
|
+
return `Updated jsx.ts to include ${tagName} definition.`;
|
|
372
372
|
},
|
|
373
373
|
async function modifyCommonBricksJson(answers) {
|
|
374
374
|
if (answers.brickType === "common") {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"start": "cross-env NODE_ENV=development build-next-bricks --watch",
|
|
26
26
|
"build": "npm run build:main && npm run build:types",
|
|
27
27
|
"build:main": "cross-env NODE_ENV=production build-next-bricks",
|
|
28
|
-
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist-types --project tsconfig.json
|
|
28
|
+
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist-types --project tsconfig.json",
|
|
29
29
|
"build:manifest": "cross-env NODE_ENV=production build-next-bricks --manifest-only",
|
|
30
30
|
"test": "cross-env NODE_ENV='test' test-next",
|
|
31
31
|
"test:ci": "cross-env NODE_ENV='test' CI=true test-next",
|