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

coffeescript-concat

v1.0.14

Published

A utility for combining coffeescript files and resolving their dependencies.

Downloads

48

Readme

coffeescript-concat

coffeescript-concat is a utility that preprocesses and concatenates CoffeeScript source files.

It makes it easy to keep your CoffeeScript code in separate units and still run them easily. You can keep your source logically separated without the frustration of putting it all together to run or embed in a web page. Additionally, coffeescript-concat will give you a single sourcefile that will easily compile to a single Javascript file.

coffeescript-concat performs 4 operations:

  • Automatically puts parent classes in an inheritance chain in the correct order

  • Allows you to specify that a class from another file needs to be included before another file. When a #= require Classname directive is encountered, coffeescript-concat will find the file containing that class, preprocess it, and put it above the including class.

  • Allows you to specifiy that a file needs to be included before another file. When a #= require <FileName> or #=require <FileName.coffee> directive is encountered, coffeescript-concat will find the file, preprocess it, and put it above the including class.

  • Allows you to refer to external classes that will be available at runtime When a #= extern Classname directive is encountered, coffeescript-concat will assume that class exists.

How does coffeescript-concat find the classes and files? By specifying include directories, you can tell coffeescript where to look. If it can't find the needed file in any of the include directories, it will let you know.

Using coffeescript-concat:

Using npm:
$ npm install -g coffeescript-concat
$ coffeescript-concat -I /my/include/directory -I includeDir2 A.coffee B.coffee -o output.coffee

Using CoffeeScript directly:
$ coffee coffeescript-concat.coffee -I /my/include/directory -I includeDir2 A.coffee B.coffee -o output.coffee

This will preprocess and concatenate This.coffee, That.coffee, and TheOther.coffee along with any classes they require and output the resulting code into output.coffee. If you don't specify an output file (-o), coffeescript-concat prints the output to stdout so that you can easily write it to a file or pipe it to another utility for further processing.

Using grunt:

Check out grunt-coffeescript-concat

License:

ZLIB, see the LICENSE file