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

kuli

v1.0.7

Published

Kuli is your super-simple, configurable boilderplate builder tool, based on twig engine that allows you to define your templates (slaves) in your project or download those from any http repository.

Downloads

12

Readme

Kuli

Kuli is your super-simple, configurable boilderplate builder tool, based on twig engine that allows you to define your templates (slaves) in your project or download those from any http repository.

Use Kuli to save tons of time and brain capacity for yourself. Be smart and let him do your dirty work...

Install

npm install -g kuli

Init project

Run the following command in your project's root folder.

kuli init

By that you can initialize Kuli which creates the kuli.json file and .kuli-slaves folder for your project. While you can controll Kuli through kuli.json, it stores your templates in the .kuli-slaves folder.

kuli.json

Configuring Kuli is a piece of cake. The configuration file is that simple.

{
	"slaves": {
		"brick": {
			"src": "https://raw.githubusercontent.com/laborci/slaves/master/brick",
			"arguments": {}
		}
	},
	"ENV": {}
}

slaves

Definition of your slaves. If you define src property for your slave that will download it from that location. You can also override the slave's arguments here. At the example you have only one slave defined.

ENV

You can load or define environment variables here

{
	"slaves": {},
	"ENV": {
		"env" : "load-this-file.json",
		"my-env": {
			"my-first-key": "my-first-value",
			"my-second-key": "my-second-value"
		}
	}
}

At the example above env will be loaded, my-env will contain the values you presented. You can use this under the ENV key in your twigs.

Do the job

Kuli is your hard working buddy. If you want him to do the job you just need to use the do command and add the name of the slave you need him to get cracking with.

kuli do brick

Creating a slave

All slave must contain a slave.json file. That is the descriptor of your slave.

{
	"arguments": {
		"name": {},
		"tag": {"default": "{{name}}"},
		"class": "{{name|pascalCase}}"
	},
	"templates": {
		"brick.js.twig": "{{name}}.brick.js",
		"scss.twig": "{{name}}.scss",
		"twig.twig": "{{name}}.twig"
	}
}

Arguments

You can define your arguments in the arguments section. All values you define will be small twig fragments. All the ENV variables or previously defined arguments can be used here.

string

If the value is a string then it will be used but not asked. Just like the class argument above.

null

If it is an empty object (or null) your attribute will not have a default value.

default

If you define a default property here, Kuli will use that as a default value for that attribute.

Templates

In this section you can define your template files. The key is the twig template file, the value is the desired file name of the output file.

While rendering the template files you can access all ENV and attribute values. You should not refer ENV values directly, it is much better to pipe environment values through attributes.

Twig case filters

  • camelCase
  • capitalCase
  • constantCase
  • dotCase
  • headerCase
  • noCase
  • paramCase
  • pascalCase
  • pathCase
  • sentenceCase
  • snakeCase