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

gapify

v0.0.20

Published

Command-line tool to compile Express apps into PhoneGap apps

Downloads

99

Readme

Gapify

Command-line tool to compile Express apps into PhoneGap apps

Build Status

It turned out to be a fairly flexible tool that can be used by anyone who wants to move files around and compile CoffeeScript, Jade, or Stylus files. More files types should be supported soon.

Note: This was quickly thrown together and isn't what I would consider stable. Just keep this in mind.

Configuration

Gapify relies on a configuration file, gapify.json, in the root directory. Here is a sample configuration.

{
   "output": "./bin", // specifies the output directory
   "assets": [
      {
         "from":"assets/js/tree.coffee", // file type is inferred from extension
         "to":"{out}/js/tree.js" // `{out}` is replaced by output directory
      },
      {
         "from":"assets/css/skin.styl",
         "to":"{out}/css/skin.css"
      },
      {
         "from":"assets/css/lib/fannect.css",
         "to":"{out}/css/lib/fannect.css"
      },
      {
         "from":"public/images", // directories can be copied (included subdirectories)
         "to":"{out}/images"
      }
   ],
   "views": {
      "directory":"views", // directory of all the Jade templates
      "ignore":["layout.jade"] // files that are layouts and should be ignored
   },
   "default_command": "GitCheckIn", // Command run by default on success
   "commands": { // this section allows for terminal commands to be executed on success compilation
      "GitCheckIn": [
         {
            "command": "git add . -A", // commands are executed with output directory as the working directory
            "on_error": "stop" // does NOT execute following commands on an error
         },
         {
            "command": "git commit -m \"Auto update by Gapify.\"",
            "on_error": "continue" // DOES execute following commands on an error
         },
         {
            "command": "git push origin master",
            "on_error": "stop"
         }
      ]
   }
}

When using PhoneGap, file paths using the root (such as /blah) are not resolved correctly. To compensate, the folder structure of the views is flattened and all files in the view directory are renamed according to their previous folder structure.

Example: sub/example.jade -> sub-example.html

Install

npm install -g gapify

Command-line Options

   Usage: gapify [options] [command]
   
   Commands:
   
      build                   compile files into output directory
      watch                   watch for file
      
   Options:
   
      -h, --help              output usage information
      -o, --output <path>     change the output directory, overrides config file
      -c, --chdir <path>      change the working directory
      -e, --empty             empties output directory before compilation (excluding .gt and .gitignore)
      -r, --run <command>     runs command after successful build
      -d, --debug             does not minify JS and CSS
      -s, --silent            suppresses console output
      

Running the Tests

npm test