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

inix

v1.4.2

Published

init whatever you want

Downloads

26

Readme

inix

initilize your project with someone boilerplate(X). X means anyone boilerplate, becuase x normally means a varibale in mathematics.

About

Everytime when you start a new project, firstly you will intilize the project by scaffold tool or some boilerplate. Now you just need to create your own boilerplate repo, then inix will help you finish the rest things.

Installation

$ npm i -g inix

Getting Started

createilize your project with someone local template or remote git repo

$ inix create ~/demo/template

API

import { createApp } from "inix/dist/lib/commands/create";

createApp({
  templatePath: "/Users/xxx/xxx/template",
  data: { //data for template to render if any in terms of meta.js
  },
});

Commands

inix create

You can create your project from local template.

$ inix create <target>

The directory structure of template should be like:

- root
  - template
  - meta.js

For example, if the path of your template is ~/inix/root, then you can run:

$ inix create ~/inix/root

By default, it will show all existing boilerplates that you can use when you run:

$ inix create 

inix config

Config the template records which could be used to create new project by inix create

use local path to setup template records

$ inix config ~/demo/template.json

or use a remote config file by url

$ inix config http://xxx.xxx.com/path/template.json

inix add

Add new boilerplate into your template list, then you can use it when you run inix create

$ inix add

It will let you input some properties about the new boilerplate, like name, description and boilerplate location(local path or git repo). If it is a git repo, you could input the branch name as well.

inix del

Delete some boilerplate from the existing selections. After you run the command, it will show all existing selections which you can delete.

$ inix del

inix ls

Display all boilerplates you already have.

Boilerplate Definition

directory structure of boilerplate. See example.

- template
- mata.js (optional)

In meta.js, you can setup questions wrote by inquirer. Then you can use these answers in your template files rendered by handlebars. As well, if you want to do something after project initilization, you can use endCallback in your meta.js to do whatever you want.

Here is example about meta.js

//meta.js
module.exports = {
  questions: [{
    {
      type: 'input',
      name: 'description'
    },
    {
      type: 'input',
      name: 'serviceName',
      message: 'need service name',
      validate: function (val) {
        if (!val) {
          return "service name required"
        } else {
          return true;
        }
      }
    },
  }], 
  endCallback: function(metaData, {chalk, logger, files}) {
    //you can visit all answers from metaData.answers
    //files are that all in your boilerplate
    //do sth
  }
}