Web Workbench and your automated build process

As regular readers know, Web Workbench is a Visual Studio extension that integrates Sass, Less and CoffeeScript into the IDE, making it easy for you to edit files and have them transparently compiled into CSS or JavaScript as you go. The normal usage pattern is that you work on your (say) Less files, we translate the Less files to CSS, and you check both the Less and CSS files into source control and deploy the CSS files.

Now if you’re as fanatical about automated build processes as we are, you may be thinking, “Wait, you’re compiling the Less on a developer machine and checking the CSS output into source control? Shouldn’t you just check in the Less file and compile it on the build server, where you can lock down the configuration properly?” Well, in practice this usually turns out to be not much of an issue. But for larger teams and projects, where developers are working independently on non-independent files, it’s a valid concern. A well-disciplined merge process should take care of it; but even the best-disciplined process isn’t immune to human error.

Of course, one way of integrating compilation into your automated build process is to download the existing command line tools from the original authors. If you’re confident installing tools such as Ruby or Node.js, then this is a great approach. But we know many customers don’t want to do this: they want a single install that just takes care of it all for them.

We’re therefore pleased to announce that, as of today, Web Workbench Pro customers will be able to download a beta version of a command-line compiler from the Mindscape store. With this, you can have your build server rebuild any Sass, Less or CoffeeScript files, and re-minify CSS and JavaScript files, as part of a pre- or post-build step or through a MSBuild Exec task. Here’s how it might look (assuming you’ve added the install directory to your PATH):

wwcmd site.less /m                              // Compiles and minifies site.less
wwcmd luminous.scss /debuginfo /style:compact   // Invokes compiler-specific options
wwcmd main.js /m /i:events.js,utils.js          // Import files during minification

At the moment, the command line compiler compiles individual files, so you’ll need to make sure you update your build script as you add new files or change compilation or minification settings. We welcome feedback on this; for example we’d like to understand how valuable it would be to have the command line tool process entire projects using the interactive Web Workbench settings (we know it would be nice, but it’s not a trivial feature for us to implement).

So grab the beta from the store, take it for a spin, and let us know in the forums whether you run into any bugs or have any feature requests. Happy coding!

Tagged as Web Workbench

2 Responses to “Web Workbench and your automated build process”

  • Great feature!
    Thanks a lot for this new tool!

  • I’ll try to use workbench comman line with compass but I have a problem to import the compass libraries :

    I use in my base.scss :
    @import “compass/utilities/sprites”;

    I try this in command line :
    wwcmd base.scss

    And I have this error message :
    Syntax error: File to import not found or unreadable:

    How can I use @import in a scss file with the command line workbench

  • Leave a Reply

Archives

Join our mailer

You should join our newsletter! Sent monthly:

Back to Top