Questions tagged [grunt-contrib-requirejs]

Optimize RequireJS projects using r.js.

Grunt task to optimize RequireJS projects using r.js.

80 questions
14
votes
4 answers

grunt requirejs 'define is undefined'

I'm trying to optimize RequireJS using GruntJS, using the grunt-contrib-requirejs plugin. The problem is my code works fine before optimizing it, and then after optimizing it, on the console it says Uncaught ReferenceError: define is not…
Otskimanot Sqilal
  • 2,332
  • 4
  • 21
  • 25
11
votes
1 answer

Tell RequireJS to not minify a file

How can I use grunt-contrib-requirejs config OR even r.js Config to not minify specific files. I can disable minification for all files with optimize: 'none' option. But I don't know how to disable it for a single file. options: { …
basarat
  • 261,912
  • 58
  • 460
  • 511
7
votes
1 answer

grunt requirejs ignores paths from my mainConfigFile

Project Intro My project is a single page storefront. The project has multiple modules, and each module contains a set of controller.js, view.js and model.js files, as well as a template.html file. And uses requirejs to manage dependencies. Problem…
Anna Morning
  • 522
  • 1
  • 5
  • 18
6
votes
1 answer

Grunt require fails to create multiple modules as expected

I have structure like: app scripts libs jquery.js bootstrap.js moment.js app.js vendor.js common.js app.config.js main.js #require config Note vendor.js is just a file that includes all files under libs.…
dchhetri
  • 6,926
  • 4
  • 43
  • 56
6
votes
3 answers

Excluding file from optimizing in Durandal build

I'm using Grunt to build the Durandal starter kit pro package. It all works fine, except for one tiny detail. I would like to exclude one file (app-config below) from the optimizer and keep it as a non minified file when my build is done. Based on…
Johan
  • 35,120
  • 54
  • 178
  • 293
5
votes
1 answer

requirejs not loading the object properly

I am configuring angularjs project dependecies using requirejs following are the…
user4235401
5
votes
2 answers

Building Durandal with Grunt (R.js + Text)

I would like to use Grunt to build a Durandal project, because Weyland remains completely undocumented and isn't as standard as Grunt. To do this, the grunt task needs to pull in all the js and html files during optimization, but I am unable to get…
Kyeotic
  • 19,697
  • 10
  • 71
  • 128
5
votes
1 answer

Shim from grunt-contrib-requirejs not wrapping library

I am using requirejs and configuring my product artifacts, thus combining my libraries and setting up module dependencies between them to get the loading sequence appropriate using the grunt task for requirejs. I have no problem using runtime module…
4
votes
1 answer

grunt template jasmine istanbul is not generating coverage report

Im using grunt-template-jasmine-istanbul and grunt-template-jasmine-requirejs. When I run test coverage module, all my test cases are running successfully but no coverage is generated. jasmine: { coverage: { src: [...], …
4
votes
1 answer

Can not load Ace.js editor mode and themes (namespaces project & AMD require.js & grunt

We have a large javascript application that is entirely namespaced. We use require.js to load everything (require lives on the namespace) We then use grunt to compile the 100+/- js files, including libraries into one minified file. I am able to…
4
votes
1 answer

RequireJS Optimizer from mainConfigFile not working

I am using grunt-requirejs and my app structure looks like this: site/ dev/ index.html config.coffee app.coffee etc. srv_dev/ index.html config.js app.js etc. dist/ node_modules/ Gruntfile.coffee When I run…
dezman
  • 18,087
  • 10
  • 53
  • 91
4
votes
2 answers

requirejs optimizer - need help optimizing our application

We have a large scale javascript application that we are trying to concatenate and minify using grunt-contrib-requirejs. We use the Aura framework. We use bower to pull in dependencies from other repositories into our main application. Here is our…
4
votes
2 answers

Trying to use grunt-contrib-requirejs to minify all JS to one file

I have the following directory structure (relevant bits only): app - build - script.js - js - lib - require.js - jquery-1.10.2.js - app.js - index.html Gruntfile.js Gruntfile.js contains the following: module.exports =…
callumacrae
  • 8,185
  • 8
  • 32
  • 49
3
votes
1 answer

'define' is not defined error on RequireJS & Webapp Yo generator

I have struggled a few days to figure this out,, but finally I need your help today. my repo: https://github.com/seoyoochan/bitsnut-web what I want to achieve: - Load and optimize r.js - Write bower tasks for RequireJS and r.js :    tasks are: …
2
votes
1 answer

Using React-dom with RequireJS in a minified file

I am trying to using React + ReactDOM through RequireJS in a minified file which acts as an standalone library. I have arrived at the point where I am able to use React (Bundled in the minified file) but when trying to use ReactDOM everything…
1
2 3 4 5 6