Documentation of the current frontend framework in use in development →
1. npm run build
2. sudo npm -g install .
1. mkdir newProject && cd newProject
2. muffin -i //press enter for any prompt to take the default value
/ assets/ |
components/ |
pages/ |
gulpfile.js |
index.src.html |
package.json |
sw.js |
-
DomComponent
-
PostOffice
-
DataSource
-
Router
-
<include src="”>
-
<component-data src="”>
-
route="”
-
sub-route
- .page class
components/contact_card.js | |
class ContactCard extends DomComponent {
static domElName = "contact-card"
} customElements.define(ContactCard.domElName, ContactCard) |
domElName specifies the html tagName
schema specifies the default data that will be used in markupFunc markupFunc specifies the function that renders the data into ui the last line (customElements.define) registers the component for use in html/dom |
index.src.html | |
|
component-data tag can be added inside any component →
socket specifies the PostOffice.websocket label is any string to key this data in indexeddb any fixtures to quick test the component could be added as json inside component-data tag |
index.src.html | |
about
|
route=”..string..” attribute specifies the unique route (url pathname & window.history entry)
_router variable (could be named anything) stores the Router instance _router.go(“..route_name..”) function triggers the route with the given ..route_name.. |
index.src.html | |
._container_ { padding: 100px;}
</style>
{
"name”:”ankur”,
“email”:”[email protected]”,
“phone_no”:”+919686800032”
}
about
|
any file included via has to be enclosed within the tag; that can contain html, css & javascript. |