0.0.2 • Published 10 years ago

component-preprocess v0.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
10 years ago

Preprocessor for Component(1)

Very simple component preprocessor.

A (bin-)script that searches sub-dirs for component.json files, looking for a 'preprocessors'-array option, and then require those files. Simple.

Installation

npm install component-preprocessor

Usage

First add a preprocessors array-option to your component.json: a list of files local to your component that does the stuff you want to be done. E.g:

{
  "name": "fireshop",
  "paths": [
    "app"
  ],
  "locals": [
    "boot"
  ],
  "preprocessors": [
    "lib/my-myth-css-preprocessor.js"
  ]  
}

Second, call the preprocessor;

Programatically:

require('component-preprocess');

In a Makefile:

build:
	@./node_modules/.bin/component-preprocess
	@component build
0.0.2

10 years ago

0.0.1

10 years ago