brfs

Command to watch and bundle using brfs without watchify

↘锁芯ラ 提交于 2020-01-15 06:33:46
问题 I'm trying to replicate the behavior of watchify with the brfs transform, but I need to use brfs directly because I want to avoid the additional code added to the script when using require with browserify/watchify. Using brfs directly simply replaces require(theFile) with its contents and nothing else. Using this command to bundle the following code produces my intended result: brfs main.js > bundle.js // main.js var fs = require('fs'); var templates = { 'header': fs.readFileSync('app

Command to watch and bundle using brfs without watchify

折月煮酒 提交于 2020-01-15 06:33:07
问题 I'm trying to replicate the behavior of watchify with the brfs transform, but I need to use brfs directly because I want to avoid the additional code added to the script when using require with browserify/watchify. Using brfs directly simply replaces require(theFile) with its contents and nothing else. Using this command to bundle the following code produces my intended result: brfs main.js > bundle.js // main.js var fs = require('fs'); var templates = { 'header': fs.readFileSync('app