

The main difference with run-js is that it's aimed a bit more towards newbies, hence why it runs any file in the directory. I like those modules a lot, and I think they definitely work for a different type of workflow.

Really cool stuff!Īside from Browserify, run-js uses Express to power the web server. The transform installify is used automatically install new dependencies. I don't think run-js will need to change to Webpack, or some other future bundler, to get the functionality that's wanted. I like Webpack as well, but I enjoy working with Browserify more, and find it easier to use overall, while still being able to do what I want to.

Run-js is powered by Browserify, and various transforms for it. ( Make sure to have a tag for this to work.) Implementation It'll automatically insert your compiled script as well. For example, if you had foo.js, create a foo.html in the same folder, and it'll use that for the template. html file with the same name as your script. However, if you need your own custom page, it's easy to do. Custom HTML pagesīy default, run-js will render a page when you visit a file in the browser. When you make a change, the browser will automatically reload. No need to go through the hullabaloo of setting up source maps. For example, creating index.js in the root of where you ran run-js will use that script when you visit Source maps Scripts as the index fileĬreating a file named index.js (or whatever type of file you prefer) will act as the index for the path you specify. Plus, the default HTML page includes a tag with an id of root, so that you can quickly append elements from a library, such as React. When you require a dependency, run-js will automatically install it for you, if it's not installed already. run-js supports JavaScript (with ES2015 and JSX enabled via Babel), CoffeeScript, and TypeScript out of the box. Just start run-js in a folder, write some code, and open it in the browser. There's no HTML files you have to create, no compile steps for your code to work, and no need to even manually install dependencies. From there, just visit any of your scripts in the browser, and they'll just work.įor API usage, see the documentation file. It will print out the URL it's running on.
