Skip to content

Instantly share code, notes, and snippets.

@alfrescian
Created February 12, 2015 18:34
Show Gist options
  • Select an option

  • Save alfrescian/ece38a4d2fdc2d603ead to your computer and use it in GitHub Desktop.

Select an option

Save alfrescian/ece38a4d2fdc2d603ead to your computer and use it in GitHub Desktop.
basic grunt-atomify + eslint
module.exports = function (grunt) {
'use strict';
var filesToLint = [
'<%= srcDir %>/**/*.js'
];
require('load-grunt-tasks')(grunt);
grunt.initConfig({
srcDir: 'src/app',
distDir: 'dist',
pkg: grunt.file.readJSON('package.json'),
concurrent: {
options: {
logConcurrentOutput: true
},
dev: {
tasks: ['watch:dev', 'atomify:dev']
}
},
watch: {
dev: {
files: filesToLint,
tasks: ['eslint']
}
},
eslint: {
dev: filesToLint
},
atomify: {
dev: {
js: {
entry: '<%= srcDir %>/main.js',
alias: '<%= srcDir %>/app.js',
transforms: [],
debug: true
},
css: {
entry: '<%= srcDir %>/main.css',
alias: '<%= srcDir %>/app.css',
transforms: ['partialify']
},
server: {
path: '<%= srcDir %>/index.html',
open: true,
lr: {
sync: true
}
}
}
}
});
grunt.event.on('watch', function (action, filepath) {
grunt.config('eslint.dev', filepath);
});
grunt.registerTask('dev', [
'eslint',
'concurrent'
]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment