Skip to content

Instantly share code, notes, and snippets.

@fivetanley
Created June 4, 2012 21:57
Show Gist options
  • Save fivetanley/2871074 to your computer and use it in GitHub Desktop.
Save fivetanley/2871074 to your computer and use it in GitHub Desktop.
var rjs = require( 'requirejs' ),
config = {
baseUrl: __dirname + '/lib/',
nodeRequire: require,
name: 'main',
out: __dirname + '/bin/main-built.js'
},
fs = require( 'fs' );
rjs.optimize( config, function( buildResponses ) {
var contents = fs.readFileSync( config.out );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment