gruntfile.js 763 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* jshint node: true, esnext: true, varstmt: true */
  2. 'use strict';
  3. module.exports = ( grunt ) => {
  4. // First register the "default" task, so it can be analyzed by other tasks.
  5. grunt.registerTask( 'default', [ 'jshint:git', 'jscs:git' ] );
  6. // Files that will be ignored by the "jscs" and "jshint" tasks.
  7. const ignoreFiles = [
  8. // Automatically loaded from .gitignore. Add more if necessary.
  9. 'lib/**'
  10. ];
  11. // Basic configuration which will be overloaded by the tasks.
  12. grunt.initConfig( {
  13. pkg: grunt.file.readJSON( 'package.json' ),
  14. workspaceRoot: '..',
  15. jshint: {
  16. options: {
  17. ignores: ignoreFiles
  18. }
  19. },
  20. jscs: {
  21. options: {
  22. excludeFiles: ignoreFiles
  23. }
  24. }
  25. } );
  26. // Finally load the tasks.
  27. grunt.loadTasks( 'dev/tasks' );
  28. };