2015-07-10 19:09:18 -04:00
|
|
|
var fs = require('fs');
|
|
|
|
var path = require('path');
|
|
|
|
|
|
|
|
module.exports = readJs;
|
2016-01-22 13:51:16 -05:00
|
|
|
function readJs(file: string) {
|
2015-07-10 19:09:18 -04:00
|
|
|
var content =
|
|
|
|
fs.readFileSync(path.join('tools/broccoli/js-replace', file + '.js'), {encoding: 'utf-8'});
|
|
|
|
// TODO(broccoli): we don't really need this, it's here to make the output match the
|
|
|
|
// tools/build/html
|
2016-05-26 13:45:37 -04:00
|
|
|
return content.substring(0, content.lastIndexOf('\n'));
|
2015-07-10 19:09:18 -04:00
|
|
|
}
|