1.0.2 • Published 2 years ago
pruebawebccli v1.0.2
jsvanillawebcomponentcli
Web Components Javascript Vanilla
This is a PERSONAL project made to create the Web component and the folder structure that I normally use.
src
|__cmponents
|__webComponentUno
| |--webComponentUno.js
| |--webComponentUno.css
|__webComponentDos
| |--webComponentDos.js
| |--webComponentDos.css
|--component.js
Dependencies
I Try to make this Project with as few dependencies as possible.
ESM: The brilliantly simple, babel-less, bundle-less ECMAScript module loader.
COMANDER.JS: The complete solution for node.js command-line interfaces.
Install
$ npm install -g jsvanillawebcomponentcli
Usage
Be sure to include in your Html5 a meta tag that links to the components.js module
Ej:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
*** Your html code Here ***
<script type="module" src="./src/components/components.js"></script>
</body>
</html>
now run it in your console
$ webc component componentName
or
$ webc c componentName
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.