function preprocessor(name, extension, relativePath='src/') {
    const preprocessor = function() {
        return src(`${relativePath}**/*.${extension}`)
        .pipe(preprocess({
            context: {
                VERSION: foundryMetadata.version,
                TITLE: foundryMetadata.title,
                NAME: foundryMetadata.name,
                AUTHOR: foundryMetadata.author
            }
        }))
        .pipe(print(filepath => `Preprocessing ${name} file @ ${filepath}`))
        .pipe(dest(DEST, true));
    };
    preprocessor.displayName = `${name}Preprocess`;

    return preprocessor;
}
/**
 * Generate a preprocessing task that inserts foundry manifest metadata.
 * Manifests include system.json or module.json.
 */
Generate a preprocessing task that inserts foundry manifest metadata.
Generate a preprocessing task that inserts foundry manifest metadata .
function preprocessor(name, extension, relativePath='src/') {
    const preprocessor = function() {
        return src(`${relativePath}**/*.${extension}`)
        .pipe(preprocess({
            context: {
                VERSION: foundryMetadata.version,
                TITLE: foundryMetadata.title,
                NAME: foundryMetadata.name,
                AUTHOR: foundryMetadata.author
            }
        }))
        .pipe(print(filepath => `Preprocessing ${name} file @ ${filepath}`))
        .pipe(dest(DEST, true));
    };
    preprocessor.displayName = `${name}Preprocess`;
    return preprocessor;
}
function preprocessor ( name , extension , relativePath = 'src/' ) { const preprocessor = function ( ) { return src ( ` ${ relativePath } ${ extension } ` ) . pipe ( preprocess ( { context : { VERSION : foundryMetadata . version , TITLE : foundryMetadata . title , NAME : foundryMetadata . name , AUTHOR : foundryMetadata . author } } ) ) . pipe ( print ( filepath => ` ${ name } ${ filepath } ` ) ) . pipe ( dest ( DEST , true ) ) ; } ; preprocessor . displayName = ` ${ name } ` ; return preprocessor ; }
Generate a preprocessing task that inserts foundry manifest metadata.
Generate a preprocessing task that inserts foundry manifest metadata .