@joystick.js/cli-canary 0.0.0-canary.162 → 0.0.0-canary.164
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.
|
@@ -46,8 +46,10 @@ const handleBuildForNode = (nodePaths2 = [], options = {}) => {
|
|
|
46
46
|
format: "esm",
|
|
47
47
|
bundle: false,
|
|
48
48
|
entryPoints: nodePaths2?.map((file) => file.path),
|
|
49
|
+
entryNames: "[dir]/[name]",
|
|
49
50
|
// TODO: Make sure we don't need outbase here so the paths map correctly.
|
|
50
51
|
outdir: options?.outputPath || "./.joystick/build",
|
|
52
|
+
outbase: "./",
|
|
51
53
|
define: {
|
|
52
54
|
"process.env.NODE_ENV": `'${options?.environment}'`
|
|
53
55
|
},
|
|
@@ -69,6 +71,8 @@ const handleBuildForBrowser = (browserPaths2 = [], options = {}) => {
|
|
|
69
71
|
format: "esm",
|
|
70
72
|
bundle: true,
|
|
71
73
|
entryPoints: browserPaths2?.map((file) => file.path),
|
|
74
|
+
entryNames: "[dir]/[name]",
|
|
75
|
+
outbase: "./",
|
|
72
76
|
// TODO: Make sure we don't need outbase here so the paths map correctly.
|
|
73
77
|
outdir: options?.outputPath || "./.joystick/build",
|
|
74
78
|
define: {
|
|
@@ -191,14 +195,12 @@ const buildFiles = async (options, { resolve, reject }) => {
|
|
|
191
195
|
const copyFiles = filesWithPlatform?.filter((file) => file?.platform === "copy");
|
|
192
196
|
const browserFiles = filesWithPlatform?.filter((file) => file?.platform === "browser");
|
|
193
197
|
const nodeFiles = filesWithPlatform?.filter((file) => file?.platform === "node");
|
|
194
|
-
console.log(filesWithPlatform);
|
|
195
198
|
handleCopyFiles(copyFiles, options?.outputPath);
|
|
196
199
|
const fileResults = await Promise.all([
|
|
197
200
|
handleBuildForBrowser(browserFiles, options).then(() => {
|
|
198
201
|
return { success: true };
|
|
199
202
|
}).catch((exception) => {
|
|
200
203
|
const file = handleParseFilePathFromException(exception);
|
|
201
|
-
console.log(file, exception);
|
|
202
204
|
const snippet = handleBuildException(exception, file);
|
|
203
205
|
return {
|
|
204
206
|
success: false,
|
package/package.json
CHANGED
|
@@ -53,8 +53,10 @@ const handleBuildForNode = (nodePaths = [], options = {}) => {
|
|
|
53
53
|
format: "esm",
|
|
54
54
|
bundle: false,
|
|
55
55
|
entryPoints: nodePaths?.map((file) => file.path),
|
|
56
|
+
entryNames: '[dir]/[name]',
|
|
56
57
|
// TODO: Make sure we don't need outbase here so the paths map correctly.
|
|
57
58
|
outdir: options?.outputPath || "./.joystick/build",
|
|
59
|
+
outbase: './',
|
|
58
60
|
define: {
|
|
59
61
|
"process.env.NODE_ENV": `'${options?.environment}'`,
|
|
60
62
|
},
|
|
@@ -77,6 +79,8 @@ const handleBuildForBrowser = (browserPaths = [], options = {}) => {
|
|
|
77
79
|
format: "esm",
|
|
78
80
|
bundle: true,
|
|
79
81
|
entryPoints: browserPaths?.map((file) => file.path),
|
|
82
|
+
entryNames: '[dir]/[name]',
|
|
83
|
+
outbase: './',
|
|
80
84
|
// TODO: Make sure we don't need outbase here so the paths map correctly.
|
|
81
85
|
outdir: options?.outputPath || "./.joystick/build",
|
|
82
86
|
define: {
|
|
@@ -218,8 +222,6 @@ const buildFiles = async (options, { resolve, reject }) => {
|
|
|
218
222
|
const browserFiles = filesWithPlatform?.filter((file) => file?.platform === 'browser');
|
|
219
223
|
const nodeFiles = filesWithPlatform?.filter((file) => file?.platform === 'node');
|
|
220
224
|
|
|
221
|
-
console.log(filesWithPlatform);
|
|
222
|
-
|
|
223
225
|
handleCopyFiles(copyFiles, options?.outputPath);
|
|
224
226
|
|
|
225
227
|
const fileResults = await Promise.all([
|
|
@@ -227,7 +229,6 @@ const buildFiles = async (options, { resolve, reject }) => {
|
|
|
227
229
|
return { success: true };
|
|
228
230
|
}).catch((exception) => {
|
|
229
231
|
const file = handleParseFilePathFromException(exception);
|
|
230
|
-
console.log(file, exception);
|
|
231
232
|
const snippet = handleBuildException(exception, file);
|
|
232
233
|
|
|
233
234
|
return {
|