New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wixc3/codux-librarian

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/codux-librarian

`codux-librarian` is a CLI tool for packaging libraries of third-party boards and components templates into a format that can be consumed by [Codux](https://www.codux.com).

  • 0.10.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Codux Librarian

codux-librarian is a CLI tool for packaging libraries of third-party boards and components templates into a format that can be consumed by Codux.

This tool creates an NPM package containing the library's boards. Once this package is added as a dev dependency in a user's project, the boards will appear in the "libraries" section of the Add Panel when the project is opened in Codux and in the new component dialog to allow install/inline component templates.

Building an Asset Library

To package your boards into a library, follow these steps:

  1. Add @wixc3/codux-librarian as a dev dependency to the project you want to use for providing boards to other projects:
npm install --save-dev @wixc3/codux-librarian
  1. Create a codux-librarian.config.json file in the root directory of the project. Configure it based on the format described in the LibrarianConfig interface.

  2. Build the library using the CLI:

    npx codux-librarian build
    

    Build Options

    The build command supports the following option:

    • --config: Specify a custom path to a configuration file. Defaults to ./codux-librarian.config.json.
  3. A new directory containing the packaged library will be generated. Publish this package to NPM:

Build Process Details and Requirements

Board Templates

Any board file located in the configured boardsPath will be copied to the package.

Component Templates

Folders containing a *.component.json file under the configured componentsPath will be copied to the package. Required dependencies for components are automatically determined by inspecting JavaScript imports in the component template modules.

Dependency Management:

  • Dependencies required by components must be explicitly set as peerDependencies in the library package with the acceptable version range.
  • To prevent automatic installation by consuming projects, the dependency's optional flag should be set in the usedPeerDependenciesMeta.

Ignored Directories

The metadata directory is excluded from the package during the build process.

Consuming an Asset library

To use a packaged library in a project:

  1. Add the packaged library as a development dependency:

    npm install --save-dev library-package
    
  2. Update the codux.config.json file of the consuming project to include the library:

    {
      "addPanel": {
        "assets": ["library-package"]
      }
    }
    

Limitations

  1. Boards in the boardsPath that import components using relative paths are not supported. Components must be imported from external packages.
  2. Boards containing multiple return statements are not supported.
  3. Board cover images must be imported using a relative path to the image file, including the file extension.

FAQs

Package last updated on 12 Jan 2025

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