설명 없음

Gruntfile.js 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * grunt-contrib-sass
  3. * http://gruntjs.com/
  4. *
  5. * Copyright (c) 2012 Sindre Sorhus, contributors
  6. * Licensed under the MIT license.
  7. */
  8. 'use strict';
  9. module.exports = function (grunt) {
  10. grunt.initConfig({
  11. pkg: {
  12. name: 'grunt-contrib-sass'
  13. },
  14. jshint: {
  15. options: {
  16. jshintrc: '.jshintrc'
  17. },
  18. all: [
  19. 'Gruntfile.js',
  20. 'tasks/*.js',
  21. '<%= nodeunit.tests %>'
  22. ]
  23. },
  24. clean: {
  25. test: [
  26. 'test/tmp',
  27. '.sass-cache'
  28. ]
  29. },
  30. nodeunit: {
  31. tests: ['test/*_test.js']
  32. },
  33. sass: {
  34. options: {
  35. sourcemap: 'none'
  36. },
  37. compile: {
  38. files: {
  39. 'test/tmp/scss.css': ['test/fixtures/compile.scss'],
  40. 'test/tmp/sass.css': ['test/fixtures/compile.sass'],
  41. 'test/tmp/css.css': ['test/fixtures/compile.css']
  42. }
  43. },
  44. compileBanner: {
  45. options: {
  46. banner: '/* <%= pkg.name %> banner */'
  47. },
  48. files: {
  49. 'test/tmp/scss-banner.css': ['test/fixtures/banner.scss'],
  50. 'test/tmp/sass-banner.css': ['test/fixtures/banner.sass'],
  51. 'test/tmp/css-banner.css': ['test/fixtures/banner.css']
  52. }
  53. },
  54. ignorePartials: {
  55. cwd: 'test/fixtures/partials',
  56. src: '*.scss',
  57. dest: 'test/tmp',
  58. expand: true,
  59. ext: '.css'
  60. },
  61. updateTrue: {
  62. options: {
  63. update: true
  64. },
  65. files: [{
  66. expand: true,
  67. cwd: 'test/fixtures',
  68. src: ['updatetrue.scss', 'updatetrue.sass', 'updatetrue.css'],
  69. dest: 'test/tmp',
  70. ext: '.css'
  71. }]
  72. }
  73. }
  74. });
  75. grunt.loadTasks('tasks');
  76. grunt.loadNpmTasks('grunt-contrib-clean');
  77. grunt.loadNpmTasks('grunt-contrib-jshint');
  78. grunt.loadNpmTasks('grunt-contrib-nodeunit');
  79. grunt.loadNpmTasks('grunt-contrib-internal');
  80. grunt.registerTask('mkdir', grunt.file.mkdir);
  81. grunt.registerTask('test', [
  82. 'clean',
  83. 'mkdir:tmp',
  84. 'sass',
  85. 'nodeunit',
  86. 'clean'
  87. ]);
  88. grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);
  89. };