instaserve 0.0.25 → 0.0.26

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/components.mjs ADDED
@@ -0,0 +1,5 @@
1
+ export default {
2
+ 'h-w': {
3
+ template: 'Hello world'
4
+ }
5
+ }
package/index.html CHANGED
@@ -2,5 +2,6 @@
2
2
 
3
3
  <script>navigator.serviceWorker.register('sw.js')</script>
4
4
  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css'>
5
+ <script src='https://unpkg.com/enigmatic/enigmatic.js'></script>
5
6
 
6
7
  <div class='bg-yellow-200'>hello</div>
package/index.mjs CHANGED
@@ -12,17 +12,18 @@ console.log(routesfile, routesurl)
12
12
 
13
13
  if (!fs.existsSync(routesfile)) {
14
14
  fs.writeFileSync(routesfile, `import fs from 'node:fs'
15
- export default {
16
- _debug: ({ r, s, db }) => console.log(r.url, r.method),
17
- '/': ({ s }) => s.end(fs.readFileSync('index.html', 'utf-8')),
18
- 'tables': name => ([k, v]) => k.match(name + ':')
19
- }`)
15
+ export default {
16
+ _debug: ({ r, s, db }) => console.log(r.url, r.method),
17
+ '/': ({ s }) => s.end(fs.readFileSync('index.html', 'utf-8')),
18
+ 'tables': name => ([k, v]) => k.match(name + ':')
19
+ }`)
20
20
  }
21
21
  if (!fs.existsSync(indexfile)) {
22
22
  fs.writeFileSync(indexfile, `<!DOCTYPE html>
23
23
 
24
24
  <script>navigator.serviceWorker.register('sw.js')</script>
25
25
  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css'>
26
+ <script src='https://unpkg.com/enigmatic/enigmatic.js'></script>
26
27
 
27
28
  <div class='bg-yellow-200'>hello</div>`)
28
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instaserve",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "",
5
5
  "main": "index.mjs",
6
6
  "bin": "./index.mjs"