@gramlot/create 0.2.6 → 0.2.7
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/README.md +1 -1
- package/package.json +1 -1
- package/src/cli.js +3 -3
- package/templates/page/README.md +1 -1
- package/templates/page/index.js +5 -5
- package/templates/site/pages/registration.js +5 -5
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm run start:bun # the same with Bun
|
|
|
21
21
|
|
|
22
22
|
A page is one module that exports `Page`, which builds the page, and `Logic`, the
|
|
23
23
|
methods the page calls in the browser. The templates show a form whose data leave
|
|
24
|
-
the browser through `gramlot.inout` (email, file, download).
|
|
24
|
+
the browser through `gramlot.utl.inout` (email, file, download).
|
|
25
25
|
|
|
26
26
|
The build uses `@gramlot/gramlot-serverless`, the server uses
|
|
27
27
|
`@gramlot/gramlot-js-server`; both live in the repository
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -21,9 +21,9 @@ function manifest(name, template) {
|
|
|
21
21
|
'start:bun': 'bun serve.mjs',
|
|
22
22
|
},
|
|
23
23
|
dependencies: {
|
|
24
|
-
'@gramlot/gramlot': '
|
|
25
|
-
'@gramlot/gramlot-js-server':
|
|
26
|
-
'@gramlot/gramlot-serverless':
|
|
24
|
+
'@gramlot/gramlot': '>=0.2.12',
|
|
25
|
+
'@gramlot/gramlot-js-server': `>=${own.version}`,
|
|
26
|
+
'@gramlot/gramlot-serverless': `>=${own.version}`,
|
|
27
27
|
},
|
|
28
28
|
};
|
|
29
29
|
}
|
package/templates/page/README.md
CHANGED
|
@@ -12,7 +12,7 @@ npm run start:bun # the same with Bun
|
|
|
12
12
|
|
|
13
13
|
`index.html` can travel by mail, on a USB stick or on any web site. The data typed
|
|
14
14
|
in it stay in the browser of whoever fills it in; the buttons send them by email,
|
|
15
|
-
save them to a file or download them (`gramlot.inout`).
|
|
15
|
+
save them to a file or download them (`gramlot.utl.inout`).
|
|
16
16
|
|
|
17
17
|
`npm start` is for development: `serve.mjs` serves this folder, `node_modules`
|
|
18
18
|
included. To publish the page, use `index.html` from `npm run build`.
|
package/templates/page/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {Page as BasePage} from '@gramlot/gramlot/page';
|
|
|
2
2
|
|
|
3
3
|
/** One page, one module: Page builds the page, Logic holds the methods it calls in the browser.
|
|
4
4
|
* The data typed in the form live under the path `modulo` and leave the browser only through
|
|
5
|
-
* the buttons of gramlot.inout. */
|
|
5
|
+
* the buttons of gramlot.utl.inout. */
|
|
6
6
|
export class Page extends BasePage {
|
|
7
7
|
static title = 'Registration';
|
|
8
8
|
static css = ['/themes/gramlot-base/theme.css'];
|
|
@@ -19,11 +19,11 @@ export class Page extends BasePage {
|
|
|
19
19
|
|
|
20
20
|
const buttons = root.div({id: 'buttons'});
|
|
21
21
|
buttons.button('Send by email', {id: 'send',
|
|
22
|
-
action: "gramlot.inout.sendMail('modulo', 'office@example.org')"});
|
|
23
|
-
buttons.button('Save', {id: 'save', action: "gramlot.inout.save('modulo', 'registration.json')"});
|
|
24
|
-
buttons.button('Reload a saved file', {id: 'restore', action: "gramlot.inout.restore('modulo')"});
|
|
22
|
+
action: "gramlot.utl.inout.sendMail('modulo', 'office@example.org')"});
|
|
23
|
+
buttons.button('Save', {id: 'save', action: "gramlot.utl.inout.save('modulo', 'registration.json')"});
|
|
24
|
+
buttons.button('Reload a saved file', {id: 'restore', action: "gramlot.utl.inout.restore('modulo')"});
|
|
25
25
|
buttons.button('Download JSON', {id: 'download',
|
|
26
|
-
action: "gramlot.inout.download('modulo', 'registration.json', 'json')"});
|
|
26
|
+
action: "gramlot.utl.inout.download('modulo', 'registration.json', 'json')"});
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -2,7 +2,7 @@ import {Page as BasePage} from '@gramlot/gramlot/page';
|
|
|
2
2
|
|
|
3
3
|
/** A second page, one module: Page builds the page, Logic holds the methods it calls in the
|
|
4
4
|
* browser. The data typed in the form live under the path `modulo` and leave the browser only
|
|
5
|
-
* through the buttons of gramlot.inout. */
|
|
5
|
+
* through the buttons of gramlot.utl.inout. */
|
|
6
6
|
export class Page extends BasePage {
|
|
7
7
|
static title = 'Registration';
|
|
8
8
|
static css = ['/themes/gramlot-base/theme.css', '/site.css'];
|
|
@@ -22,11 +22,11 @@ export class Page extends BasePage {
|
|
|
22
22
|
|
|
23
23
|
const buttons = root.div({id: 'buttons'});
|
|
24
24
|
buttons.button('Send by email', {id: 'send',
|
|
25
|
-
action: "gramlot.inout.sendMail('modulo', 'office@example.org')"});
|
|
26
|
-
buttons.button('Save', {id: 'save', action: "gramlot.inout.save('modulo', 'registration.json')"});
|
|
27
|
-
buttons.button('Reload a saved file', {id: 'restore', action: "gramlot.inout.restore('modulo')"});
|
|
25
|
+
action: "gramlot.utl.inout.sendMail('modulo', 'office@example.org')"});
|
|
26
|
+
buttons.button('Save', {id: 'save', action: "gramlot.utl.inout.save('modulo', 'registration.json')"});
|
|
27
|
+
buttons.button('Reload a saved file', {id: 'restore', action: "gramlot.utl.inout.restore('modulo')"});
|
|
28
28
|
buttons.button('Download JSON', {id: 'download',
|
|
29
|
-
action: "gramlot.inout.download('modulo', 'registration.json', 'json')"});
|
|
29
|
+
action: "gramlot.utl.inout.download('modulo', 'registration.json', 'json')"});
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|