yeoman / grunt-bower-requirejs

[DEPRECATED] Grunt task - Automagically wire-up installed Bower components into your RequireJS config
198 stars 24 forks source link

Config file not created #35

Open pcfreak30 opened 9 years ago

pcfreak30 commented 9 years ago

Using the following code a config file is not made, yet the cli version DOES write it.

grunt.config.set('bowerRequirejs',{
    dist: {
      target: {
        rjsConfig: './assets/config/requirejs.js',
        options: {
          'exclude-dev': true
        }
      }
    },
    dev: {
      target: {
        rjsConfig: './assets/config/requirejs.js'
      }
    }
  });
rakannimer commented 9 years ago

Same thing happened to me. I deleted the existing file and ran the script again and it worked. It doesn't overwrite existing files. Added a task to delete the config file before compiling to make it work.

simon-lifelike commented 9 years ago

You have every target wrapped in an extra target object.

grunt.config.set('bowerRequirejs', {
  dist: {
    rjsConfig: './assets/config/requirejs.js',
    options: {
      'exclude-dev': true
    }
  },
  dev: {
    rjsConfig: './assets/config/requirejs.js'
  }
});