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

@chbernat/stencil-cli

v1.0.33

Published

A command line interface for StencilJS

Downloads

8

Readme

Stencil Command Line Interface

This is unofficial extension to already existing Stencil-CLI which I have found lacking in such features as generating components. In future I will hopefully make a PR with this code to original Stencil's lib.

Installation

Stencil requires a recent LTS version of NodeJS and npm. Make sure you've installed and/or updated Node before continuing.

You can install the Stencil CLI globally with command,

npm i @chbernat/stencil-cli -g

Now the stencil-cli command should be available in your command line tool.

If you want to use it only for generation of your components you can install it as dev dependency (with flag -D).

Usage

Reusable Components

You can create a reusable stencil component or library with command,

stencil-cli start-component my-component

Where my-component is the name you want for the component or library.

This will create a folder with the basics that you need to develop your component.

Building an app

You can build entire apps with Stencil, here is the command to get a starter app for Stencil,

stencil-cli start-app my-app

Where my-app is the name you want for the app.

This will create a folder with the basics that you need to develop your awesome app.

Generating a component

With the following command you can generate a new Stencil component in your exisiting Stencil projects,

stencil-cli generate my-component

Where my-component is the name you want for the new component.

This will create a new folder for the component under src/components, with a css file, unit test spec.ts file and the component tsx file.

Start development server

The following command is simply an alias to npm start that starts the Stencil development server.

stencil-cli start

Wildcard command

If you write any other command after stencil-cli it acts like an alias for a npm run script.

For example stenci-clil build will run the npm run build command.

Contribute

If you see anything that can be improved just let me know or fix it in a pull request. :)

Development

To help develop this tool start with cloning it down to your machine and run npm install.

git clone https://github.com/ChBernat/stencil-cli stencil-cli
cd stencil-cli
npm install

To test your local changes run the following in the stencil-cli folder,

npm link

and now you should be able to run the stencil-cli command anywhere and your changes is reflected instantly.

Author

Many thanks to original author of the repository and code: https://github.com/nerdic-coder/stencil-cli