@absolutejs/absolute 0.1.0
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/.prettierignore +4 -0
- package/.prettierrc.json +8 -0
- package/README.md +34 -0
- package/dist/build-241dg605.js +2 -0
- package/dist/build-azzc5a4m.js +2 -0
- package/dist/core/build.js +5 -0
- package/dist/core/pageHandlers.js +145 -0
- package/dist/plugins/networkingPlugin.d.js +1 -0
- package/dist/plugins/networkingPlugin.js +2 -0
- package/dist/plugins/pageRouterPlugin.d.js +1 -0
- package/dist/plugins/pageRouterPlugin.js +2 -0
- package/dist/src/constants.d.ts +8 -0
- package/dist/src/core/build.d.ts +1 -0
- package/dist/src/core/pageHandlers.d.ts +3 -0
- package/dist/src/plugins/networkingPlugin.d.ts +21 -0
- package/dist/src/plugins/pageRouterPlugin.d.ts +1 -0
- package/dist/src/utils/networking.d.ts +1 -0
- package/dist/src/utils/updateScriptTags.d.ts +9 -0
- package/dist/utils/networking.js +3 -0
- package/dist/utils/updateScriptTags.js +3 -0
- package/package.json +33 -0
- package/rollup.config.ts +22 -0
- package/src/constants.ts +13 -0
- package/src/core/build.ts +154 -0
- package/src/core/pageHandlers.ts +19 -0
- package/src/plugins/networkingPlugin.ts +35 -0
- package/src/plugins/pageRouterPlugin.ts +3 -0
- package/src/utils/networking.ts +19 -0
- package/src/utils/updateScriptTags.ts +51 -0
- package/tsconfig.json +17 -0
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# AbsoluteJS
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
AbsoluteJS is a revolutionary JavaScript framework designed to unify all past, present, and future JavaScript frameworks into one powerful environment. It's powered by Bun and Elysia, providing a seamless and efficient development experience.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Unified Environment**: AbsoluteJS brings together all JavaScript frameworks, allowing developers to use any framework within one environment.
|
|
10
|
+
- **Powered by Bun and Elysia**: Leveraging the power of Bun and Elysia, AbsoluteJS provides a robust and efficient development experience.
|
|
11
|
+
- **Future-Proof**: AbsoluteJS is designed to accommodate future JavaScript frameworks, making it a sustainable choice for JavaScript development.
|
|
12
|
+
|
|
13
|
+
## Getting Started
|
|
14
|
+
|
|
15
|
+
1. **Installation**: Provide instructions on how to install AbsoluteJS.
|
|
16
|
+
2. **Basic Usage**: Give a simple example of how to use AbsoluteJS.
|
|
17
|
+
|
|
18
|
+
## Documentation
|
|
19
|
+
|
|
20
|
+
Link to your detailed documentation here.
|
|
21
|
+
|
|
22
|
+
## Contributing
|
|
23
|
+
|
|
24
|
+
Provide guidelines on how contributors can help improve AbsoluteJS.
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
Include information about your license here.
|
|
29
|
+
|
|
30
|
+
## Contact
|
|
31
|
+
|
|
32
|
+
Provide contact information or links to your social media profiles here.
|
|
33
|
+
|
|
34
|
+
We hope you enjoy using AbsoluteJS as much as we enjoyed building it!
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var g=Object.create;var{getPrototypeOf:h,defineProperty:f,getOwnPropertyNames:i}=Object;var j=Object.prototype.hasOwnProperty;var k=(a,b,c)=>{c=a!=null?g(h(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of i(a))if(!j.call(d,e))f(d,e,{get:()=>a[e],enumerable:!0});return d};var l=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);
|
|
2
|
+
export{k as h,l as i};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{b as C,c as T,d as F}from"../build-241dg605.js";import{g as M}from"../utils/updateScriptTags.js";import"../build-azzc5a4m.js";import{rm as _,mkdir as v,writeFile as g}from"node:fs/promises";import{join as z,basename as f}from"node:path";import{exit as E}from"node:process";var{$:L,build:b,Glob:$}=globalThis.Bun;var J=z(import.meta.dir,"..",".."),H=z(J,"example/build"),N=z(J,"example/assets"),k=z(J,"example/react/indexes"),h=z(J,"example/javascript"),j=z(J,"example/typescript"),I=z(J,"example/react/pages"),D=z(J,"example/html"),o=async()=>{let A=performance.now();await _(H,{force:!0,recursive:!0}),await m();let X=new $("*.{tsx,jsx}"),Y=[];for await(let q of X.scan({absolute:!0,cwd:k}))Y.push(q);let V=new $("*.js"),Z=[];for await(let q of V.scan({absolute:!0,cwd:h}))Z.push(q);let Q=new $("*.ts"),B=[];for await(let q of Q.scan({absolute:!0,cwd:j}))B.push(q);let y=Y.concat(Z).concat(B),{logs:P,outputs:O}=await b({entrypoints:y,format:"esm",naming:"[dir]/[name].[hash].[ext]",outdir:H}).catch((q)=>{console.error("Build failed:",q),E(1)});P.forEach((q)=>{if(q.level==="error")console.error(q);else if(q.level==="warning")console.warn(q);else if(q.level==="info"||q.level==="debug")console.info(q)}),await u();let x=O.reduce((q,R)=>{let K=R.path;if(K.startsWith(H))K=K.slice(H.length);K=K.replace(/^\/+/,"");let w=K.split("/").pop();if(!w)return q;let G=`.${R.hash}.`;if(!w.includes(G))throw new Error(`Expected hash delimiter ${G} in ${w}`);let[S]=w.split(G);return q[S]="/"+K,q},{});await M(x,D);let W=performance.now()-A,U;if(W<C)U=`${W.toFixed(F)}ms`;else if(W<T)U=`${(W/C).toFixed(F)}s`;else U=`${(W/T).toFixed(F)}m`;return console.log(`Build completed in ${U}`),console.log("Outputs:",O),console.log("Manifest:",x),x},u=async()=>{await L`cp -R ${N} ${H}`,await v(z(H,"html")),await v(z(H,"htmx")),await L`cp -R ${z(J,"example/html")} ${z(H)}`,await L`cp -R ${z(J,"example/htmx")} ${z(H)}`},m=async()=>{await _(k,{force:!0,recursive:!0}),await v(k);let A=new $("*.*"),X=[];for await(let V of A.scan({cwd:I}))X.push(V);let Y=X.map(async(V)=>{let Z=f(V),[Q]=Z.split("."),B=["import { hydrateRoot } from 'react-dom/client';",`import { ${Q} } from '../pages/${Q}';
|
|
3
|
+
`,`hydrateRoot(document, <${Q} />);`].join(`
|
|
4
|
+
`);return g(z(k,`${Q}Index.tsx`),B)});await Promise.all(Y)};export{o as build};
|
|
5
|
+
export{o as a};
|