Gruntfile.coffee 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Thanks to Jackson Gariety (https://github.com/jacksongariety/) for
  2. # contributing the initial version of this Gruntfile.
  3. module.exports = (grunt) ->
  4. path = require('path')
  5. # Configure plugins
  6. grunt.initConfig
  7. express:
  8. all:
  9. options:
  10. port: 8000
  11. hostname: "0.0.0.0"
  12. bases: [path.resolve(__dirname, '.')]
  13. open:
  14. all:
  15. path: 'http://localhost:<%= express.all.options.port%>'
  16. coffee:
  17. all:
  18. options:
  19. join: true
  20. files:
  21. "./javascripts/skeuocard.js": [
  22. "./javascripts/src/Skeuocard.coffee",
  23. "./javascripts/src/FlipTabView.coffee",
  24. "./javascripts/src/SegmentedCardNumberInputView.coffee",
  25. "./javascripts/src/ExpirationInputView.coffee",
  26. "./javascripts/src/TextInputView.coffee",
  27. "./javascripts/src/CardProduct.coffee"
  28. ]
  29. sass:
  30. all:
  31. options:
  32. style: 'compressed'
  33. files:
  34. "./styles/skeuocard.reset.css": "./styles/src/skeuocard.reset.scss"
  35. "./styles/skeuocard.css": "./styles/src/skeuocard.scss"
  36. "./styles/demo.css": "./styles/src/demo.scss"
  37. uglify:
  38. all:
  39. options:
  40. mangle: false # don't change function names
  41. files:
  42. "./javascripts/skeuocard.min.js": "./javascripts/skeuocard.js"
  43. watch:
  44. all:
  45. files: [
  46. "./javascripts/src/*.coffee"
  47. "./styles/src/*.scss"
  48. ]
  49. tasks: ["coffee", "sass", "uglify"]
  50. options:
  51. livereload: true
  52. # Load plugins
  53. grunt.loadNpmTasks "grunt-contrib-watch"
  54. grunt.loadNpmTasks "grunt-contrib-coffee"
  55. grunt.loadNpmTasks "grunt-contrib-sass"
  56. grunt.loadNpmTasks "grunt-contrib-uglify"
  57. grunt.loadNpmTasks "grunt-open"
  58. grunt.loadNpmTasks "grunt-express"
  59. # Default task
  60. grunt.registerTask "default", [
  61. "express",
  62. "open",
  63. "watch"
  64. ]