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

jails-cli

v1.4.0

Published

The Jails command line tool

Downloads

10

Readme

Jails ClI

Jails CLI helps you to:

  • Scaffold Jails modules easily
  • Build your Js project
  • Install modules from Jails-org repository

Installing CLI

sudo npm i jails-cli -g

That's it... Now you're able to run jails command. To uninstall just use the same command above but using uninstall npm command.

Important All the examples below are running jails-cli from js/ folder, you can run jails-cli from your project root folder and then specify your js directory location. Check Commands section for further information.

Scaffolding

There's some modules that can be scaffolded.

  • Apps
  • Components
  • Controllers
  • Config file
jails new app my-app

That command above will create an app on your apps folder named my-app.

It will generate the following snippet:

define(['jails'], function( jails ){

    jails.app('my-app', function(html, data){

        this.init = function(){

        };
    })
});

You can also save that in a specific folder:

jails new app product/page

Saving at: ** assets/js/apps/product/page.js **

The options available are : app, component, controller,config.

Building your Project

Jails uses RequireJs in order to make all AMD modules working. You can choose to build an app page and generate a single js minified file with all the modules within.

  • You need to change your config file and include config and requirejs to the compilation step.
require.config({

	baseUrl :'assets/js/',
	deps    :['jquery', 'jails', jailsapp.page],
	include :['config', 'lib/requirejs'],

    (...)
  • Then, point your script file to your min js file:

<script type="text/javascript">
    var jailsapp = {
        page :'apps/home'
    };
</script>

<script type="text/javascript" src="assets/js/min/home" data-main="apps/home"></script>

jailsapp is required for jails application. Don't use other global variable.

Run build command, pointing to your app, like home:

jails build home

It will generate a assets/js/min/home.js minified file.

You can also run build task without any parameters to build all apps:

jails build

You can set uglify off, can be used to generate expanded files, very useful for debugs.

jails build -u none

or

jails build home -u none

Watch Files

The watching task is still on developing yet and doesn't let you to use many options for now, but it's quite usefull when you just need to build the application after changing some file.

jails watch <app>

App should be the application you're working, for now, the watching task will look for any changes on assets/js and descendents and build project. <app> parameter is required, in the future it will have more options.

For instance, to build the app called home when anything changes:

jails watch home

To quit watching on terminal just enter ctrl+c.

Help

For more information and detailed options just hit:

jails

or

jails -h

Commands

Commands:

new <module> <name>  Create an jails snippet code. Options: [app, component, controller, config].
build [app]          Build project to a single min file, you can specify a single app.
watch <app>          Watch for files changes and build the project automatically.

Options:

-u, --uglify <compression>  set uglify to [uglify, uglify2, closure, closure.keepLines, none]. Default : uglify2
-d, --dir <dir>             source js folder location
-o, --output <dir>          dist js folder location
-c, --config <dir>          set a config file to build process
--es6                       generate modules with es6 sintax