How to use the grunt.config function in grunt

To help you get started, we’ve selected a few grunt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular-ui / ui-grid / lib / grunt / utils.js View on Github external
updateConfig: function() {
    grunt.config('customLaunchers', util.customLaunchers());
    util.createKarmangularConfig()
    util.createSauceConfig();

    if (process.env.TRAVIS) {
      // Update the config for the gh-pages task for it pushes changes as the user: Grud
      grunt.config('gh-pages.ui-grid-site.options.user', {
        name: 'grud',
        email: 'nggridteam@gmail.com'
      });

      grunt.config('gh-pages.ui-grid-site.options.repo', 'https://' + process.env.GITHUB_NAME + ':' + process.env.GITHUB_PASS + '@github.com/angular-ui/ui-grid.info.git');

      grunt.config('gh-pages.bower.options.user', {
        name: 'grud',
        email: 'nggridteam@gmail.com'
      });
github angular-ui / ui-grid / lib / grunt / utils.js View on Github external
updateConfig: function() {
    grunt.config('customLaunchers', util.customLaunchers());
    util.createKarmangularConfig()
    util.createSauceConfig();

    if (process.env.TRAVIS) {
      // Update the config for the gh-pages task for it pushes changes as the user: Grud
      grunt.config('gh-pages.ui-grid-site.options.user', {
        name: 'grud',
        email: 'nggridteam@gmail.com'
      });

      grunt.config('gh-pages.ui-grid-site.options.repo', 'https://' + process.env.GITHUB_NAME + ':' + process.env.GITHUB_PASS + '@github.com/angular-ui/ui-grid.info.git');

      grunt.config('gh-pages.bower.options.user', {
        name: 'grud',
        email: 'nggridteam@gmail.com'
      });

      grunt.config('gh-pages.bower.options.repo', 'https://' + process.env.GITHUB_NAME + ':' + process.env.GITHUB_PASS + '@github.com/angular-ui/bower-ui-grid.git');
    }
  },
github walmartlabs / generator-thorax / app / templates / seed / tasks / options / copy.js View on Github external
var grunt = require('grunt');

module.exports = {
  requirejs: {
    files: [
      {
        src: 'bower_components/requirejs/require.js',
        dest: grunt.config('paths.output.js') + '/require.js'
      }
    ]
  },
  tmpDist: { // copy files to tmpDist/ prior to creating a production build
    files: [
      { // copy js to tmpDist/ before compiling
        expand: true,
        cwd: grunt.config('paths.js'),
        src: ['**', '!templates/**'],
        dest: grunt.config('paths.tmpDist')
      },
      { // copy almond to tmpDist/ before compiling
        src: 'bower_components/almond/almond.js',
        dest: grunt.config('paths.tmpDist') + '/almond.js'
      }
    ]
  },
  styles: {
    files: [
      {
        expand: true,
        cwd: grunt.config('paths.css'),
        src: '*.css',
        dest: grunt.config('paths.output.css')
github walmartlabs / generator-thorax / app / templates / seed / tasks / options / copy.js View on Github external
src: ['**', '!templates/**'],
        dest: grunt.config('paths.tmpDist')
      },
      { // copy almond to tmpDist/ before compiling
        src: 'bower_components/almond/almond.js',
        dest: grunt.config('paths.tmpDist') + '/almond.js'
      }
    ]
  },
  styles: {
    files: [
      {
        expand: true,
        cwd: grunt.config('paths.css'),
        src: '*.css',
        dest: grunt.config('paths.output.css')
      }
    ]
  },
  bootstrap: {
    files: [
      {
        src: ['bower_components/bootstrap/dist/js/bootstrap.js'],
        dest: grunt.config('paths.output.js') + '/bootstrap.js'
      },
      {
        src: ['bower_components/bootstrap/dist/css/bootstrap.css'],
        dest: grunt.config('paths.output.css') + '/bootstrap.css'
      }
      // TODO: add font support for bootstrap.
      // - Reference fonts in public/index.html
      // - Copy fonts to dist/fonts during dist build
github walmartlabs / generator-thorax / app / templates / seed / tasks / options / copy.js View on Github external
expand: true,
        cwd: grunt.config('paths.js'),
        src: ['**', '!templates/**'],
        dest: grunt.config('paths.tmpDist')
      },
      { // copy almond to tmpDist/ before compiling
        src: 'bower_components/almond/almond.js',
        dest: grunt.config('paths.tmpDist') + '/almond.js'
      }
    ]
  },
  styles: {
    files: [
      {
        expand: true,
        cwd: grunt.config('paths.css'),
        src: '*.css',
        dest: grunt.config('paths.output.css')
      }
    ]
  },
  bootstrap: {
    files: [
      {
        src: ['bower_components/bootstrap/dist/js/bootstrap.js'],
        dest: grunt.config('paths.output.js') + '/bootstrap.js'
      },
      {
        src: ['bower_components/bootstrap/dist/css/bootstrap.css'],
        dest: grunt.config('paths.output.css') + '/bootstrap.css'
      }
      // TODO: add font support for bootstrap.
github yeoman / grunt-usemin / test / test-usemin.js View on Github external
grunt.file.copy(path.join(__dirname, 'fixtures/usemin.html'), 'index.html');
    grunt.task.run('useminPrepare');
    grunt.task.start();

    var concat = grunt.config('concat');

    assert.ok(concat);
    assert.ok(concat.generated.files);
    assert.equal(concat.generated.files.length, 2);

    assert.equal(concat.generated.files[1].dest, path.normalize('.tmp/concat/scripts/plugins.js'));
    assert.equal(concat.generated.files[1].src.length, 13);
    assert.equal(concat.generated.files[0].dest, path.normalize('.tmp/concat/styles/main.min.css'));
    assert.equal(concat.generated.files[0].src.length, 1);

    var uglify = grunt.config('uglify');

    assert.equal(uglify.generated.files[0].dest, path.normalize('dist/scripts/plugins.js'));
    assert.deepEqual(uglify.generated.files[0].src, [path.normalize('.tmp/concat/scripts/plugins.js')]);
  });
github walmartlabs / generator-thorax / app / templates / seed / tasks / options / clean.js View on Github external
var grunt = require('grunt');

module.exports = {
  scripts: [
    grunt.config('paths.output.js')
  ],
  styles: [
    grunt.config('paths.output.css')
  ],
  production: [
    grunt.config('paths.tmpDist'),
    grunt.config('paths.dist') + '/*',
    '!' + grunt.config('paths.dist') + '/index.html'
  ]
};
github walmartlabs / generator-thorax / app / templates / seed / tasks / options / clean.js View on Github external
var grunt = require('grunt');

module.exports = {
  scripts: [
    grunt.config('paths.output.js')
  ],
  styles: [
    grunt.config('paths.output.css')
  ],
  production: [
    grunt.config('paths.tmpDist'),
    grunt.config('paths.dist') + '/*',
    '!' + grunt.config('paths.dist') + '/index.html'
  ]
};
github walmartlabs / generator-thorax / app / templates / seed / tasks / options / connect.js View on Github external
function devMiddlewares(connect, options) {
  return [
    require('connect-livereload')({port: grunt.config('settings.liveReloadPort')}),
    connect().use(server)
  ];
}
github walmartlabs / generator-thorax / app / templates / seed / tasks / options / clean.js View on Github external
var grunt = require('grunt');

module.exports = {
  scripts: [
    grunt.config('paths.output.js')
  ],
  styles: [
    grunt.config('paths.output.css')
  ],
  production: [
    grunt.config('paths.tmpDist'),
    grunt.config('paths.dist') + '/*',
    '!' + grunt.config('paths.dist') + '/index.html'
  ]
};