Comments (11)
Can you try budo@next
and garnish@latest
?
Here is a test case with the latest dependencies and it seems to be working:
https://github.com/mattdesl/three-glslify-example
Might be something with budo@4.
from budo.
Made sure I was on latest for all. Seems to be fine now.
from budo.
@mattdesl @mikkoh Is there a similar solution for non-glsl files?
I need to watch a plain old fs.readFileSync('…')
– or (as I did with webpack and isomorphic-ensure) require('raw!…')
.
from budo.
BTW, I’ve just stumbled upon a way to do this programmatically: #59 (comment). But is there a way to get that with the CLI alone – or with a browserify transform?
from budo.
When you use brfs it should pick up non-JS dependencies.
Example:
index.js
var fs = require('fs')
var file = fs.readFileSync(__dirname + '/foo.txt', 'utf8')
console.log(file)
budo index.js --live -- -t brfs | garnish
Now when you save foo.txt
it will cause a re-bundle and LiveReload.
from budo.
Great! Thanks!
from budo.
Any change anyone of you have tried this in 2017 with all recent versions? I try everything and cannot get glsl files to trigger bundle updates.
from budo.
Are you using brfs or glslify? Have you updated to latest versions of the transform? I'm using this on a current project so unless something else is going on it should be all good. 😄
from budo.
Hi! Glslify 6.0.1, is that what you're referring to? Yes, and the latest versions of budo and garnish. Your project doesn't happen to be open source, right?
It doesn't rebuild the bundle. Adding glsl files to watchGlob doesn't work as a reload is triggered without updating the bundle.
I had success with webpack and the glsl-loader, but I would enjoy using budo as it is faster.
from budo.
I updated the package.json in this example and you can see how to set it up with the latest version of the tools (you no longer need garnish
, the repo was quite old).
https://github.com/mattdesl/three-glslify-example
If you clone and npm install
+ npm start
in that repo it should work. If it's not working, it could be something to do with the LiveReload backend (which I'm sure we can also fix). 😄
from budo.
Thank you, I was updated but I removed a bunch of excess stuff I probably didn't need, and I would guess I was using the glslify transform the wrong way. Using it only like in the package.json in your repo and it works. Thanks a lot, and great work.
diff --git a/.babelrc b/.babelrc
index 3246af1..c13c5f6 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,4 +1,3 @@
{
- "plugins": ["glslify"],
- "presets": ["es2015", "stage-0"]
+ "presets": ["es2015"]
}
diff --git a/package.json b/package.json
index bae3f55..db8ad59 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack -p",
"serve": "node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --colors --config ./webpack.config.dev.js",
- "serve:budo": "node_modules/.bin/budo src/main.js:public/bundle.js --live -v -p 8080 -t glslify | garnish",
+ "serve:budo": "node_modules/.bin/budo src/main.js:public/bundle.js --live -v -p 8080",
"build:browserify": "browserify src/main.js | uglifyjs -m -c warnings=false > public/bundle.js"
},
"keywords": [
@@ -20,31 +20,24 @@
"author": "Jonathan Grangien",
"license": "ISC",
"dependencies": {
- "babel-core": "^6.18.2",
"babel-loader": "^6.2.9",
"babel-plugin-glslify": "^2.0.0",
"babel-polyfill": "^6.16.0",
- "babel-preset-es2015": "^6.18.0",
- "babel-preset-stage-0": "^6.16.0",
+ "babel-preset-es2015": "^6.22.0",
"babelify": "^7.3.0",
"browserify": "^14.0.0",
"budo": "^9.4.5",
"css-loader": "^0.26.1",
- "extract-text-webpack-plugin": "^1.0.1",
- "garnish": "^5.2.0",
"glsl-noise": "0.0.0",
"glslify": "^6.0.1",
"glslify-fancy-imports": "^1.0.1",
"glslify-hex": "^2.1.1",
"glslify-live": "^2.1.1",
- "glslify-loader": "^1.0.2",
"node-sass": "^3.13.0",
- "raw-loader": "^0.5.1",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
- "three": "^0.82.1",
+ "three": "^0.84.0",
"three-trackballcontrols": "^0.0.5",
- "transform-loader": "^0.2.3",
"uglify-js": "^2.7.5",
"webpack": "^1.14.0",
"webpack-glsl-loader": "^1.0.1"
from budo.
Related Issues (20)
- CSS Live reload stopped working with budo 10 HOT 4
- browserify rebuild full bundle.
- changes detect but not included in new build HOT 2
- Use native Object.assign instead of xtend HOT 1
- LiveReload link broken in documentation
- Specifying babelify options with node API HOT 2
- Handle more than one bundle
- Live reload without bundling? HOT 1
- How do I pass options to watchify(-middleware)?
- Crash when rebuilding linked dependency HOT 1
- Favicon suppression
- live port in client script
- `--pushstate` is not working
- Vulnerability alert in glob-parent
- -ssl seems to no work HOT 1
- how to make the budo live on production server
- paths with `.` in them do not render HOT 1
- Got this on my terminal when running canvas-sketch: can you give me a hint of how to solve it? HOT 2
- How to disable errors messages from replacing DOM?
- ERROR RSA PRIVATE KEY not found from openssl output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from budo.