Created
February 12, 2015 18:34
-
-
Save alfrescian/ece38a4d2fdc2d603ead to your computer and use it in GitHub Desktop.
basic grunt-atomify + eslint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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