npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lucy-cli

v0.9.3

Published

Lucy Framework for WIX Studio Editor

Downloads

1,604

Readme

Lucy-CLI

Lucy-CLI

Motivation

Lucy-CLI was developed out of a personal need to gain full TypeScript support for Wix Velo projects. Typically, using Wix’s GitHub integration provides JSON docs and basic type support, but I aimed for a more integrated TypeScript experience, especially for larger projects that benefit from enhanced type safety.

Lucy, my loyal dog, accompanied me during long nights working on a major project where I developed this CLI. Her companionship and resilience inspired the name "Lucy-CLI."

CAUTION: Thing to keep in mind before using Lucy-CLI

This CLI is still in development and may have bugs. Please use it with caution. Libraries are expected to have the same folder structure as the main typescript folder except for the pages folder. (backend, public, styles) The lucy CLI is opinionated and may not work with all projects.

What It Does

Lucy-CLI is designed to streamline the setup and management of TypeScript within Wix Velo projects, providing tools to enhance code quality and reduce development time. Here’s what it offers:

  1. ESLint Configuration

    • Adds ESLint with a default configuration (customizable post-init) to maintain consistent code style and prevent common errors.
  2. Wix Type Definitions

    • Exposes Wix type definitions located in .wix/types/wix-code-types, allowing direct import and access to the types for comprehensive TypeScript support.
  3. Autocomplete and Type Mapping for Page Elements

    • Maps Wix page elements to their respective types, so $w('element') calls have full TypeScript support, including autocomplete for properties and methods.
  4. Git Submodule Support

    • Includes support for git submodules, providing full type support within submodules and enabling the use of libraries and types across projects.
  5. Configurable Setup

    • After initialization, Lucy-CLI creates a lucy-config.json configuration file where you can modify settings, add dev packages, specify Wix packages, and configure git submodules.
  6. Execute render functions

    • Lucy-CLI can execute render functions located in the backend template folder, allowing you to test render functions locally.
  7. compile sccs files

    • Lucy-CLI can compile scss files to css files.
    • It compiles styles/global.scss file to global.css.
  8. Wix NPM Package Installation

    • Lucy-CLI can install Wix npm packages from the lucy.json file in the project directory.
  9. Teting with Jest

    • Lucy-CLI can run tests with Jest.
    • It runs tests located backend folder with the file name ending with .spec.ts.
    • it creates a code coverage report in the coverage folder in the lib folders and typescript folders.
  10. Linting with ESLint

    • Lucy-CLI can lint the code with ESLint.
    • It uses the ESLint configuration in the .eslintrc.cjs file in the project directory.
  11. Add git version during production build

    • Lucy-CLI can add the git version to the production build.
    • It adds the git version to the public/constant/env.ts file in the public folder under the key gitTag.

Commands & Options

Lucy-CLI comes with a range of commands and options to help manage your Wix Velo project. Here’s an overview:

Commands

  • init: Initializes the current folder as a Wix project, creating essential configuration files.
  • dev: Starts the development environment, including setting up any required services for local development.
  • build-prod: Builds the project in production mode, optimizing files for deployment.
  • prepare: Re-runs initialization commands, useful for setting up a pre-configured environment.
  • sync: Synchronizes the database and any dependencies or configurations necessary for the project.
  • install: Installs all Wix npm packages listed in the wixpkgs.json file in the project directory.
  • fix: Runs a fix command to resolve common issues in development or production settings.
  • 🦮 docs: Generates documentation for the project.
  • 🦮 cypress: Starts the Cypress test runner.
  • 🦮 e2e: Starts the Cypress test runner in CI mode.
    Usage: e2e <someKey> <someID>
    • someKey: The key for the test.
    • someID: The build ID for the test.

Options

  • -h, help: Displays the help message with command descriptions.
  • -v, version: Shows the current version of Lucy-CLI as defined in the project’s package.json.
  • -f, force: Forces specific commands to execute, useful for deleting obsolete pages or initializing missing components.
  • -l: Locks package versions to those specified in the configuration file during installation.

Examples

Here are some example commands to get started with Lucy-CLI:

# Initialize a new Wix project
lucy-cli init

# Start the development environment
lucy-cli dev

# Synchronize database and settings
lucy-cli sync

# Install Wix npm packages from 'wixpkgs.json' with locked versions
lucy-cli install -l

# Force start the dev environment
lucy-cli dev -f

# get help
lucy-cli help

🦮 Lucy CLI Help
Usage: lucy-cli <command> [options]

Commands:
🦮 init               : Initializes the current folder as a Wix project by creating the necessary configuration files.
🦮 dev                : Starts the development environment. This includes setting up any required services for local development.
🦮 build-prod         : Builds the project in production mode, optimizing files for deployment.
🦮 prepare            : Prepares the project by re-running initialization commands. Useful for setting up a pre-configured environment.
🦮 sync               : Synchronizes the database and any dependencies or configurations necessary for the project.
🦮 install            : Installs all Wix npm packages listed in the 'wixpkgs.json' file in the project directory.
🦮 fix                : Runs a fix command to resolve common issues in development or production settings.
🦮 docs               : Generates documentation for the project.
🦮 cypress            : Starts the cypress test runner.
🦮 e2e                : Starts the cypress test runner in CI mode. first argument is the key second is the build id <e2e <somekey <someID>

Options:
🦮 -h, help           : Displays this help message.
🦮 -v, version        : Displays the current version of Lucy CLI as defined in the project’s package.json.
🦮 -f, force          : Forces specific commands to execute even if they may lead to potential issues.
                      Used for functions like deleting obsolete pages or initializing missing components.
🦮 -l                 : Locks package versions to those specified in the configuration file during installation.

Examples:
🦮 lucy-cli init       : Initializes a new Wix project.
🦮 lucy-cli dev        : Starts the development environment.
🦮 lucy-cli sync       : Synchronizes database and settings.
🦮 lucy-cli install    : Installs all Wix npm packages from 'wixpkgs.json'.
🦮 lucy-cli dev -f     : Starts the dev environment with forced settings.
🦮 lucy-cli install -l : Installs Wix npm packages, respecting locked versions specified in the configuration.