specfolder

a simple specification parser for filenames and folders for multiple compilations tasks

npm install specfolder
1 downloads in the last week
4 downloads in the last month

Specfolder

a simple filename's specification for compilation tasks build with jison

Installation

  $ npm install jahpd/specfolder
  $ npm install -l

Usage

This module is part of jah-compiler, but you can use and modify if you want in your projects;

in jah-compiler, the src/ folder is used as main folder for (coffee-script) files; I want put all files in one folder, but specify the destination of compiled code(generally a javascript code)

So

  • src/app.coffee file will be translated to lib/app.js
  • src/app.test.coffee file will be translated to test/app.js
  • src/app.examples.coffee file will be translated to examples/app.js

to test this do:

  $ echo "app.examples.coffee" > testspec
  $ node lib/specfolder.js testspec

At now, the generated code from testspec file is:

{ spec: [ { filename: 'app' }, { src: 'coffee', dest: 'js' } ],
  path: [ 'src/app.examples.coffee', 'examples/app.js' ] }
npm loves you