Skip to content

Commit

Permalink
Support brunch watch for Firefox (#100)
Browse files Browse the repository at this point in the history
Run `BRUNCH_ENV=firefox npx brunch w`, and the watch will regenerate the
public-ff/ tree whenever you change the source files.
  • Loading branch information
Chris White committed Dec 28, 2018
1 parent 72ffa2f commit c764b39
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions brunch-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// brunch-config.js for brunch-test by cxw42
let child_process = require('child_process');

/*
* Notes on the TabFern extension friendly version number.
Expand Down Expand Up @@ -237,6 +238,21 @@ me.overrides.development = {
// },
//};

// Firefox build
me.overrides.firefox = {
hooks: {
onCompile: ()=>{
console.log('Making public-ff tree');
try {
child_process.execSync('node ffize.js');
console.log('done');
} catch(error) {
console.error(error);
}
},
},
};

//console.dir(me, {depth:null}); // DEBUG
module.exports = me;

Expand Down
1 change: 1 addition & 0 deletions ffize.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ if(idx > -1) {

// Write it back out
fs.writeFileSync('./public-ff/manifest.json', JSON.stringify(manifest));
console.log('Wrote public-ff');

0 comments on commit c764b39

Please sign in to comment.