Coder Social home page Coder Social logo

sourcecat's Introduction

sourcecat

A simple tool for concatenating source files in a repository in some kind of logical fashion. Files are concatenated in alphabetical order (with the exception of index.js trumping other files in a folder) breadth first through the folder structure.

Installation

npm install sourcecat -g

Usage

Specify the glob pattern as the first arg, that's all you can do. If none is specified, then code me will look to find all of the .js files from your current working directory down, excluding a few directories along the way (node_modules, test).

Why SourceCat?

Because I like using emu for generating my documentation, and using sourcecat I can put things in a mostly sensible order:

sourcecat | emu > README.md

Special Cases

In the following cases, the behaviour of the sourcecat command changes:

  • a src/ folder is detected in the current working directory. In this case, the top-level directory is skipped and only the src/ directory is traversed.

Reference

sourcecat.generate(pattern, callback)

From the current working directory, load the files matching the specified pattern and send the resulting data to the callback as an array of data objects (with a filename and content attribute).

sourcecat's People

Contributors

damonoehlman avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.