- Built with β€οΈ
- Just 1 kB (minified + gzip)
import { Adapter } from `@devcapsule/adapter`;
class Card extends Adapter {};
// Don't worry about tag's name conflicted, choose your own.
Card.define('el-card');
/* Style is isolated with defined tag name.
* It won't go anywhere outside the component.
* All <el-card> style will be updated.
*/
Card.addStyle(`
display: block;
min-height: 5rem;
width: 100%;
color: red;`
);
// Style class can also be used.
// This will style <el-card class="text-blue">
Card.addStyle(`
&.text-blue {
color: blue;
}
`);
// Dynamically create stylable element.
const card = new Card();
card.addStyle(`color: black`);
document.body.append(card);
https://github.com/orgs/keenlycode/projects/2
- NodeJS : https://nodejs.org/en/
- Git : https://git-scm.com/
- Python >= 3.10 : https://www.python.org/
- Clone repository from github
$ git clone https://github.com/keenlycode/adapter.git
$ cd adapter
- Install node dependencies
$ npm install
- Setup Python environment & libs
$ python -m venv venv
$ source venv/bin/activate
$ pip install -r require.pip
# Build
$ npm run dist
$ npm run docs
$ npm run test