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