-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sample): provide an example SAP
the example app is in ./docs/mvc this closes #1
- Loading branch information
Showing
67 changed files
with
6,945 additions
and
450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# PLEASE READ COMMENTS IN ./config/config.dump.mjs | ||
IS_UNDER_TEST=true | ||
IS_UNDER_TEST=true | ||
IS_LOG_SILENT=true | ||
IS_LOG_VERBOSE=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "attach", | ||
"name": "Attach to Chrome", | ||
"port": 9222, | ||
"webRoot": "${workspaceFolder}/docs" | ||
}, | ||
|
||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "test-odla-special", | ||
"program": "${workspaceFolder}/test/lib/OpenDataLogicAgent.special.test.mjs", | ||
"runtimeArgs": [ | ||
"--experimental-modules" | ||
], | ||
"args": [ | ||
"test/lib/OpenDataLogicAgent.special.test.mjs " | ||
], | ||
"console": "internalConsole" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "esm-odla-special", | ||
"program": "${workspaceFolder}/test/lib/OpenDataLogicAgent.special.test.esm.js", | ||
"runtimeArgs": ["-r", "esm"], | ||
"args": [ | ||
"test/lib/OpenDataLogicAgent.special.test.mjs " | ||
], | ||
"env": { | ||
"NODE_ENV": "test" | ||
}, | ||
"console": "internalConsole" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "esm-odla", | ||
"program": "${workspaceFolder}/test/lib/OpenDataLogicAgent.test.esm.js", | ||
"runtimeArgs": ["-r", "esm"], | ||
"args": [ | ||
"test/lib/OpenDataLogicAgent.test.mjs " | ||
], | ||
"env": { | ||
"NODE_ENV": "test" | ||
}, | ||
"console": "internalConsole" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "esm-log", | ||
"program": "${workspaceFolder}/test/log/log.esm.js", | ||
"runtimeArgs": ["-r", "esm"], | ||
"args": [ | ||
"test/log/log.test.mjs " | ||
], | ||
"env": { | ||
"NODE_ENV": "test" | ||
}, | ||
"console": "internalConsole" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "repl-test-debug", | ||
"port": 9229 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# PhytoJS Samples for the web browser | ||
[./docs](../docs) has *use-cases* for the web browser, if you're looking for examples to run in nodejs please look at the [./docs](../docs folder; if you're looking for the documentation of the PhytoJS service component please look at the project [./README.md](../readme.md) | ||
|
||
## Vanillajs (ECMAScript.next) MVC Example | ||
[Live Demo](https://rondinif.github.io/rondinif/phytojs) | ||
[demo sources](./docs/mvc) | ||
``` bash | ||
# this demo require http-server; if you haven't install it `npm i http-server -g` | ||
npm start | ||
# then navigate to http://localhost:8080 | ||
``` | ||
|
||
|
||
|
||
<!-- | ||
## JS | ||
./bootstrap.js | ||
- ./helpers.js | ||
- ./app.js | ||
- ./phyto.js ( from witch import {updatePhyto} in app.js ) | ||
- :=[has a]=> docs/view.js (bind + render = abstracts away the browser's DOM completely) | ||
- phytoList | ||
- phytoItemCounter | ||
- newPhyto | ||
( instantiated with a ./template.js ) | ||
render(viewCmd, parameter) <<## riceve i vari diversi comandi dal controller | ||
- defaultTemplate | ||
- show(data) - binds data to the template and shows (return) as a view | ||
- clearCompletedButton(phyta) | ||
- itemCounter | ||
- :=[has a]=> Store initiated with a name ( see store.js ) | ||
- methods to manage local storage data:{ plsnts} | ||
- :=[has a]=> Model that receive the Store when instantiated | ||
:=[has a]=> Store initiate with a name ( see store.js ) | ||
- create(entityId, callback) save the new entityId into the Store ##> used by controller.addItem | ||
- read(query, callback) -- query the storage ##> used by controller.showAll, showCompleted | ||
- update(id, data, callback) | ||
- remove(id, callback) | ||
- removeAll | ||
- getCount | ||
- :=[has + => Controller initiated with (model, view) | ||
- uses read/write to the storage by the model | ||
- send render commands to the view | ||
## CSS | ||
./app.css | ||
./pytoapp.css | ||
- todpapp phytoapp | ||
- new-todo new-phyto | ||
- todo-list phyto-list | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.toggle-graph { | ||
float: left; | ||
margin-left: 16px; | ||
cursor: pointer; | ||
position: relative; | ||
z-index: 1; | ||
} | ||
.toggle-graph svg { | ||
height: 20px; | ||
width: 20px; | ||
} | ||
.toggle-graph svg path { | ||
fill: #777; | ||
} | ||
|
||
.toggle-graph.active svg path, | ||
.toggle-graph:hover svg path, | ||
.toggle-graph:focus svg path { | ||
fill: black; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {updatePhyto} from './phyto.js' | ||
|
||
export function onLoad() { // eslint-disable-line import/prefer-default-export | ||
updatePhyto() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* eslint no-console:0 */ | ||
// import {install as offlineInstall} from 'offline-plugin/runtime' | ||
import {onLoad} from './app.js' | ||
import {$on} from './helpers.js' | ||
|
||
|
||
$on(window, 'load', onLoad) | ||
$on(window, 'hashchange', onLoad) | ||
// if (process.env.NODE_ENV === 'production') { | ||
// offlineInstall() | ||
// } |
Oops, something went wrong.