An anticore
demo just to provide a very simple example to see how to start a real world project.
Under the hood, it uses the following dependencies to simplify the job:
- anticore (to play with the front things)
- anticore-server (even if
anticore
doesn't requires a specific type of server) - @anticore-contracts/tree-insert (an
anticore
contract to simply define how to insert some elements without extra front code) - @anticore-contracts/tree-view (an
anticore
contract to manage the main AJAX navigation/history, without extra front code) - jspmi (to generate your import-map)
git clone https://github.com/Lcfvs/anticore-demo
cd anticore-demo
npm i
npm start
Alternatively, you can simply make your own the Glitch project
If you don't know how anticore
is working, maybe read the brief explanation and the first following demo to learn the library basics, it really often helps the beginners.
In short, the following jumps can also be useful to understand the most used features:
You can find it into the ./src/assets
The JS part is divided like this (but you can choose the structure you want, it's just an example):
contracts
: A directory containing all youranticore
contractsgenerics.js
: A module importing the generic contracts, not related to a specific view, to declare some behaviorstrees.js
: A module importing the tree contracts, altering the documentviews.js
: A module importing the view contracts, to handle the view-related behaviors
generics
: A directory containing the lazy-loaded generic features, when a matching element is received byanticore
utils
: A directory for your utilities, basically, it only contains a selectors shorthandviews
: A directory containing the lazy-loaded view features, when a matching element is received byanticore
dist.js
: A bundled version of your front code, for the browsers not yet supporting the import-mapmain.js
: The main entrypoint importing your contracts and triggeringanticore
In order, it imports thegenerics
, theviews
, thetrees
, then theanticore/trigger.js
You're strongly encouraged to preserve that order to keep your front optimized
- For the server-side things, read the
anticore-server
readme - To see how to install/uninstall some dependencies, read the
jspmi
one