Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gJmry/svelt

Repository files navigation

Svelt

This project is a Rust-based command-line interface (CLI) tool designed to simplify interactions with Svelte projects.

Installation

Prerequisites

Before installing and using this CLI, make sure you have at least one of the following tools installed:

  • Rust: Install Rust by following the instructions at rust-lang.org.
  • Node.js and npm: Svelte requires Node.js for dependency management and the development server.

Install the CLI

Clone this repository and build the project using the following commands:

git clone https://github.com/gJmry/svelte-cli
cd svelte-cli
cargo install --path .

Or via NPM

npm i -g @gjmry/svelt

This will add Svelt in your terminal

Usage

svelt <command> [arguments]

For example, to initialize a new Svelte project:

svelt init my-project

Features


Available Commands

Status Legends

Emoji Status
βœ… Finished
🩹 Fixing
🚧 In progress
β›” Not started

Commands

Command Description Status
init [NAME] [TOOLKIT] Initializes a new Svelte project with the specified name. 🚧
version / v Displays the current version of the CLI. βœ…
help / h Displays help information about the CLI and its commands. βœ…
install [PACKAGE] [FLAG] Installs a specific package with optional flags. βœ…
run [ENV] Runs the project in the specified environment. βœ…
dev Starts a development server for live preview of the project. βœ…
build Compiles the Svelte project for production. βœ…
lint Runs the linter to detect syntax issues in the Svelte code. βœ…
start Starts the project, typically used for launching the application. βœ…
update [PACKAGE] Updates the specified package or the entire project. βœ…
uninstall [PACKAGE] Uninstalls a specific package from the project. βœ…
uninstall [PACKAGE] Uninstalls a specific package from the project. βœ…
create [SCHEMATIC] [NAME] [OPTIONS] Generates a new component or file based on a schematic template. 🚧
add [TOOLKIT] Add a toolkit in your project (check Toolkits ) 🚧

Toolkits

Name Description Status
UI Toolkits βœ…πŸš§
Tailwind A utility-first CSS framework for rapid UI development. βœ…
Bootstrap A popular CSS framework with a lot of pre-built components. β›”
Skeleton A lightweight CSS framework for minimalistic designs. β›”
Flowbite A UI kit based on Tailwind CSS with ready-to-use components. βœ…
Development Toolkits β›”
ESLint A popular linter for identifying and fixing JavaScript/TypeScript issues. β›”
Prettier An opinionated code formatter that supports multiple languages. β›”
Husky A tool to prevent bad git commit or push by running scripts before those actions. β›”
Lint-staged Runs linters on pre-committed files in Git, useful with Husky for pre-commit hooks. β›”
Testing Toolkits β›”
Jest A delightful JavaScript testing framework with a focus on simplicity. β›”
Mocha A feature-rich JavaScript test framework running on Node.js and in the browser. β›”
Cypress A JavaScript end-to-end testing framework for web applications. β›”
Jasmine A behavior-driven testing framework for JavaScript, often used with Angular. β›”
Build & Deployment Toolkits β›”
Webpack A static module bundler for modern JavaScript applications. β›”
Vite A next-generation, fast build tool that focuses on speed and simplicity. β›”
Parcel A zero-config, blazingly fast web application bundler. β›”
Rollup A JavaScript module bundler optimized for ES modules. β›”

Schematics

Name Description Status
Store Generate a js store file βœ…
Component Generate a .svelte file in a /components directory βœ…
Service Generate a .js file in a /service directory βœ…
Page ⬇️ Generate new route with a +page.svelte you can also add params ⬇️ βœ…
Layout Add +layout.svelte file in route βœ…
Error Add +error.svelte file in route βœ…
Script Add .ts file by default (otherwise use js) βœ…
Css Add .css file by default (otherwise use sass, or scss) βœ…
Server Add +page.server.ts file in route βœ…

Dependecies

Crate Version Description
cliclack 0.3.5 A crate for handling command-line input and output.
log 0.4.22 Provides a flexible logging system for runtime messages.
console 0.15.8 A crate for beautifying console output, making messages more readable.
serde_json 1.0.132 For serializing and deserializing JSON data.
clap 4.5.20 A powerful CLI argument parser, supporting features like auto-generated help.

Compatibility

Operating System Architecture Status
Linux x86_64 βœ… Fully supported
Linux ARM64 🚧 Work in progress
Windows x86_64 βœ… Fully supported
macOS x86_64 🚧 Work in progress

License

This project is licensed under the MIT License - See in the repository

About

A command-line interface for Svelte

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /