Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function(grunt) {
'use strict';
var gruntfile = 'Gruntfile.js';
var sources = ['src/<%= pkg.name %>.js'];
md.filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) 2013 Deux Huit Huit, Rik Lomas.\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> (<%= pkg.author.url %>);\n' +
'* License <%= pkg.license %> http://deuxhuithuit.mit-license.org */'
},
concat: {
options: {
process: true,
banner: '<%= meta.banner %>\n'
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var yeomanConfig = {
app: 'app',
dist: 'dist'
};
grunt.initConfig({
yeoman: yeomanConfig,
watch: {
coffee: {
files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
tasks: ['coffee:dist']
},
coffeeTest: {
files: ['test/spec/{,*/}*.coffee'],
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var yeomanConfig = {
app: 'app',
dist: 'dist'
};
// try {
// yeomanConfig.app = require('./bower.json').appPath || yeomanConfig.app;
// } catch (e) {}
grunt.initConfig({
yeoman: yeomanConfig,
watch: {
coffee: {
files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
var pkg = grunt.file.readJSON('package.json');
var banner =
grunt.initConfig({
pkg: pkg,
banner: '/**'+
'* <%= pkg.description %>\n'+
'* @author <%= pkg.author %>\n'+
'* @version v<%= pkg.version %>\n'+
'* @link <%= pkg.repository.url %>\n' +
'* @license <%= pkg.license %>\n'+
'*/',
bump: {
options: {
files: ['package.json', 'bower.json'],
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var bastionConfig = {
src: 'app/assets/javascripts/bastion',
dist: 'dist'
};
try {
bastionConfig.src = require('./bower.json').appPath || bastionConfig.src;
} catch (e) {}
grunt.initConfig({
bastion: bastionConfig,
bower: {
update: {
options: {
}
}
});
grunt.event.on('watch', function(action, filepath) {
console.log(action + ' - ' + filepath);
});
grunt.registerTask('open', function () {
var url = 'http://localhost:3003';
grunt.log.writeln('demo running at: ' + url);
require('open')(url);
});
var plugins = require('matchdep').filterDev('grunt-*');
plugins.forEach(grunt.loadNpmTasks);
grunt.registerTask('default', []);
grunt.registerTask('demo', ['http-server:demo', 'open', 'watch:ngTemplates']);
grunt.event.once('http-server.demo.listening', function(host, port) {
});
};
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
options : {
livereload: true
},
source: {
files: [
'src/*.js',
'src/*/*.js',
'Gruntfile.js'
],
tasks: [ 'build:js' ]
}
module.exports = function(grunt) {
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
grunt.initConfig({
temp: ".tmp",
bump: {
options: {
files: ["package.json"],
commit: true,
commitMessage: "Release v%VERSION%",
commitFiles: ["-a"],
createTag: true,
tagName: "v%VERSION%",
tagMessage: "Version %VERSION%",
push: true,
pushTo: "origin",
gitDescribeOptions: "--tags --always --abbrev=1 --dirty=-d"
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'nice-package': {
all: {
options: {}
}
},
filenames: {
options: {
valid: 'dashes'
},
src: 'src/**/*.js'
}
});
var plugins = require('matchdep').filterDev('grunt-*');
plugins.forEach(grunt.loadNpmTasks);
grunt.registerTask('default', ['nice-package', 'filenames']);
};
output.push.apply(output, f.src.map(grunt.file.read));
output.push(grunt.template.process(
'window.<%= namespace %> = requireModule("<%= barename %>");', {
data: {
namespace: opts.namespace,
barename: opts.barename
}
}));
output.push('})(window);');
grunt.file.write(f.dest, grunt.template.process(output.join("\n")));
});
});
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.loadTasks('tasks');
grunt.registerTask('default', "Build (in debug mode) & test your application.", ['build:debug', 'test']);
grunt.registerTask('build', [
'lock',
'clean',
'copy:prepare',
'transpile',
'jshint',
'copy:stage',
'emberTemplates',
'stylus',
'emblem',
'concat',
'browser',
'unlock' ]);