extension-create 4.0.22 → 4.0.23
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/dist/lib/messaging.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export type Channel = 'info' | 'success' | 'warn' | 'error' | 'debug';
|
|
2
2
|
export declare function isDebug(): boolean;
|
|
3
3
|
export declare function prefix(type: Channel): string;
|
|
4
|
+
export declare function isMachineOutput(): boolean;
|
|
5
|
+
export declare function humanLine(...parts: unknown[]): void;
|
|
6
|
+
export declare function humanWarn(...parts: unknown[]): void;
|
|
7
|
+
export declare function humanError(...parts: unknown[]): void;
|
|
4
8
|
export declare const fmt: {
|
|
5
9
|
heading: (title: string) => string;
|
|
6
10
|
label: (key: string) => string;
|
package/dist/module.cjs
CHANGED
|
@@ -67,6 +67,10 @@ function prefix(type) {
|
|
|
67
67
|
if ('debug' === type) return external_pintor_default().dim(external_pintor_default().gray(DEBUG_GLYPH));
|
|
68
68
|
return external_pintor_default().gray(GLYPH);
|
|
69
69
|
}
|
|
70
|
+
new Set([
|
|
71
|
+
'json',
|
|
72
|
+
'ndjson'
|
|
73
|
+
]);
|
|
70
74
|
const fmt = {
|
|
71
75
|
heading: (title)=>external_pintor_default().underline(external_pintor_default().blue(title)),
|
|
72
76
|
label: (key)=>external_pintor_default().gray(key.toUpperCase()),
|
|
@@ -1537,7 +1541,7 @@ async function writeReadmeFile(projectPath, projectName, logger) {
|
|
|
1537
1541
|
const hasScreenshot = await write_readme_file_pathExists(screenshotPath);
|
|
1538
1542
|
const screenshotEmbed = hasScreenshot ? `\n\n` : '';
|
|
1539
1543
|
const blockquote = description ? `> ${description}\n\n` : '';
|
|
1540
|
-
const readme = `<a href="https://extension.js.org" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Powered%20by%20%7C%20Extension.js-0971fe" alt="Powered by Extension.js" align="right" /></a>\n\n# ${projectName}\n\n` + blockquote + `${screenshotEmbed}` + `## Commands\n` + `\n` + `### dev\n` + `\n` + "Run the extension in development mode. Target a browser with `--browser`:\n" + `\n` + "```bash\n" + `${runPrefix} dev\n` + `${runPrefix} dev${argSeparator} --browser=firefox\n` + `${runPrefix} dev${argSeparator} --browser=edge\n` + "```\n" + `\n` + `### build\n` + `\n` + `Build for production. Convenience scripts target each browser:\n` + `\n` + "```bash\n" + `${runPrefix} build # Chrome (default)\n` + `${runPrefix} build:firefox\n` + `${runPrefix} build:edge\n` + "```\n" + `\n` + `### preview\n` + `\n` + `Preview the production build in the browser:\n` + `\n` + "```bash\n" + `${runPrefix} preview\n` + "```\n" + `\n` + `## Learn more\n` + `\n` + `[Extension.js docs](https://extension.js.org).\n`;
|
|
1544
|
+
const readme = `<a href="https://extension.js.org" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Powered%20by%20%7C%20Extension.js-0971fe" alt="Powered by Extension.js" align="right" /></a>\n\n# ${projectName}\n\n` + blockquote + `${screenshotEmbed}` + `## Commands\n` + `\n` + `### dev\n` + `\n` + "Run the extension in development mode. Target a browser with `--browser`:\n" + `\n` + "```bash\n" + `${runPrefix} dev\n` + `${runPrefix} dev${argSeparator} --browser=firefox\n` + `${runPrefix} dev${argSeparator} --browser=edge\n` + "```\n" + `\n` + `### build\n` + `\n` + `Build for production. Convenience scripts target each browser:\n` + `\n` + "```bash\n" + `${runPrefix} build # Chrome (default)\n` + `${runPrefix} build:firefox\n` + `${runPrefix} build:edge\n` + "```\n" + `\n` + `### preview\n` + `\n` + `Preview the production build in the browser:\n` + `\n` + "```bash\n" + `${runPrefix} preview\n` + "```\n" + `\n` + `## Learn more\n` + `\n` + `[Extension.js docs](https://extension.js.org).\n` + `\n` + `## Ship it\n` + `\n` + "Building and running your extension is local and free. When you are ready to share a build or submit it to the stores, [extension.dev](https://docs.extension.dev/publish/overview?utm_source=create-readme) " + `does that side and sponsors Extension.js.\n`;
|
|
1541
1545
|
try {
|
|
1542
1546
|
if (isDebug()) logger.log(writingReadmeMetaData());
|
|
1543
1547
|
await promises_namespaceObject.mkdir(projectPath, {
|
|
@@ -39,3 +39,7 @@ pnpm run preview
|
|
|
39
39
|
## Learn more
|
|
40
40
|
|
|
41
41
|
[Extension.js docs](https://extension.js.org).
|
|
42
|
+
|
|
43
|
+
## Ship it
|
|
44
|
+
|
|
45
|
+
Building and running your extension is local and free. When you are ready to share a build or submit it to the stores, [extension.dev](https://docs.extension.dev/publish/overview?utm_source=create-readme) does that side and sponsors Extension.js.
|