2.0.1 • Published 9 years ago
apeman-task-scssvars v2.0.1
apeman-task-scssvars
apeman task to extract variables and write as json form scss files.
Installation
$ npm install apeman-task-scssvars --save-dev
Usage
- Define a task within Apemanfile.js
- Call the task via apeman task command.
Apemanfile.js
/** This is an example Apemanfile to use apeman-task-scssvars */
'use strict'
module.exports = {
$pkg: { /* ... */ },
$tasks: {
// Define your own task.
'scss:variables': require('apeman-task-scssvars')(
"constants/scss_vars_constants",
"stylesheets/**/*.scss",
{
//Options
}
)
}
}
Then,
$ apeman task my-task-01
Signature
define(src, dest, options) -> function
apeman task to extract variables and write as json form scss files.
Args
Name | Type | Default | Description | |
---|---|---|---|---|
src | string | string[] | Source file pattern. | |
dest | string | Destination file. | ||
options | Object | Optional settings. | ||
options.mode | string | File permission. | ||
options.nameVar | function(name, value) | Function to name a variable. | ||
options.filterVar | function(name, value) | Function to decide use a variable. | ||
options.additional | Object | Additional variables. |
License
This software is released under the MIT License.