Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Fix for using sources with a map. #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions tasks/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ module.exports = function(grunt) {
}
async.series(_.map(config.build, function(source, target) {
return function(complete) {
var sources = typeof source === 'string' ? [source] : source,
output = '';
async.series(sources.map(function(source) {
var sourceData = source.file ? source.file : source,
sources = typeof sourceData === 'string' ? [sourceData] : sourceData,
output = ''
async.series(sources.map(function(sourceFile) {
return function(next) {
static.transform(typeof source === 'object' ? source.file : source, function(buffer) {
static.transform(sourceFile, function(buffer) {
output += buffer.toString();
next();
}, typeof source === 'object' ? source.context: undefined);
Expand Down