Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codux-pond/component-templates

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codux-pond/component-templates

Codux Component Templates

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-75.81%
Maintainers
0
Weekly downloads
 
Created
Source

Codux Component Templates

Component Templates

This project is a collection of component templates that can be used to create new components for the Codux. It is also contains a catalog of the components that are created using these templates as the main app.

How to create a new component template

Create a new folder in the src/component-templates directory with the component name in snake case all lowercase and dashed. (e.g. fancy-button, fine-card, tpl-input, etc.)

The folder should contain the following files: where COMPONENT_NAME is the name of the component. (same as the folder name)

  • COMPONENT_NAME.tsx - The component template.
  • COMPONENT_NAME.module.css - The component styles.
  • COMPONENT_NAME.component.json - The component packer metadata entry.
  • metadata - Directory containing the component metadata (will not be included in the installation).
Code Template Variables

The component template can contain variables that will be replaced with the actual values when the component is created. Currently, the following variables are supported:

  • ___COMPONENT_NAME___ - The name of the component.

Note:

We do not replace variables in all text files. We only replace variables in typescript, .css, .md and .json files. (this can be changed according to the requirement)

Casing Convention

There is a casing convention for the variables:

  • if the variable is title case, we replace it with the title case value.
  • if the variable starts with lower case, we replace it with the camel case value.
  • if the variable is in snake case, we replace it with the snake case value.

Components Catalog Scripts

In the project directory, you can run:

npm run build

Build the application in production mode into a folder named dist. This folder can be served using any HTTP server.

npm run dev

Start dev server, aliases: vite dev, vite serve.
Open http://127.0.0.1:5173/ to view it in the browser.

npm run preview

Boots up a local static web server that serves the files from dist at http://localhost:4173 . It's an easy way to check if the production build looks OK in your local environment.

FAQs

Package last updated on 26 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc