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 🙏

© 2026 – Pkg Stats / Ryan Hefner

fisx-command-init

v0.2.0

Published

scaffold utilities for fisx

Readme

fisx-command-init

Dependency Status devDependency Status NPM Version

Init project or files using the given tempalte.

How to use

Init project

fisx init # using the default project template to init project
fisx init spa # init spa project template
fisx init spa --force # force init the not empty project directory
fisx init gitlab:xx/xx # init project using the template from gitlab
fisx init github:xx/xx # init project using the template from github
fisx init ./xx/xx # init project from local template
fisx init npm:[email protected] # specify the scaffold version

The init source syntax is the same as fisx package install

If using gitlab, some custom options you can configure:

fis.set('scaffold.gitlabDomain', 'http://<your gitlab domain>');
fis.set('scaffold.gitlabToken', '<private token>');

Init file

fisx init html index.html # create html file
fisx init js app.js # create js file

View help information

fisx init -h

Force use the latest scaffold

If your scaffold is from remote, and you want to disable the local cache and fetch the latest to init, you can use --latest options.

fisx init --latest

Custom builtin template

Default builtin template is fisx-scaffold. You can custom the builtin template type:

  • Custom project template

    fis.set('scaffold.project', {
        spa: {
            uri: 'yourscaffold/xxx', // by default source is github, you can use like github:xx to specify the source type
            description: 'the template descripion, you can see this in help information'
        }
    });
  • Custom file template

    fis.set('scaffold.file', {
        html: {
            uri: 'yourscaffold/xxx.html',
            description: 'the template descripion, you can see this in help information'
        }
    });
  • Custom the deafult template source owner:

    fisx init abc is equivalent to fisx init myrepos/abc, and is also equivalent to fisx init github:myrepos/abc.

    fis.set('scaffold.namespace', 'myrepos');
  • Custom the scaffold source type

    By default, the default source type is GitHub, using the following setting to change:

    fis.set('scaffold.source', {
        value: 'gitlab',
        options: function () {
            token: 'xx',
            domain: 'http://xx.gitlab.com'
        }
    });

Template syntax

Syntax of variable

  • ${#variableName#}: the variable value will be inited in the form of command interaction

  • ${#variableName=variable default value#}: with default value

  • ${#varName:boolean=true#}: specify the type of the variable

  • The template is rendered by template engine etpl, so it supports the syntax like conditional expression defined in etpl.

  • The command open and close syntax: <!#-- and --#> .

  • You can use the template variable in file name or file content.

Builtin template variable

  • author: by default using the author information from package.json, if not found, will try to use the system use name.

  • date: the date format is like YYYY/m/d

  • name: the project name, by default using the project director name

  • custom your template variable

    • using the config

      fis.set('template.xxx', function () {
          return 'xxx';
      });
      fis.set('template.xxx', 'xxx');
    • using the command args

      fisx init xx --author [email protected]