custom_framework

1.0.10 • Public • Published

custom framework

allows building of web components from html and js files

npm i -g custom_framework

Project Structure


ROOT
|
+---customfw.json
|
+---build
| +---pack
| | \---build.js
| \---unpack
| \---*.js // indivisual built components and temp html files.
\---src
\--- */**.html //input files

Script integrations

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.

variables

  • 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.

command

adds 1 command customfw

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)

Readme

Keywords

Package Sidebar

Install

npm i custom_framework

Weekly Downloads

2

Version

1.0.10

License

ISC

Unpacked Size

94.3 kB

Total Files

32

Last publish

Collaborators

  • iansenne