build(aio): move the transforms folder into the tools folder

This commit is contained in:
Peter Bacon Darwin
2017-04-16 21:31:21 +01:00
committed by Pete Bacon Darwin
parent 7c418a7e06
commit abecf3eb6d
160 changed files with 24 additions and 18 deletions

View File

@ -0,0 +1,15 @@
module.exports = function() {
return {
name: 'trimBlankLines',
process: function(str) {
var lines = str.split(/\r?\n/);
while (lines.length && (lines[0].trim() === '')) {
lines.shift();
}
while (lines.length && (lines[lines.length - 1].trim() === '')) {
lines.pop();
}
return lines.join('\n');
}
};
};