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

slush-coffeescript

v0.2.0

Published

Generates a Node.js module written in Coffeescript

Downloads

3

Readme

slush-coffeescript

NPM version Dependency Status Dev. Dependency Status

Generates a Node module written in CoffeeScript

Installing

Install slush-coffeescript globally:

$ npm install -g slush-coffeescript

Usage

Create a new folder for your project:

$ mkdir my-slush-coffeescript

Run the generator from within the new folder:

$ cd my-slush-coffeescript && slush coffeescript

and answer the proceeding questions.

  • Add bin script for CLI?

    Answering yes to this question generates an executable script (by default in the bin directory) to be run from the command line, which calls a module cli to handle processing command-line arguments and running the application.

  • Compile CoffeeScript to JS?

    Answering no (the default) to this means that the module will contain pure CoffeeScript source and extend Node's require function to recognise CoffeeScript modules and automatically compile them at run-time when requested (via the coffee-script/register module).

    To have a more traditional module with CoffeeScript source compiled to JavaScript answering yes to this prompt lets you specify a build directory which the included Gulpfile.js will build to.

Automating module generation

Instead of answering the prompts to configure the generator you can specify the answers in a file called slush-config.json in the directory you run the generator from. If the generator finds this file in the current directory when it is run then it reads slush-config.json and overrides the default settings with any data it finds.

The following examples show all of the settings the generator currently supports:

slush-config.json

Basic CoffeeScript module designed to be directly used as a library - compilation is done at run-time.

{
  "app_name": "my-node-lib",
  "app_description": "My CoffeeScript library",
  "app_version": "0.0.1",
  "author_name": "James Skinner",
  "author_email": "[email protected]",
  "user_name": "spiralx",
  "license": "MIT",
  "bin": false,
  "compiled": false,
  "source_dir": "lib",
  "test_dir": "test"
}

slush-config-cli.json

A CoffeeScript module that can be run from the command-line and typically installed globally.

{
  "app_name": "my-node-command",
  "app_description": "My CoffeeScript CLI module",
  "bin": true
}

slush-config-compiled.json

A JavaScript module built from CoffeeScript source using the included gulp build script.

{
  "app_name": "my-compiled-node-lib",
  "app_description": "My CoffeeScript module",
  "compiled": true,
  "source_dir": "coffee",
  "build_dir": "lib",
  "test_dir": "test"
}

slush-config-both.json

A module with a CLI script, written in CoffeeScript and compiled to JavaScript.

{
  "bin": true,
  "compiled": true
}

Getting To Know Slush

Slush is a tool that uses Gulp for project scaffolding.

Slush does not contain anything "out of the box", except the ability to locate installed slush generators and to run them with liftoff.

To find out more about Slush, check out the documentation.

Contributing

See the CONTRIBUTING Guidelines

Support

If you have any problem or suggestion please open an issue here.

License

The MIT License

Copyright (c) 2014, James Skinner

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.