Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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'
});
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');
}
},
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')
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
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.
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')]);
});
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'
]
};
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'
]
};
function devMiddlewares(connect, options) {
return [
require('connect-livereload')({port: grunt.config('settings.liveReloadPort')}),
connect().use(server)
];
}
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'
]
};