Skip to content

Instantly share code, notes, and snippets.

@thomasboyt
Created January 31, 2014 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasboyt/8740561 to your computer and use it in GitHub Desktop.
Save thomasboyt/8740561 to your computer and use it in GitHub Desktop.
requirejs sadness
var _ = require('underscore');
var baseConfig = {
baseUrl: 'public/',
name: 'js/lib/requirejs/require',
mainConfigFile: 'public/js/main.js',
wrap: true,
// Configuration for jsx plugin to work
useStrict: true,
onBuildWrite: function (moduleName, path, singleContents) {
return singleContents.replace(/jsx!/g, '');
},
exclude: ['jsx']
};
module.exports = {
one: {
options: _.extend({
include: ['js/one'],
insertRequire: ['js/one'],
out: 'tmp/public/js/one.min.js',
}, baseConfig)
},
two: {
options: _.extend({
include: ['js/two'],
insertRequire: ['js/two'],
out: 'tmp/public/js/two.min.js',
}, baseConfig)
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment