Deploy Web App with Grunt Compiled Assets to Heroku

The conundrum is how do you deploy a web app to Heroku that needs to be compiled without including compiled files in your source? Maybe you have some SASS that needs to be compiled into CSS. Maybe you want to minify your JavaScript, or cache bust with some appended hash tags. In any case you want to run some tasks on your code to produce your distribution or build.

Essential Node.js Development Concepts, part1

Every project tends toward insanity, it’s your job to Keep it Sane, Stupid. This is the first in a multipart series on Node.js concepts that I consider to be essential to writing sane web apps. You already know how to Node and now it’s time to get serious about building apps. The problem you’ll run into every growing project is complexity. These concepts will help you keep things sane.

Using GulpJS, Browserify, and Watch for AngularJS Development

That’s quite a mouth full, but in a nutshell we just want to develop AngularJS and have Gulp watch our files and recompile them when they change. var gulp = require('gulp'), _ = require('lodash'), fs = require('fs'), nodemon = require('gulp-nodemon'), ini = require('ini'), config = ini.parse(fs.readFileSync('./.env', 'utf-8')), concat = require('gulp-concat'), uglify = require('gulp-uglify'), htmlMin = require('gulp-minify-html'), browserify = require('gulp-browserify'), clean = require('gulp-clean'), watch = require('gulp-watch'), ngHtml2Js = require('gulp-ng-html2js'); gulp.task('default', function(){ // Update process.

JavaScript Casting Tricks

Here I want to go through some casting tricks that can be used for better data manipulation. Booleans Build in Boolean() The easiest way is to use the builtin Boolean() method. Boolean('true'); // true Boolean(1); // true Boolean('false'); // true !!!!GOTCHA!!!!! Boolean(0); // false // Careful Boolean([]); // true Double Negative This will cast anything as either true or false, there are of course a few quirks that may not be obvious.

Some really good parts about JavaScript

Most people who only know some jQuery and little JavaScript in the browser scratch their head and wonder how this lame language can be run on a server, or better yet, how most of your front end can be run on this messed up language. JavaScript hits the nail on head Functions as first class citizens. So what does this mean? Functions can be embedded inside other functions var outer = function embedded() { var inside = function() { var deep = 'variable inside a function, inside a function'; }; } Notice how outer has a function inside it called inside, and inside the inside function is a variable deep?

Getting Titanium CurrentWindow To Work Under CommonJS

Appcelerator is a moving target, developed and changing pretty fast. The old way was using the **url: ** property of a window to open up a new screen with a javascript screen. Old and Busted var window = Ti.UI.createWindow({ url: 'screen.js' }); Another Old Way Then came the Tweetanium structure, while a solid way to set up, it’s not the route Appcelerator is recommending anymore. See my post for more information on the Tweetanium Setup