I am quite new with GruntJS and I wonder if it is possible to have a task that loads some RequireJs modules to process them and write the result within a JS file.
I describe my scenario:
I have a RequireJs based project with many files.
I would…
I have a Javascript application spanning multiple files using RequireJS, which I want to concatenate into one for the production environment.
I've been looking at grunt-contrib-requirejs but the instructions for setting up the configuration in…
what is going on? i tried adding this below in Gruntfile.js, but it still doesn't work.
module.exports =function(grunt){
require('time-grunt')(grunt);
require('load-grunt-config')(grunt, {
jitGrunt: true
});
};
I am trying to create a grunt task to build a javascript project using requirejs with closure compiler as the optimizer. I am using the grunt-contrib-requirejs plugin.
https://www.npmjs.org/package/grunt-contrib-requirejs
Although I haven't…
In my project directory, I installed Grunt by using the following command:
npm install grunt
...after that I did Grunt server in my project directory but it gives me command not found error.
Raj$ grunt server
-bash: grunt: command not…
I want to implement RequireJS in a very large single page application that uses CoffeeScript and Grunt. We have separate files for different modules (services, Backbone, etc.).
Implementing RequireJS is very straightforward - my main problem is with…
Presently using grunt-contrib-requirejs plugin which has got
optimize : 'uglify2'
but no concat files to a single file option is found in that plugin. how to add or any example. I need all js files to be concatenated and uglified to a single file…
I use r.js to cobble together all the js code in my SPA into 1 file. I use grunt's `grunt-contrib-requirejs' task for this, with the following:
requirejs: {
compile: {
options: {
name: 'app',
out: 'build/js/app.js',
baseUrl:…
TypeError: moment is not a function at Object.commonFunctionsFactory.formatDate
However if i minify my momentjs online using jscompress the resulted file working fine for me.
Grunt Task
build_momentjs_file: {
options: {
baseUrl:…
I am optimizing my Durandal build with the following optimizer settings:
options: {
name: '../lib/require/almond-custom',
baseUrl: requireConfig.baseUrl,
mainPath: 'app/main',
paths: mixIn({ }, requireConfig.paths, { 'almond':…
I have src of my application. I use AngularJS. I use RequireJS as module loader. I use Grunt as task runner. When I run application using src: everything is good. When I build application with Grunt, application is not working. I got no errors in…
I'm trying to use Generator-Backbone generator for Yeoman with RequireJS.
I don't need the lazy-loading of RequireJS, I just am using it for dependency management and organization. It's fine if it's used during development, but when I run…
In my AngularJS app, I am trying to create a build using grunt and following plug-ins.
grunt-contrib-clean
grunt-contrib-requirejs
grunt-angular-templates
grunt-angular-copy
I am able to successfully create the main.js file with all the…
I am getting an error and I don't know what to make of it.
Grunt works just fine on my machine, but it is failing on my server. They're both the same OS. And I am thinking that my package.json might have installed a later version of something on my…
I'm having a few issues with r.js I'm hoping someone can shed some light on.
Consider the following shim:
shim: {
plugin: ['jquery'],
plugin2: ['jquery', 'plugin']
}
And the following arbitrary plugins (note: they don't need to be jQuery…