Questions tagged [grunt-contrib-requirejs]

Optimize RequireJS projects using r.js.

Grunt task to optimize RequireJS projects using r.js.

80 questions
0
votes
1 answer

Requirejs combined application window.onerror error handling

In a Backbone and requirejs 2x based application, only when the application is combined through grunt-contrib-require, window.onerror stops trapping errors. The window.onerror function id declared before and outside the Backbone application and send…
0
votes
2 answers

Concatenate modules in RequireJS

I am using RequireJS to modularize my code. The website I am using will have several distinct page categories. For each one of them I want to load general JS file with all the dependencies that exist across all page categories, jQuery being most…
Karolis Ramanauskas
  • 1,045
  • 1
  • 9
  • 14
0
votes
1 answer

grunt requirejs compile multi-mainConfigFile

I have issues with compile multi-mainConfigFile in grunt-contrib-requirejs. I don't know how to configure the gruntfile.js,although read page 'Grunt & requirejs optimizer for a multi app project'. I have thesee files . ├── index.js ├──…
0
votes
1 answer

grunt-contrib-requirejs doesn't resolve my runtime module injection

I have one problem. In my project i'm using runtime module injection. When i use require.js framework all works ok. But when i try to make solid js file with grunt-contrib-requirejs it doesn't find my injecting module. piece of my code whre i'm…
serg
  • 5
  • 1
0
votes
0 answers

How to find where a function which is declared not at top level or immediately within another function?

I have a working web app using require.js and I'm trying to have all files be minified and concatenated. I'm using grunt-contrib-requirejs to compile the whole project into a bundle.js file, like so: requirejs: { compile: { …
Shawn
  • 10,931
  • 18
  • 81
  • 126
0
votes
1 answer

Grunt build with requirejs plugins in the code

I am using the goog plugin for requirejs like this: define(['underscore', 'backbone', 'marionette', 'goog!visualization,1,packages:[geomap]'], function(_, Backbone, Marionette) { ... }); The code works fine until I build the project using…
AliBZ
  • 4,039
  • 12
  • 45
  • 67
0
votes
1 answer

Compiling with requirejs optimizer

I am trying to compile a project using requirejs optimizer and grunt (https://www.npmjs.org/package/grunt-contrib-requirejs). The output file of the compilation, is a single js file - but it still needs to be called from requirejs like so:
EternallyCurious
  • 2,345
  • 7
  • 47
  • 78
0
votes
1 answer

Adding git add to Grunt githooks plugin

I am currently working on implementing a pre-commit hook with grunt git hooks. I am new to using this plugin and it's a bit unclear if I can use this plugin to do what I initially set out to do. Currently, I have two grunt tasks triggering for…
Dev
  • 781
  • 9
  • 29
0
votes
1 answer

Using AMDclean with grunt

I am trying to build a project with requirejs and AMDClean to completely remove the need for amd in the production version. Although I am able to get the requirejs optimizer to put my files together I am not able to remove require/define from it…
EternallyCurious
  • 2,345
  • 7
  • 47
  • 78
0
votes
1 answer

Combining files using requirejs and grunt

I am trying to combine files using the grunt plugin for requirejs: https://www.npmjs.org/package/grunt-contrib-requirejs Here is the configuration: requirejs: compile: options: #appDir: './' baseUrl: "client" …
EternallyCurious
  • 2,345
  • 7
  • 47
  • 78
0
votes
1 answer

Building with Grunt and Requirejs

I am creating a grunt task for building a javascript project with requirejs using grunt-contrib-requirejs https://github.com/gruntjs/grunt-contrib-requirejs Here is the config: requirejs: compile: options: #appDir: './' …
EternallyCurious
  • 2,345
  • 7
  • 47
  • 78
0
votes
2 answers

grunt serve:dist error with Backbone jQuery Mobile RequireJS

I'm new to Grunt and the distribution process. I have a Yeoman generated app using the backbone generator, require.js and jQuery Mobile. It works fine with 'grunt serve' but when I run through the build and serve:dist, clicking on the jQuery Mobile…
0
votes
1 answer

Testing JavaScript using grunt

I have to run tests against a JavaScript file using grunt framework. Just needed any simple example to do this, the target file (/test/filename.js) has dependencies on one more file.
user1400915
  • 1,933
  • 6
  • 29
  • 55
0
votes
2 answers

dependency errors when optimising requirejs application using grunt

I'm trying to minify my requirejs application using grunt it outputs all the files minified and my main.js gets all the used scripts etc ... i run grunt from at the level where the public folder is defined but when i try to run the optimized main js…
0
votes
0 answers

Dependency traces failed/skipped by grunt-contrib-requirejs build

On build of this requirejs config using grunt-contrib-requirejs, require.config({ baseUrl : "js", shim : { 'ember' : { deps : ['handlebars', 'jquery'], exports :…