livecode-static/docs/assets/js/f54598d4.2ba0499f.js
2025-06-12 09:37:26 +08:00

1 line
6.6 KiB
JavaScript

"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([["6395"],{531:function(e,r,t){t.r(r),t.d(r,{default:()=>h,frontMatter:()=>i,metadata:()=>n,assets:()=>l,toc:()=>d,contentTitle:()=>c});var n=JSON.parse('{"id":"features/export","title":"Export","description":"Exporting A Single Project","source":"@site/docs/features/export.mdx","sourceDirName":"features","slug":"/features/export","permalink":"/docs/features/export","draft":false,"unlisted":false,"editUrl":"https://github.com/live-codes/livecodes/tree/develop/docs/docs/features/export.mdx","tags":[],"version":"current","frontMatter":{},"sidebar":"docsSidebar","previous":{"title":"Import","permalink":"/docs/features/import"},"next":{"title":"Share","permalink":"/docs/features/share"}}'),s=t("5893"),o=t("65");let i={},c="Export",l={},d=[{value:"Exporting A Single Project",id:"exporting-a-single-project",level:2},{value:"Exporting Multiple Projects",id:"exporting-multiple-projects",level:2},{value:"Related",id:"related",level:2}];function a(e){let r={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"export",children:"Export"})}),"\n",(0,s.jsx)(r.h2,{id:"exporting-a-single-project",children:"Exporting A Single Project"}),"\n",(0,s.jsx)(r.p,{children:"Project export can be accessed from the Project menu \u2192 Export."}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"LiveCodes Export",src:t(4823).Z+"",width:"2240",height:"1400"})}),"\n",(0,s.jsx)(r.p,{children:"Any project can be exported to:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Project (JSON):"})," a JSON file containing project ",(0,s.jsx)(r.a,{href:"/docs/configuration/configuration-object",children:"configuration object"}),". This can be used to later ",(0,s.jsx)(r.a,{href:"/docs/features/import#import-exported-livecodes-projects",children:"import"})," that project on the same or a different device or to share a copy of the project with others."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Source (ZIP):"})," a zip file containing the project configuration file as JSON, in addition to the source code in separate files. This can be useful for opening the code in an external IDE."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Result (HTML):"})," ",(0,s.jsx)(r.a,{href:"/docs/features/result",children:"result page"})," as a single html file. Can be used for the purpose of demo or deploy."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"GitHub gist"})," (",(0,s.jsxs)(r.em,{children:["requires login with ",(0,s.jsx)(r.a,{href:"/docs/features/github-integration",children:"GitHub account"})]}),"): creates a ",(0,s.jsx)(r.strong,{children:"public"})," GitHub gist on the user's GitHub account containing the source code as separate files."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"CodePen:"})," creates a ",(0,s.jsx)(r.a,{href:"https://codepen.io/",children:"CodePen"})," prefilled with the project code. If the used ",(0,s.jsx)(r.a,{href:"/docs/languages/",children:"languages/frameworks"})," are not supported in CodePen (e.g. Astro, Svelte, Python, ...etc), the compiled code is exported so that it continues to work there. ",(0,s.jsx)(r.a,{href:"/docs/features/module-resolution",children:"Bare module imports"})," are converted to esm imports, for example:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-js"})}),"\n",(0,s.jsx)(r.p,{children:"becomes:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-js",children:"import React from 'https://cdn.skypack.dev/react';\n"})}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"JSFiddle:"})," creates a ",(0,s.jsx)(r.a,{href:"https://jsfiddle.net/",children:"JSFiddle"})," prefilled with the project code. Exported code may be modified like with CodePen (see above)."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"exporting-multiple-projects",children:"Exporting Multiple Projects"}),"\n",(0,s.jsxs)(r.p,{children:["Multiple projects can be exported in bulk from the ",(0,s.jsx)(r.a,{href:"/docs/features/projects",children:"Saved Projects"})," screen (Project menu \u2192 Open) using the button ",(0,s.jsx)(r.code,{children:"Export All"}),"."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"saved projects",src:t(5992).Z+"",width:"2240",height:"1400"})}),"\n",(0,s.jsxs)(r.p,{children:["This produces a JSON file containing an array of project configuration objects. They can be later imported in the same or a different device using the ",(0,s.jsx)(r.code,{children:"Bulk Import"})," functionality in the ",(0,s.jsx)(r.a,{href:"/docs/features/import#import-exported-livecodes-projects",children:"Import screen"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"All the currently visible projects will be exported. If projects are filtered (e.g. by language, tag or search query), only the shown projects are exported."}),"\n",(0,s.jsx)(r.h2,{id:"related",children:"Related"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"/docs/features/projects",children:"Projects"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"/docs/features/import",children:"Import"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"/docs/features/backup-restore",children:"Backup/Restore"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"/docs/features/sync",children:"Sync"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"/docs/features/share",children:"Share"})}),"\n"]})]})}function h(e={}){let{wrapper:r}={...(0,o.a)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},4823:function(e,r,t){t.d(r,{Z:function(){return n}});let n=t.p+"assets/images/export-1-242db411ba39b47325d40698ba5a146c.jpg"},5992:function(e,r,t){t.d(r,{Z:function(){return n}});let n=t.p+"assets/images/export-2-3fa7b6dcd7e853a988e95730893ee356.jpg"},65:function(e,r,t){t.d(r,{Z:function(){return c},a:function(){return i}});var n=t(7294);let s={},o=n.createContext(s);function i(e){let r=n.useContext(o);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(o.Provider,{value:r},e.children)}}}]);