@joystick.js/cli-canary 0.0.0-canary.1576 → 0.0.0-canary.1577
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import u from"esbuild";import d from"esbuild-plugin-svg";import s from"./plugins/index.js";import f from"./get_code_frame.js";import p from"../build/minify_file.js";import h from"./on_warn.js";import b from"../path_exists.js";const w=async(r={},e="")=>{const n=r?.errors&&r?.errors[0],o=await b(e)?await f(e,{line:n?.location?.line,column:n?.location?.column}):null;return await h({file:e,stack:r?.stack,line:n?.location?.line,column:n?.location?.column,snippet:o,lineWithError:n?.location?.lineText?.trim(),message:n?.text}),o},v=(r={})=>{const e=r?.message?.split(":");return e[2]&&e[2]?.includes("No loader")?e[3]&&e[3]?.replace(`
|
|
2
2
|
`,"")||"":e[1]&&e[1]?.replace(`
|
|
3
|
-
`,"")||""},c=async(r={})=>{const e=v(r),n=await w(r,e);return{success:!1,path:e,error:{stack:r?.stack,snippet:n}}},g=(r=[],e={})=>u.build({allowOverwrite:!0,platform:"node",format:"esm",bundle:!1,sourcemap:!0,entryPoints:r?.map(n=>n.path),entryNames:"[dir]/[name]",outdir:e?.output_path||"./.joystick/build",outbase:"./",define:{"process.env.NODE_ENV":`'${e?.environment||"development"}'`},plugins:[s.warn_node_environment,s.generate_file_dependency_map]}),y=(r=[],e={})=>u.build({allowOverwrite:!0,target:"es2020",platform:"browser",format:"esm",bundle:!0,entryPoints:r?.map(n=>n.path),entryNames:"[dir]/[name]",outbase:"./",outdir:e?.output_path||"./.joystick/build",define:{"process.env.NODE_ENV":`'${e?.environment||"development"}'`},loader:{".svg":"text"},plugins:[s.warn_node_environment,s.generate_file_dependency_map,s.bootstrap_component,d()]}),k=async r=>{const e=[".DS_Store"],n=r?.files?.filter(t=>!e?.some(i=>t?.path?.includes(i)))?.filter(t=>t?.platform==="node"),o=r?.files?.filter(t=>!e?.some(i=>t?.path?.includes(i)))?.filter(t=>t?.platform==="browser");let a=[],l=[];n?.length>0&&(a=[await g(n,r).then(()=>({success:!0})).catch(t=>c(t))]),o?.length>0&&(l=[await y(o,r).then(()=>({success:!0})).catch(t=>c(t))]);const m=a?.some(t=>!t?.success),_=l?.some(t=>!t?.success);return m||_?Promise.reject([...a,...l]):(r?.environment&&r?.environment!=="development"&&await Promise.all([...o,...n].map(t=>p(`${r?.output_path||"./.joystick/build"}/${t.path}`))),[...a,...l])};var D=k;export{D as default};
|
|
3
|
+
`,"")||""},c=async(r={})=>{const e=v(r),n=await w(r,e);return{success:!1,path:e,error:{stack:r?.stack,snippet:n}}},g=(r=[],e={})=>u.build({allowOverwrite:!0,platform:"node",format:"esm",bundle:!1,sourcemap:!0,entryPoints:r?.map(n=>n.path),entryNames:"[dir]/[name]",outdir:e?.output_path||"./.joystick/build",outbase:"./",define:{"process.env.NODE_ENV":`'${e?.environment||"development"}'`},plugins:[s.warn_node_environment,s.generate_file_dependency_map]}),y=(r=[],e={})=>u.build({allowOverwrite:!0,target:"es2020",platform:"browser",format:"esm",bundle:!0,sourcemap:!0,entryPoints:r?.map(n=>n.path),entryNames:"[dir]/[name]",outbase:"./",outdir:e?.output_path||"./.joystick/build",define:{"process.env.NODE_ENV":`'${e?.environment||"development"}'`},loader:{".svg":"text"},plugins:[s.warn_node_environment,s.generate_file_dependency_map,s.bootstrap_component,d()]}),k=async r=>{const e=[".DS_Store"],n=r?.files?.filter(t=>!e?.some(i=>t?.path?.includes(i)))?.filter(t=>t?.platform==="node"),o=r?.files?.filter(t=>!e?.some(i=>t?.path?.includes(i)))?.filter(t=>t?.platform==="browser");let a=[],l=[];n?.length>0&&(a=[await g(n,r).then(()=>({success:!0})).catch(t=>c(t))]),o?.length>0&&(l=[await y(o,r).then(()=>({success:!0})).catch(t=>c(t))]);const m=a?.some(t=>!t?.success),_=l?.some(t=>!t?.success);return m||_?Promise.reject([...a,...l]):(r?.environment&&r?.environment!=="development"&&await Promise.all([...o,...n].map(t=>p(`${r?.output_path||"./.joystick/build"}/${t.path}`))),[...a,...l])};var D=k;export{D as default};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joystick.js/cli-canary",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-canary.
|
|
5
|
-
"canary_version": "0.0.0-canary.
|
|
4
|
+
"version": "0.0.0-canary.1577",
|
|
5
|
+
"canary_version": "0.0.0-canary.1576",
|
|
6
6
|
"description": "The CLI for Joystick.",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"bin": {
|
|
@@ -84,7 +84,7 @@ const handle_build_for_browser = (browser_paths = [], options = {}) => {
|
|
|
84
84
|
platform: "browser",
|
|
85
85
|
format: "esm",
|
|
86
86
|
bundle: true,
|
|
87
|
-
|
|
87
|
+
sourcemap: true,
|
|
88
88
|
entryPoints: browser_paths?.map((file) => file.path),
|
|
89
89
|
entryNames: '[dir]/[name]',
|
|
90
90
|
outbase: './',
|