To start development:
git clone [email protected]:CESARBR/macaw.git
cd macawand run:
npm install
npm startTo build the component for production, run:
npm run buildTo run the unit tests for the components, run:
npm testNeed help? Check out our docs here.
When creating new component tags, we recommend using prefix m-. For example m-button.
- Put the following script tags in the head of your index.html
<script type="module" src="https://unpkg.com/@cesarbr/macaw/dist/macaw/macaw.esm.js"></script>
<script nomodule src="https://unpkg.com/@cesarbr/macaw/dist/macaw/macaw.js"></script>- Then you can use the element anywhere in your template, JSX, html etc
- Run
$ npm install @cesarbr/macaw --save- Add an import to the npm packages
import { defineCustomElements as macaw } from '@cesarbr/macaw/loader';- Init macaw
macaw(window);- Then you can use the element anywhere in your template, JSX, html etc