@plasmicapp/cli 0.1.306 → 0.1.307
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/actions/export.d.ts +2 -2
- package/dist/index.js +5 -2
- package/dist/lib.js +1 -1
- package/package.json +2 -2
- package/src/actions/export.ts +7 -4
- package/src/utils/code-utils.ts +1 -1
package/dist/actions/export.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export interface ExportArgs extends CommonArgs {
|
|
|
8
8
|
imagesScheme: "" | "inlined" | "files" | "public-files";
|
|
9
9
|
imagesPublicDir: string;
|
|
10
10
|
imagesPublicUrlPrefix: string;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
i18NKeyScheme: "" | I18NConfig["keyScheme"];
|
|
12
|
+
i18NTagPrefix: "" | I18NConfig["tagPrefix"];
|
|
13
13
|
skipFormatting?: boolean;
|
|
14
14
|
outDir: string;
|
|
15
15
|
}
|
package/dist/index.js
CHANGED
|
@@ -735135,7 +735135,7 @@ var formatAsLocal = (content, filePath, baseDir, defaultOpts = {}) => {
|
|
|
735135
735135
|
if (GLOBAL_SETTINGS.skipFormatting) {
|
|
735136
735136
|
return content;
|
|
735137
735137
|
}
|
|
735138
|
-
const opts = { ...defaultOpts };
|
|
735138
|
+
const opts = { ...defaultOpts, pluginSearchDirs: false };
|
|
735139
735139
|
opts.filepath = filePath;
|
|
735140
735140
|
const res = Prettier.format(content, opts);
|
|
735141
735141
|
const res2 = Prettier.format(res, opts);
|
|
@@ -739568,6 +739568,9 @@ var import_fs3 = require("fs");
|
|
|
739568
739568
|
var import_path2 = __toESM(require("path"));
|
|
739569
739569
|
async function exportProjectsCli(opts) {
|
|
739570
739570
|
var _a, _b;
|
|
739571
|
+
if (!opts.outDir) {
|
|
739572
|
+
opts.outDir = "./";
|
|
739573
|
+
}
|
|
739571
739574
|
if (!opts.baseDir)
|
|
739572
739575
|
opts.baseDir = process.cwd();
|
|
739573
739576
|
let configFile = opts.config || findConfigFile(opts.baseDir, { traverseParents: true });
|
|
@@ -739606,7 +739609,7 @@ async function exportProjectsCli(opts) {
|
|
|
739606
739609
|
codeOpts: { lang: opts.codeLang || "ts" },
|
|
739607
739610
|
stylesOpts: { scheme: opts.styleScheme || "css-modules" },
|
|
739608
739611
|
imageOpts: { scheme: opts.imagesScheme || "files" },
|
|
739609
|
-
i18nOpts: opts.
|
|
739612
|
+
i18nOpts: opts.i18NKeyScheme ? { keyScheme: opts.i18NKeyScheme, tagPrefix: opts.i18NTagPrefix } : void 0
|
|
739610
739613
|
});
|
|
739611
739614
|
const extx = opts.codeLang === "js" ? "jsx" : "tsx";
|
|
739612
739615
|
const writeProj = async (bundle) => {
|
package/dist/lib.js
CHANGED
|
@@ -730475,7 +730475,7 @@ var formatAsLocal = (content, filePath, baseDir, defaultOpts = {}) => {
|
|
|
730475
730475
|
if (GLOBAL_SETTINGS.skipFormatting) {
|
|
730476
730476
|
return content;
|
|
730477
730477
|
}
|
|
730478
|
-
const opts = { ...defaultOpts };
|
|
730478
|
+
const opts = { ...defaultOpts, pluginSearchDirs: false };
|
|
730479
730479
|
opts.filepath = filePath;
|
|
730480
730480
|
const res = Prettier.format(content, opts);
|
|
730481
730481
|
const res2 = Prettier.format(res, opts);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.307",
|
|
4
4
|
"description": "plasmic cli for syncing local code with Plasmic designs",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=12"
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"wrap-ansi": "^7.0.0",
|
|
79
79
|
"yargs": "^15.4.1"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "c436471bfd37a5b4ee96e71e634d82c52655b1e9"
|
|
82
82
|
}
|
package/src/actions/export.ts
CHANGED
|
@@ -30,8 +30,8 @@ export interface ExportArgs extends CommonArgs {
|
|
|
30
30
|
imagesScheme: "" | "inlined" | "files" | "public-files";
|
|
31
31
|
imagesPublicDir: string;
|
|
32
32
|
imagesPublicUrlPrefix: string;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
i18NKeyScheme: "" | I18NConfig["keyScheme"];
|
|
34
|
+
i18NTagPrefix: "" | I18NConfig["tagPrefix"];
|
|
35
35
|
|
|
36
36
|
skipFormatting?: boolean;
|
|
37
37
|
|
|
@@ -39,6 +39,9 @@ export interface ExportArgs extends CommonArgs {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export async function exportProjectsCli(opts: ExportArgs): Promise<void> {
|
|
42
|
+
if (!opts.outDir) {
|
|
43
|
+
opts.outDir = "./";
|
|
44
|
+
}
|
|
42
45
|
if (!opts.baseDir) opts.baseDir = process.cwd();
|
|
43
46
|
let configFile =
|
|
44
47
|
opts.config || findConfigFile(opts.baseDir, { traverseParents: true });
|
|
@@ -81,8 +84,8 @@ export async function exportProjectsCli(opts: ExportArgs): Promise<void> {
|
|
|
81
84
|
codeOpts: { lang: opts.codeLang || "ts" },
|
|
82
85
|
stylesOpts: { scheme: opts.styleScheme || "css-modules" },
|
|
83
86
|
imageOpts: { scheme: opts.imagesScheme || "files" },
|
|
84
|
-
i18nOpts: opts.
|
|
85
|
-
? { keyScheme: opts.
|
|
87
|
+
i18nOpts: opts.i18NKeyScheme
|
|
88
|
+
? { keyScheme: opts.i18NKeyScheme, tagPrefix: opts.i18NTagPrefix }
|
|
86
89
|
: undefined,
|
|
87
90
|
});
|
|
88
91
|
|
package/src/utils/code-utils.ts
CHANGED
|
@@ -52,7 +52,7 @@ export const formatAsLocal = (
|
|
|
52
52
|
// a better solution, like maybe letting user specify a prettier config
|
|
53
53
|
// file in plasmic.json
|
|
54
54
|
// const opts = resolveConfig.sync(baseDir) || defaultOpts;
|
|
55
|
-
const opts = { ...defaultOpts };
|
|
55
|
+
const opts: Options = { ...defaultOpts, pluginSearchDirs: false };
|
|
56
56
|
opts.filepath = filePath;
|
|
57
57
|
|
|
58
58
|
// Running Prettier multiple times may actually yield different results!
|