Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.reduce( ( prevPromise, filePath ) => prevPromise.then( () => {
const xformStr = grunt.file.read( filePath );
grunt.log.writeln( `Transforming ${filePath}...` );
return transformer.transform( { xform: xformStr } )
.then( result => {
forms[ filePath.substring( filePath.lastIndexOf( '/' ) + 1 ) ] = {
html_form: result.form,
xml_model: result.model
};
} );
} ), Promise.resolve() )
.then( () => {