2
votes

I found it's confusing to use beefy.

  1. I have an app.js file, and I have the index.html with a script's src="./bundle.js". So I run following command:

    beefy app.js:bundle.js --live
    

    I want to use beefy to generate bundle.js and reload it everytime I change anything. But beefy just doesn't generate the bundle.js file for me. I open localhost page, all I got is bundle.js not found.

  2. Does beefy set up a simple local host at port 9966? what's it for? And why everytime I has to refresh the localhost page to make every work?

  3. If I have to use browserify to generate the bundle.js file, why to use beefy?

  4. It's document says all arguments after -- will pass to browserify, so I tried following:

    beefy app.js:bundle.js 9999 -- -o bundle.js 
    

    it still doesn't work. No bundle.js file is generating.

  5. Finally, I use browserify to generate the bundle.js and have index.html ready, and I run:

    beefy app.js:bundle.js --live 
    

    And I change my code, refresh my page. Yes, the page reflects the changes. When I looked into the bundle.js file generated, I see the code remains unchanged. But the bundle.js that browser loaded is new!! I don't know where this new bundle.js is stored.

It's just so confusing to use beefy and it lacks good document, can anyone help? I just want to live reload my bundle.js file.

3

3 Answers

0
votes

When you run:

beefy app.js:bundle.js --live

The browserified bundle should be at:

localhost:9966/bundle.js

Hope this helps.

0
votes

The document is indeed confusing, have you tried --browserify flag.

cd yourappdir
beefy app.js:bundle.js --live --browserify

Also I start using watchify https://github.com/substack/watchify for live bundle update. Beefy seems not be able to function as a simple file watcher reliably.

0
votes

3 years late into the game but, for me, budo works just fine:

budo app.js:bundle.js --live