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

arsnippet

v1.3.3

Published

Exlusive for ArvanCloud projects

Downloads

2

Readme

Arvan Snippet Cli

Make your template once and use it many times and avoid duplication in coding.

Requirements

You only need Node-JS to use this package.

Installation

Install arsnippet package as global in your system.


npm install --global arsnippet

Usage

Define Template

To create a template, first create a folder and then create the file you want in it. You can also define variables in your files to specify the values you want when rendering the template.

To define your variables, you must put the name of the variable between 4 brackets. Like the following text:


Hello World! I'm {{ name }}. This is my first template!

ArSnippet will later ask you for the values of your variables when rendering the template.

Import Template

To use a template, you first need to add it to ArSnippet.

Use the following command to add your template:


arsnippet import <template-path>

After calling the above command, the desired template will be saved with the name of the folder of your choice.

Using the -n or --name flag, you can save the template with your own name.

For example:


arsnippet import <template-path> [--name | -n] <custom-template-name>

Render Template

To use templates that you previously added to ArSnippet, you must use the render command, which contains two arguments. The first argument is the name of the template you added and the second is the name of the folder where the template is to be created.

An example of a command is:


arsnippet render <template-name> <target-folder-name>

Update Template

If you need to change a file in your template, here the ‍‍‍‍‍‍update command will help you. With the update command, you can easily edit your desired file. This command requires only one template name argument. The following command:

arsnippet update <template-name>

Then, after executing the command, ArSnippet will provide you with a menu of files in the template and will ask you to select the file you want. Then an editor will open for you that contains the contents of your file, you can apply your changes. Windows uses the default text editor, and Linux and Mac use Vim.

Remove Template

To clear the template, all you have to do is give the template name to ArSnippet as an argument and drink your coffee safely :) Example of a delete command:

arsnippet remove <template-name>

If you need to delete all the templates you can use the following command:

arsnippet removeall

Thats it!

Template Files Context

You can also use the detail command to view the contents of each file in your template. Like the following command:

arsnippet detail <template-name>

This command, like the update command, returns a menu of template files for you to select.

List Of Exists Templates

With the list command, ArSnippet returns a table of available templates for you. Like:

arsnippet list