Questions tagged [grunt-requirejs]

9 questions
4
votes
1 answer

How to use yeoman, grunt, usemin 2 and requirejs?

I'm trying to wrap my head around using Grunt, usemin 2, requirejs, and uglify. What I'm observing in my builds is that requirejs is not properly including my dependencies into my single concatenated build file. When I run index.html out of /dist, I…
hybrid9
  • 1,919
  • 4
  • 19
  • 22
2
votes
0 answers

How to add amd module(requirejs) as grunt-template-jasmine-requirejs helpers

I want to add a javascript file(which is a requirejs amd module) in "helpers" in grunt-template-jasmine-requirejs configuration. Im getting Uncaught Error: mismatch: Mismatched anonymous define() module. How to solve this problem. Thanks in advance.…
2
votes
2 answers

How do I use Closure Compiler with grunt-requirejs?

This is from my Gruntfile: requirejs: { compile: { options: { almond: true, optimize: 'closure', baseUrl: '<%= cfg.src %>/scripts', mainConfigFile: '<%= cfg.src %>/scripts/config.js', out: '<%= cfg.staticDist…
Dan Abramov
  • 241,321
  • 75
  • 389
  • 492
1
vote
2 answers

How can I use require js files after concatenating and minifying

I am using requirejs in my project and each module has a js file using require calls to make use of libraries/components. Following is sample code :- require(["modernizr", "jquery", "bootstrap", "handlebars", "bootstrap-table", ],…
Stacy J
  • 2,463
  • 11
  • 47
  • 83
1
vote
0 answers

Renaming the optimized files in requirejs folder level optimization

I'm using requirejs with Grunt in my project. I could able to successfully perform the folder level optimization through grunt-requirejs tool as below. requirejs : { std: { options: { mainConfigFile: 'src/js/main.js', …
VJAI
  • 29,899
  • 20
  • 93
  • 155
0
votes
1 answer

yeoman, grunt-requirejs site does not work after build

After i runt build of grunt task, and i run my site with localhost but it do not work. It seem grunt-requirejs not work correctly as i expect, it does not include dependencies to script file. Could anyone look i my files and show me my issues with…
0
votes
1 answer

grunt requirejs multitask and multiple files

I'm using the following method to optimize multiple modules (optimizing multiple) and everything works fine when I am not using the multitask configuration. This works: 'requirejs': require('./build_config/requirejs.js')(grunt, config) This…
Rob Allen
  • 2,781
  • 2
  • 28
  • 48
0
votes
1 answer

Error: Missing either an "out" or "dir" config value with r.js / grunt-requirejs

Below is my build configuration file: build.js { appDir: '../src', baseUrl: 'libs', paths: { app: 'js' }, dir: '../prod', out:"../js/main-built.js", fileExclusionRegExp: /.less$/, optimize: "uglify2", …
Ashwin Hegde
  • 1,675
  • 4
  • 19
  • 45
0
votes
1 answer

Why I have to use 'include' again in grunt-requirejs to optimize into a single js file?

I'm trying to use grunt-requirejs to optimize my requirejs project into a single production js file. However, I'm not sure if my Gruntfile.js is correct because I have to specify which model to include during the optimization again, which seems…
toy
  • 10,405
  • 19
  • 76
  • 161