UNPKG

grunt-max-filesize

Version:

Throws an error if files are over a certain size.

49 lines (38 loc) 974 B
/* * grunt-max-filesize * https://github.com/alexcorre/grunt-max-filesize * * Copyright (c) 2014 Alex Corre * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ jshint: { all: [ 'Gruntfile.js', 'tasks/*.js', 'tasks/**/*.js', '<%= nodeunit.tests %>' ], options: { jshintrc: '.jshintrc' } }, // Unit tests. nodeunit: { tests: ['test/*.test.js'] } }); // Actually load this plugin's task(s). grunt.loadTasks('tasks'); // These plugins provide necessary tasks. grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-nodeunit'); // grunt test should just run nodeunit grunt.registerTask('test', ['nodeunit']); // By default, lint and run all tests. grunt.registerTask('default', ['jshint', 'test']); };