allows building of web components from html and js files
npm i -g custom_framework
ROOT
|
+---customfw.json
|
+---build
| +---pack
| | \---build.js
| \---unpack
| \---*.js // indivisual built components and temp html files.
\---src
\--- */**.html //input files
Within script tags inside of components you can add an additional init
attribute that will cause the script to be executed ONCE with the constructor and state variables exposed. constructor can be modified to extend the prototype of the element. the state variable is also exposed and can be modified.
If the above attribute is not present the variables self, constructor, root, and state are exposed. this script will execute whenever the an instance of the element is created.
- constructor - the constructor object of the element.
- self - the element the operation is being performed on.
- root - the shadowRoot of the element (you will probally use this more than self).
- state - a map that is shared between all instances made using this framework.
can take 1 argument -w to determine if watching will occure. to use run in the project directory (this is the directory that contains the customfw.json file)