Closed philipyoungg closed 7 years ago
There currently isn't any sort of watch functionality built in. You could use a standalone watch utility to handle that. e.g. , facebook's watchman (I haven't actually tried this):
watchman -- trigger /path/to/dir triggername '*.js'-- babel --babel-flags --
which should call it every time a .js file is modified.
I'll think about building in support directly.
@ksherlock thanks for your recommendation. I researched and ended using fswatch.
filewatcher src/*.js 'rollup src/index.js | babel --es2015 | uglifyjs -m -c > app.min.js'
now much better! It's also amazing better-babel-cli can pipe files, unlike default babel cli.
I'm glad to hear it's working for you. There's a --babili
flag which will do some minimization as well I'm not sure how well it compares to uglify.
Love this. Is there any watch mode built-in? using
watch
doesn't do anything