I wrote previously about Continuous Integration for JavaScript where I explained a build with Jenkins and Gradle. I’ve learned a lot since that article and thought it’s now significant enough to write more on the topic.
Documentation
When you’re writing code that other developers have to use or maintain, you ought to provide some amount of documentation. Your code is simply not self-documenting enough.
My favorite doc tool right now is jsduck developed by Sencha Labs for their Ext JS 4 docs. It basically consumes JSDoc-style comments (with some extras for namespaces, etc.) and generates beautiful documentation. Super easy to install and use:
Continue reading →
Jenkins is a CI tool that is often used for Running tests and code analysis for Java and .NET projects. There are a lot of benefits that we as a community are not taking advantage of for our web (CSS, JS, etc) code. In this article I’m going to walk you through setting up automated building and testing for a JavaScript project.
NOTE: The steps outlined are generally Linux/Mac centric, I don’t go into depth on Windows setup, but it shouldn’t be much different using Cygwin.
Why use CI?
Aside from the traditional benefits you see from your compiled code, there are some very compelling reasons:
- Automate versioning, combining, minifying, and gzipping files
- Run automated tests and get reports, keeping the codebase maintainable
- Run static analysis tools like the closure compiler or jshint
- Auto-deploy files (to S3, say) if our build passes
- Tag and other special stuff for release builds
- … that’s just JavaScript, we can also hook in Selenium tests, CSS Lint, and more
Not convinced? Tell me why in the comments.
Continue reading →
With the announcement of the closure of kenai.com, I’ve decided to move my open-source projects to GitHub.
It’s with a sad heart that we have to announce that the Kenai.com domain will be shutdown as part of the consolidation of project hosting sites now that Sun is a wholly owned subsidiary of Oracle.
This is sad because I thought Kenai had some really killer features like excellent JIRA and NetBeans integration. Nevertheless, it’s not up to me to decide.
Software is only as good as it’s community
A great project cannot thrive without people to improve and maintain it. The reason I am choosing GitHub is the number of people (especially friends) already on it. The is it’s main advantage over something like bitbucket. Git, in my opinion, has great momentum in the OSS community and is roughly equivalent to mercurial in functionality (with a few differences, obviously). Both DVCS are far superior to their non-distributed counterparts. To sum up the biggest benefit in a phrase: “Local commits FTW!”
Moving to GitHub has already paid off because my recent javascript-stacktrace project already has over 50 watchers and a couple forks.
Continue reading →