chore(project) gitignore, example for debugging, package.json
This commit is contained in:
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Ignore node_modules directory
|
||||
node_modules/
|
||||
|
||||
# Ignore build output
|
||||
dist/
|
||||
build/
|
||||
|
||||
# Ignore development server files
|
||||
webpack-dev-server/
|
||||
|
||||
# Ignore IDE and editor files
|
||||
.vscode/
|
||||
.idea/
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
|
||||
# Ignore logs and debugging files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Ignore OS generated files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
16
examples/index.html
Normal file
16
examples/index.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="data:image/x-icon;,"
|
||||
type="image/x-icon"
|
||||
/>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="./main.js" type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
17
examples/server.js
Normal file
17
examples/server.js
Normal file
@@ -0,0 +1,17 @@
|
||||
export default {
|
||||
port: Bun.env.BUN_PORT || Bun.env.APP_PORT || 3000,
|
||||
async fetch(req) {
|
||||
const url = new URL(req.url);
|
||||
if (url.pathname == '/main.js') {
|
||||
await Bun.build({
|
||||
entrypoints: ['./src/main.js'],
|
||||
outdir: '.',
|
||||
});
|
||||
return new Response(Bun.file('./main.js'), {
|
||||
headers: { 'Cache-Control': 'no-cache' },
|
||||
});
|
||||
}
|
||||
if (url.pathname == '/') return new Response(Bun.file('./index.html'));
|
||||
return new Response('ERR 404: Not Found', { status: 404 });
|
||||
},
|
||||
};
|
||||
5
examples/src/main.js
Normal file
5
examples/src/main.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import Cetra from '../../lib/lib.js';
|
||||
|
||||
const ctra = new Cetra({
|
||||
root: 'body',
|
||||
});
|
||||
25
package.json
Normal file
25
package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@cetra/cetra",
|
||||
"version": "0.0.1",
|
||||
"description": "Reactive Framework for building Web Applications",
|
||||
"author": "Benjamin Wegener <me@benni.games>",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cetrahq/cetra.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"homepage": "https://cetra.dev/docs/en/start",
|
||||
"bugs": "https://cetra.dev/bug-report",
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"import": "./lib/lib.js",
|
||||
"require": "./lib/lib.cjs",
|
||||
"default": "./lib/lib.js"
|
||||
},
|
||||
"./lib/lib.js"
|
||||
]
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
Reference in New Issue
Block a user