Skip to content

Instantly share code, notes, and snippets.

@chrisfinch
Created August 28, 2013 15:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisfinch/6367108 to your computer and use it in GitHub Desktop.
Save chrisfinch/6367108 to your computer and use it in GitHub Desktop.
Gruntfile require.js optimisation config
// r.js concatenation and minification of javascript
requirejs: {
compile: {
options: {
name: "almond",
baseUrl: "lib/js/",
include: ['main'],
exclude: ['jquery'],
mainConfigFile: "lib/js/main.js",
out: "build/js/peaks.min.js",
paths: {
"waveform-data": "../../bower_components/waveform-data/dist/waveform-data.all",
"EventEmitter": "../../bower_components/eventEmitter/EventEmitter",
"jquery": "../../bower_components/jquery/jquery",
"m": "waveform_viewer"
},
shim: {
"waveform-data": {
exports: "WaveformData"
}
},
wrap: { // https://github.com/jrburke/almond#exporting-a-public-api
startFile: 'lib/js/frag/start.frag',
endFile: 'lib/js/frag/end.frag'
}
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment