Last active
December 16, 2015 04:49
-
-
Save jblanche/5380078 to your computer and use it in GitHub Desktop.
Gruntfile or requirejs bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running "requirejs:dist" (requirejs) task | |
>> Error: Error: The "out" and "dir" options are incompatible. Use "out" if you are targeting a single file for for optimization, and "dir" if you want the appDir or baseUrl directories optimized. | |
>> at Function.build.createConfig (xxx/node_modules/grunt-requirejs/node_modules/requirejs/bin/r.js:23730:19) | |
Warning: Task "requirejs:dist" failed. Use --force to continue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requirejs: { | |
dist: { | |
// Options: https://github.com/jrburke/r.js/blob/master/build/example.build.js | |
options: { | |
paths: { | |
backbone : 'vendor/backbone-amd/backbone', | |
bootstrap: 'vendor/bootstrap', | |
underscore : 'vendor/underscore-amd/underscore', | |
jquery: 'vendor/jquery/jquery', | |
marionette : 'vendor/marionette/lib/core/amd/backbone.marionette', | |
'backbone.wreqr': 'vendor/backbone.wreqr/lib/amd/backbone.wreqr', | |
'backbone.babysitter': 'vendor/backbone.babysitter/lib/amd/backbone.babysitter', | |
'backbone.routefilter': 'vendor/backbone.routefilter/src/backbone.routefilter', | |
'hbs': 'vendor/require-handlebars-plugin/hbs', | |
'i18nprecompile': 'vendor/require-handlebars-plugin/hbs/i18nprecompile', | |
'json2': 'vendor/require-handlebars-plugin/hbs/json2', | |
'handlebars': 'vendor/require-handlebars-plugin/handlebars' | |
}, | |
shim: { | |
jquery : { | |
exports : 'jQuery' | |
}, | |
underscore : { | |
exports : '_' | |
}, | |
bootstrap: { | |
deps: ['jquery'], | |
exports: 'jquery' | |
}, | |
backbone : { | |
deps : ['jquery', 'underscore'], | |
exports : 'Backbone' | |
}, | |
marionette: { | |
deps: ['jquery', 'underscore', 'backbone', 'backbone.wreqr', 'backbone.babysitter'], | |
exports: 'Marionette' | |
} | |
}, | |
locale : 'fr_fr', | |
hbs: { | |
helperDirectory: './helpers/', | |
i18nDirectory: './i18n/' | |
}, | |
dir: '.', | |
modules: [ | |
//First set up the common build layer. | |
{ | |
//module names are relative to baseUrl | |
name: './common', | |
//List common dependencies here. Only need to list | |
//top level dependencies, "include" will find | |
//nested dependencies. | |
include: ['marionette', | |
'app' | |
] | |
}, | |
//Now set up a build layer for each page, but exclude | |
//the common one. "exclude" will exclude nested | |
//the nested, built dependencies from "common". Any | |
//"exclude" that includes built modules should be | |
//listed before the build layer that wants to exclude it. | |
//"include" the appropriate "app/main*" module since by default | |
//it will not get added to the build since it is loaded by a nested | |
//require in the page*.js files. | |
{ | |
//module names are relative to baseUrl/paths config | |
name: './login', | |
include: ['login/loginapp'], | |
exclude: ['./common'] | |
} | |
] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration is now: | |
cssmin: | |
{ dist: | |
{ files: | |
{ '<%= yeoman.dist %>/styles/main.css': | |
[ '.tmp/styles/{,*/}*.css', | |
'app/styles/{,*/}*.css' ] } } } | |
concat: | |
{ 'dist/scripts/vendor/modernizr.js': [ 'app/scripts/vendor/modernizr/modernizr.js' ], | |
'dist/scripts/main.js': [ 'dist/scripts/main.js' ] } | |
uglify: | |
{ 'dist/scripts/vendor/modernizr.js': 'dist/scripts/vendor/modernizr.js', | |
'dist/scripts/main.js': 'dist/scripts/main.js', | |
'dist/scripts/vendor/requirejs/require.js': 'app/scripts/vendor/requirejs/require.js' } | |
requirejs: | |
{ dist: | |
{ options: | |
{ paths: | |
{ backbone: 'vendor/backbone-amd/backbone', | |
bootstrap: 'vendor/bootstrap', | |
underscore: 'vendor/underscore-amd/underscore', | |
jquery: 'vendor/jquery/jquery', | |
marionette: 'vendor/marionette/lib/core/amd/backbone.marionette', | |
'backbone.wreqr': 'vendor/backbone.wreqr/lib/amd/backbone.wreqr', | |
'backbone.babysitter': 'vendor/backbone.babysitter/lib/amd/backbone.babysitter', | |
'backbone.routefilter': 'vendor/backbone.routefilter/src/backbone.routefilter', | |
hbs: 'vendor/require-handlebars-plugin/hbs', | |
i18nprecompile: 'vendor/require-handlebars-plugin/hbs/i18nprecompile', | |
json2: 'vendor/require-handlebars-plugin/hbs/json2', | |
handlebars: 'vendor/require-handlebars-plugin/handlebars' }, | |
shim: | |
{ jquery: { exports: 'jQuery' }, | |
underscore: { exports: '_' }, | |
bootstrap: { deps: [Object], exports: 'jquery' }, | |
backbone: { deps: [Object], exports: 'Backbone' }, | |
marionette: { deps: [Object], exports: 'Marionette' } }, | |
locale: 'fr_fr', | |
hbs: | |
{ helperDirectory: './helpers/', | |
i18nDirectory: './i18n/' }, | |
dir: '.', | |
modules: | |
[ { name: './common', include: [Object] }, | |
{ name: './login', | |
include: [Object], | |
exclude: [Object] } ], | |
name: 'main', | |
out: 'dist/scripts/main.js', | |
baseUrl: 'app/scripts', | |
mainConfigFile: 'app/scripts/main.js' } } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment