Housekeep your shimney with grunt.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

shimney-sweeper Build Status

Housekeep your shimney with grunt.

install with npm

If you haven't used grunt before, be sure to check out the Getting Started guide.

From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:

npm install grunt-shimney-sweeper --save-dev

Once that's done, add this line to your project's Gruntfile:


If the plugin has been installed correctly, running grunt --help at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a devDependency, which ensures that it will be installed whenever the npm install command is run.


grunt sweepout

reads all your installed shimney packages exports them and writes a config for them.

grunt sweep-config

reads all your installed shimney packages from npm and writes your config to www/js/config.js.

grunt merge-configs

merges serval requirejs configuration together, into a new config file. The config file might be a module as a template and the merge of all configs can be adjusted


  "sweep-config": {
    www: {
      options: {
        configFile: "www/js/config.js",
        nodeModulesUrl: "../../" // with trailing slash, without node_modules/ appended

  sweepout: {
    build: {
      options: {
        //configFile: "build/js/config.js", // where to write the config to. Uses ${dir}/config.js as default
        // packageRoot: "tmp" // change this if your node_modules directory is not sibling to the gruntfile root
        //dir: "build/js" or specifiy the output-dir on commandline with --dir
        //baseUrl: "lib/" // will prefix all packages in the config with this path

  "merge-configs": {
    rjsboot: {
      options: {
        targetFile: 'build/js/boot.js',

        configFiles: [

        modify: function(mergedConfig) { // can return or modify the mergedConfig that is written
          return { paths: {'user': 'overriden'} };

        template: 'resources/config-template.js', // use this to inject the config in this file (will not be modified)

in your Gruntfile.js to configure the sweeper.

your config-template.js used in merge-configs could be like this:

var require = {


if (typeof(requirejs) === "function") {

This allows you to use the merged config before loading requirejs (recommended if you change the baseUrl) or as a data-main attribute in requirejs.


1.0.0 => 1.1.0

  • change config option into configFile

1.0.0 => 1.2.0

  • commands are now: sweepout, sweep-config, merge-configs
  • all commands are multi tasks