'use strict'; module.exports = function(grunt) { require('load-grunt-tasks')(grunt); grunt.initConfig({ jshint: { options: { jshintrc: '.jshintrc', reporter: require('jshint-stylish') }, all: [ '**/*.js', '!bower_components/**/*.js', '!node_modules/**/*.js' ] }, csslint: { options: { csslintrc: '.csslintrc' }, check: { src: [ '**/*.css', '!bower_components/**/*.css', '!node_modules/**/*.css' ] } }, watch: { options: { interrupt: true, livereload: true, livereloadOnError: false }, js: { files: [ '**/*.js', '!bower_components/**/*.js', '!node_modules/**/*.js' ], tasks: ['jshint:all'] }, css: { files: [ '**/*.css', '!bower_components/**/*.css', '!node_modules/**/*.css' ], tasks: ['csslint:check'] }, html: { files: [ '**/*.html', '!bower_components/**/*.html', '!node_modules/**/*.html' ], }, configFiles: { files: [ 'Gruntfile.js' ], options: { reload: true } } }, connect: { server: { options: { port: 3000, hostname: '*', } } }, copy: { dist: { expand: true, cwd: '.', src: [ 'bower_components/normalize-css/normalize.css', 'font/**/*', 'img/**/*', '*.{html,css}' ], dest: 'dist/' } }, 'sftp-deploy': { build: { auth: { host: 'markamoser.com', port: 6791, authKey: 'workshop' }, cache: 'sftpCache.json', src: 'dist/', dest: 'www/links.markamoser.com/', progress: true } } }); // Tasks grunt.registerTask('serve', function () { grunt.task.run([ 'jshint:all', 'csslint:check', 'connect', 'watch' ]); }); grunt.registerTask('default', ['serve']); grunt.registerTask('deploy', ['copy:dist', 'sftp-deploy:build']); }; // scp dist/index.html workshop:www/links.markamoser.com/