JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 334
  • Score
    100M100P100Q71219F
  • License MIT

Add Basecoat components to your project

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (basecoat-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    basecoat-cli

    This package provides a Command Line Interface (CLI) to help you quickly scaffold Basecoat components into your project.

    Prerequisites

    • Ensure you have Node.js and npm (or your preferred package manager) installed.
    • For the components to function correctly, your project should have:
      • Tailwind CSS installed and configured.
      • The basecoat-css package installed and imported (or basecoat.css manually added).

    Usage

    Use the add command to add components to your project:

    # npx
    npx basecoat-cli add [component]
    
    # pnpm
    pnpm dlx basecoat-cli add [component]
    
    # bun
    bunx basecoat-cli add [component]
    
    # yarn
    yarn dlx basecoat-cli add [component]

    Replace [component] with the name of the component you wish to add (e.g., dialog, select) or leave it out if you want to pick from the list of available components or install all of them at once.

    The CLI will prompt you for:

    1. Template Engine: Choose between Nunjucks (.njk) or Jinja (.html.jinja).
    2. Assets Directory: The path where component assets (like JavaScript files) should be placed (e.g., src/assets/js/components).
    3. Macros Directory: The path where component macros should be placed (e.g., src/_includes/macros/components).

    The CLI will then copy the necessary JavaScript files and Nunjucks/Jinja macros for the selected component into the specified directories.

    Example

    To add the dialog component:

    npx basecoat-cli add dialog

    Documentation

    For more detailed information on components, their usage, and customization options, please refer to the Basecoat documentation.

    License

    MIT