Skip to content
Creative Commons Web Component Generator
TypeScript JavaScript HTML CSS
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.storybook
public
src
.eslintrc.js
.gitattributes
.gitignore
.gitkeep
.prettierrc
README.md
karma.conf.js
package-lock.json
package.json
postcss.config.js
rollup.config.js
tsconfig.json

README.md

Creative Commons Web Component Generator

This is the repository that generate the code that is published in npm. To use the package check his storybook or the package in the npm repository.

This project is created with wc-base-typescript. A project to create isolated web components with typescript

Uses:

Contribute

Download this project for local development of web the components.

Once the project is on your computer, enter the folder and install all npm dependencies:

npm i

The components are stored in "src/components".

To run a server in development mode run:

npm start

The components will be compiled every time you save a file.

Tests

Karma & jasmine are used as testing environment and framework.

Inside the component folder, there is a file ending with "spec.ts" that include the tests.

To run the test use:

npm test

Storybook

There are two files inside the component folder that are used by storybook.

  • @component.stories.ts: Is the file to create the story for the component.

  • README.md: It's used to add documentation for the component using the Notes storybook addon.

Run storybook with:

npm run storybook

Build the component

npm run build

You can find the builds in the "dist" folder.

The component will be compiled in a js file (as ES module), to use it as module in any application, and in a dist.js (as iife), to use it directly in browsers, with the same name you give to the folder in "src/components".

All modules include their respective Typescript declaration files.

You can’t perform that action at this time.