With Instant Previews, Forestry is able to run your static site generator’s development server in our cloud preview environment, drastically reducing the time it takes to rebuild your preview. Many developers have found creative solutions to this problem, which I learned while we were beta testing our brand new Instant Previews feature. A slightly inelegant solution, but perfectly serviceable. For the most part this is a pretty minor inconvenience: your deployment script could just run the commands separately, and maybe in your development environment you could run Webpack’s watch command and your SSG’s dev server in separate terminal windows. You have one tool building your JavaScript and CSS, and another tool building your site’s HTML. One issue with any asset pipeline, though, comes up when using it alongside a static site generator. This makes Gulp a less attractive option for packaging your JavaScript files. I contrasted Webpack with Gulp, a stream processor and taskrunner utility that, while it has its place, doesn’t do the sophisticated module bundling that Webpack does. This is because Webpack allows you to write modular JavaScript for the browser, and handles the dependency resolution and file bundling. Once upon a time, I told you that Webpack was an excellent tool for managing JavaScript in your web projects.
0 Comments
Leave a Reply. |