I did not see this listed, but I have a a Gruntfile.js that runs fine in CLI but will not run with this package. I get the following error:
// Load Current Environments Settings
var configuration = require('./config/environment');
/*global module:false*/
module.exports = function(grunt) {
var company_banner = '' +
'/*! Some Company\n' +
' * @author <%= pkg.author %>\n' +
' * @version <%= pkg.version %>\n' +
' * @license Unauthorized copying of this file, via any medium is strictly prohibited.\n' +
' * This file cannot be copied and/or distributed without express written consent from @author.\n' +
' * @builddate <%= grunt.template.today("yyyy/mm/dd") %>\n' +
' */\n'
var pkg = grunt.file.readJSON('package.json');
// Project configuration.
grunt.initConfig({
pkg: pkg,
pixelworker: grunt.file.copy('app/assets/javascripts/lib/PixelWorker.js', 'views/webworker.js'),
concat: {
options: {
banner: company_banner
},
guest: {
src: [
'app/assets/javascripts/lib/alertify.js',
'app/assets/javascripts/guest/GuestSocket.js',
'app/assets/javascripts/guest/GuestUI.js',
'app/assets/javascripts/guest/Guest.js',
'app/assets/javascripts/guest/GuestHelpers.js',
'app/assets/javascripts/lib/animate.js'
],
dest: 'public/javascripts/guest.js'
},
company: {
src: [
'app/assets/javascripts/host/CompanySocket.js',
'app/assets/javascripts/host/CompanyUI.js',
'app/assets/javascripts/host/CompanySessionStore.js',
'app/assets/javascripts/host/CompanyRenderingEngine.js',
'app/assets/javascripts/host/Company.js',
'app/assets/javascripts/host/CompanyHelpers.js',
'app/assets/javascripts/host/CompanyLanguage.js',
'app/assets/javascripts/lib/CanvasDiff.js'
],
dest: 'public/plugin.js'
},
lib: {
src: [
'app/assets/javascripts/lib/alertify.js',
'node_modules/html2canvas/build/html2canvas.js',
'app/assets/javascripts/lib/reqwest.js',
'app/assets/javascripts/lib/jsimagediff.js',
'app/assets/javascripts/lib/animate.js'
],
dest: 'public/javascripts/clicklibs.js'
},
proxy: {
src: [
'app/assets/lib/iframeproxy.js',
'node_modules/html2canvas/build/html2canvas.js'
],
dest: 'public/javascripts/iframeproxy.js'
}
},
sass: {
production: {
options: {
style: 'compressed'
},
files: {
'public/stylesheets/blue.css' : 'app/assets/stylesheets/blue.scss',
'public/stylesheets/green.css' : 'app/assets/stylesheets/green.scss',
'public/stylesheets/purple.css' : 'app/assets/stylesheets/purple.scss'
}
},
development: {
options: {
style: 'expanded',
lineNumbers: true
},
files: {
'public/stylesheets/blue.css' : 'app/assets/stylesheets/blue.scss',
'public/stylesheets/green.css' : 'app/assets/stylesheets/green.scss',
'public/stylesheets/purple.css' : 'app/assets/stylesheets/purple.scss'
}
}
},
jshint: {
options: {
laxcomma: true,
lastsemic: true,
browser: true
},
beforeconcat: [
'app/assets/javascripts/host/Company*.js',
'app/assets/javascripts/guest/Guest*.js'
],
afterconcat: [
'public/plugin.js',
'public/javascripts/guest.js'
]
},
uglify: {
options: {
banner: company_banner,
mangle: false
},
build: {
files: {
'public/plugin.js':'public/plugin.js',
'public/javascripts/iframeproxy.js':'public/javascripts/iframeproxy.js',
'public/javascripts/PixelWorker.js':'views/webworker.js',
'public/javascripts/clicklibs.js':'public/javascripts/clicklibs.js',
'public/javascripts/guest.js':'public/javascripts/guest.js'
}
}
},
regarde: {
css: {
files: [
'app/assets/stylesheets/*.scss',
'app/assets/stylesheets/**/*.scss'
],
tasks: [
'sass'
],
events: true
}
},
concurrent: {
development: [
'build',
'uglify',
'sass:development',
'initServer'
]
},
qettlhup: {
host: {
test: {
lang: 'rspec',
path: 'spec/host.rb'
},
json: 'spec/BrowsersHost.json'
},
guest: {
test: {
lang: 'rspec',
path: 'spec/guest.rb'
},
json: 'spec/BrowsersGuest.json'
}
},
template: {
socket: {
options: {
data: {
company_url: configuration.company.host,
company_proxy: configuration.company.proxy,
company_reverse_proxy: configuration.company.reverseProxy,
company_assets: configuration.company.assets,
company_version: (process.env.NODE_ENV == 'development') ? Date.now() : pkg.version
}
},
files: {
'public/plugin.js':'public/plugin.js'
}
}
}
});
grunt.loadNpmTasks('grunt-regarde');
grunt.loadNpmTasks('grunt-qettlhup');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-template');
grunt.registerTask('remote', [
'build',
'sass:development',
'initServer',
'template'
]);
grunt.registerTask('development', [
'build',
'sass:development',
'initServer',
'template'
]);
grunt.registerTask('staging', [
'build',
'sass:production',
'uglify',
'initServer',
'template'
]);
grunt.registerTask('production', [
'build',
'sass:production',
'uglify',
'initServer',
'template'
]);
grunt.registerTask('build', [
'jshint:beforeconcat',
'concat',
'jshint:afterconcat',
'template'
]);
grunt.registerTask('initServer', 'Output for app.js to parse and launch server', function(){
console.log('Ready');
});
};