So Compute had its first bug today, and its first bugfix. I have been testing Compute extensively in node, manually as well as with mocha. However, while creating a demo page, I realised Compute was not grabbing the knockout object. This means it wasn’t using ko observables at all! And when Compute has been preaching how it works well with knockout. How embarrassing.
Well, the latest release (0.0.7) fixes this. There is a smoke test html page in the test folder, which I will be using to test stuff manually, for now. I’m going to try gulp-mocha-phantomjs to automate this.
- knockout compatible reactive programming library
- lets you define relationships between observables, and react to observable value changes
- use this when you don’t just want to update your dom, but leverage observables for your app logic
- Fully open source: https://github.com/akshat1/compute. MIT licensed.
- Use with bower: bower install compute –save
- Use on the server with npm: npm install simian-compute
- *npm module temporarily called simian-compute because the name compute is in use by an empty package. I’ve mailed the author if they would like to vacate the package name.
Continue reading Compute, a reactive programming library for the browser, and the server
And if you clone the repo now we will give you bower for free!
Here’s the repo https://github.com/akshat1/WebFEBoilerPlate. To use it, clone the repo to your disk, then delete the .git folder by running
$rm -rf .git
Then, you can add this to your own repo and use it as you wish. The folder names are self-explanatory, all the coffee files will get concatenated into a single app.js file. This can of course be changed in gulpfile.js.
The (slightly) Longer Version
Bower for managing front-end dependencies. The boilerplate only uses lodash and knockout, but you can get more by running
$ bower install --save. This is way better than managing dependencies ourself, but if so desired, one can create a copy libs task to manually copy js libraries from a lib folder using pipe, and add it to the lib sequence task.
HAML, because HTML has way too many angled brackets and as a wise woman once said “ain’t nobody got time for that”.
SASS, because well, it is syntactically awesome. Of course our gulpfile uses a bunch of gulp-plugins. These are listed in package.json. Simply run
$ npm install to install the required plugins.
One day this space will have some content. But don’t hold your breath.