1.0.0 • Published 2 years ago

kaabu-template v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Kaabu Template

Design system for creating Kaabu-like UI components.

Installation

    npm install kaabu-template

Configuration

Configure in your own project

How to create and configure your own npm repository

Let's take "example" as our new project name:

  1. Create and open the directory

    mkdir example cd example

  2. Initialize the npm project

    npm init -y

  3. Install typescript:

    npm install typescript

  4. We are using typescript, so copy these settings:

   {
      "main": "dist/index.js",
      "types": "dist/index.d.ts",
      "files": [
        "/dist"
      ],
   }
  1. Initialize typescript

    npx tsx --init

  2. Setup tsconfig.json base options (you can customize it to your needs)

    { "compilerOptions": { "module": "CommonJS", "target": "ES2015", "sourceMap": true, "outDir": "./dist", "moduleResolution": "node", "noImplicitAny": true, "declaration": true }, "include": "src/*/", "exclude": "node_modules" }

  3. Create the source directory and add an index file

    mkdir src cd src touch index.ts

  4. Add whatever files you want and export them

Once you're finished editing your project and are ready to publish:

  1. let's convert our typescript to javascript

    npx tsc

It creates the dist folder with all the typescript files converted.

We are now ready to publish our library to npm.

  1. Login to npm

    npm login