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


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

  $ npm install jahpd/specfolder
  $ npm install -l

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)


  • 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' ] }