1

I'm using Budo to develop a website using Browserify and Babelify like this:

budo src/index.js:static/bundle.js --live -- -t [ babelify --presets [ es2015 ] ]

That works great, except the generated static/bundle.js isn't actually saved to disk - it's just accessible in the browser. If I remove the path argument:

budo --live -- -t [ babelify --presets [ es2015 ] ]

Then it just serves a local file in static/bundle.js but doesn't regenerate it.

How do I get it to actually generate and save the file?

Steve Bennett
  • 114,604
  • 39
  • 168
  • 219

1 Answers1

1

I'm sure you've moved onto other things, but why would you want to save it to disk anyway?

But take a look at this build file I created if you really need to: build.js

meetar
  • 7,443
  • 8
  • 42
  • 73
peterb
  • 891
  • 8
  • 7
  • Actually I still use Budo a lot. I need to save it to disk in order to publish to Github Pages. In practice I end up simply using `wget` to fetch and save it. – Steve Bennett Oct 31 '17 at 03:40
  • Btw I don't quite understand where your `build.js` fits. Seems to be using something called rimraf? Is this a standalone script or part of some framework? – Steve Bennett Oct 31 '17 at 03:41
  • "I still use Budo a lot" - Super great!!!. Regarding the build.js, I've put a whole lot of other stuff because I'm doing some css output also. If you take a look at lines 19-23. The main.js file is the starting point for my app - has all the initial includes (require or import statement). So I use browserify to pull all the includes together and then I use another module (uglifyify) to uglify my output js to build/bundle.js. – peterb Nov 01 '17 at 09:04
  • I've tried to describe how I've set up this template browserify+budo project that this build file is part of: https://github.com/peterbarraud/rapo-browserify-budo – peterb Nov 01 '17 at 09:09