Skip to content

Conversation

@prantlf
Copy link

@prantlf prantlf commented Jan 3, 2022

This package pins the version of r.js to 2.2.0, which is not the latest one. And the official r.js is not developed any more. There are modified version of the optimizer available, but using them with grunt-contrib-requirejs is not possible, without forking it too. This MR suggests a change, which allows using any optimizer as a parameter with no effort to do in grunt-contrib-requirejs:

requirejs: {
  compile: {
    options: {
      requirejs: require('@my/requirejs'),
      baseUrl: 'path/to/base',
      mainConfigFile: 'path/to/config.js',
      include: [ 'src/main.js' ],
      out: 'path/to/optimized.js'
    }
  }
}
  • Add a new option requirejs to allow passing a custom build of r.js to the task.
  • Add a new option force to suppress failures and lets other tasks continue if the current one fails.
  • Add a new option verbose to enable verbose logging of r.js in addition to the command line option.

…enabling verbose logging

* Add a new option `requirejs` to allow passing a custom build of `r.js` to the task.
* Add a new option `force` to suppress failures and lets other tasks continue if the current one failes.
* Add a new option `verbose` to enable verbose logging of `r.js` in addition to the command line option.
@vladikoff vladikoff self-assigned this Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants