snootforge

chee/Recently

instant slideshows

now we are talking, it can be shrunked
69e31d220d9d37aa8ce8c5725fc177d4b5111521
  1. Fdiff --git a/Gruntfile.js b/Gruntfile.js
  2. index 2ea552c..26b4180 100644
  3. --- a/Gruntfile.js
  4. +++ b/Gruntfile.js
  5. H@@ -25,14 +25,6 @@ module.exports = function (grunt) {
  6. grunt.initConfig({
  7. yeoman: yeomanConfig,
  8. watch: {
  9. - coffee: {
  10. - files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
  11. - tasks: ['coffee:dist']
  12. - },
  13. - coffeeTest: {
  14. - files: ['test/spec/{,*/}*.coffee'],
  15. - tasks: ['coffee:test']
  16. - },
  17. compass: {
  18. files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
  19. tasks: ['compass:server', 'autoprefixer']
  20. H@@ -70,16 +62,6 @@ module.exports = function (grunt) {
  21. }
  22. }
  23. },
  24. - test: {
  25. - options: {
  26. - middleware: function (connect) {
  27. - return [
  28. - mountFolder(connect, '.tmp'),
  29. - mountFolder(connect, 'test')
  30. - ];
  31. - }
  32. - }
  33. - },
  34. dist: {
  35. options: {
  36. middleware: function (connect) {
  37. H@@ -108,34 +90,6 @@ module.exports = function (grunt) {
  38. },
  39. server: '.tmp'
  40. },
  41. - mocha: {
  42. - all: {
  43. - options: {
  44. - run: true,
  45. - urls: ['http://localhost:<%= connect.options.port %>/index.html']
  46. - }
  47. - }
  48. - },
  49. - coffee: {
  50. - dist: {
  51. - files: [{
  52. - expand: true,
  53. - cwd: '<%= yeoman.app %>/scripts',
  54. - src: '{,*/}*.coffee',
  55. - dest: '.tmp/scripts',
  56. - ext: '.js'
  57. - }]
  58. - },
  59. - test: {
  60. - files: [{
  61. - expand: true,
  62. - cwd: 'test/spec',
  63. - src: '{,*/}*.coffee',
  64. - dest: '.tmp/spec',
  65. - ext: '.js'
  66. - }]
  67. - }
  68. - },
  69. compass: {
  70. options: {
  71. sassDir: '<%= yeoman.app %>/styles',
  72. H@@ -184,13 +138,14 @@ module.exports = function (grunt) {
  73. // Options: https://github.com/jrburke/r.js/blob/master/build/example.build.js
  74. options: {
  75. // `name` and `out` is set by grunt-usemin
  76. - baseUrl: yeomanConfig.app + '/scripts',
  77. + baseUrl: yeomanConfig.app,
  78. optimize: 'none',
  79. // TODO: Figure out how to make sourcemaps work with grunt-usemin
  80. // https://github.com/yeoman/grunt-usemin/issues/30
  81. //generateSourceMaps: true,
  82. // required to support SourceMaps
  83. // http://requirejs.org/docs/errors.html#sourcemapcomments
  84. + name: "scripts/main",
  85. preserveLicenseComments: false,
  86. useStrict: true,
  87. wrap: true
  88. H@@ -262,7 +217,7 @@ module.exports = function (grunt) {
  89. htmlmin: {
  90. dist: {
  91. options: {
  92. - /*removeCommentsFromCDATA: true,
  93. + removeCommentsFromCDATA: true,
  94. // https://github.com/yeoman/grunt-usemin/issues/44
  95. //collapseWhitespace: true,
  96. collapseBooleanAttributes: true,
  97. H@@ -270,7 +225,7 @@ module.exports = function (grunt) {
  98. removeRedundantAttributes: true,
  99. useShortDoctype: true,
  100. removeEmptyAttributes: true,
  101. - removeOptionalTags: true*/
  102. + removeOptionalTags: true
  103. },
  104. files: [{
  105. expand: true,
  106. H@@ -307,15 +262,12 @@ module.exports = function (grunt) {
  107. concurrent: {
  108. server: [
  109. 'compass',
  110. - 'coffee:dist',
  111. 'copy:styles'
  112. ],
  113. test: [
  114. - 'coffee',
  115. 'copy:styles'
  116. ],
  117. dist: [
  118. - 'coffee',
  119. 'compass',
  120. 'copy:styles',
  121. 'imagemin',
  122. H@@ -352,8 +304,6 @@ module.exports = function (grunt) {
  123. 'clean:server',
  124. 'concurrent:test',
  125. 'autoprefixer',
  126. - 'connect:test',
  127. - 'mocha'
  128. ]);
  129. grunt.registerTask('build', [
  130. H@@ -362,6 +312,7 @@ module.exports = function (grunt) {
  131. 'concurrent:dist',
  132. 'autoprefixer',
  133. 'requirejs',
  134. +
  135. 'concat',
  136. 'cssmin',
  137. 'uglify',
  1. Fdiff --git a/app/.htaccess b/app/.htaccess
  2. index cb84cb9..a477577 100644
  3. --- a/app/.htaccess
  4. +++ b/app/.htaccess
  5. H@@ -499,11 +499,11 @@ FileETag None
  6. # To understand why this is important and a better idea than `*.css?v231`, read:
  7. # http://stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring
  8. -# <IfModule mod_rewrite.c>
  9. -# RewriteCond %{REQUEST_FILENAME} !-f
  10. -# RewriteCond %{REQUEST_FILENAME} !-d
  11. -# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
  12. -# </IfModule>
  13. +<IfModule mod_rewrite.c>
  14. + RewriteCond %{REQUEST_FILENAME} !-f
  15. + RewriteCond %{REQUEST_FILENAME} !-d
  16. + RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
  17. +</IfModule>
  18. # ------------------------------------------------------------------------------
  19. # | File concatenation |
  1. Fdiff --git a/app/index.html b/app/index.html
  2. index daa28c2..bb07804 100644
  3. --- a/app/index.html
  4. +++ b/app/index.html
  5. H@@ -6,10 +6,16 @@
  6. <title>Recently</title>
  7. <meta name="description" content="">
  8. <meta name="viewport" content="width=device-width">
  9. + <!-- build:css(.tmp) styles/css.css -->
  10. <link rel="stylesheet" href="styles/normalize.css">
  11. <link rel="stylesheet" href="styles/main.css">
  12. + <!-- endbuild -->
  13. + <!-- build:js scripts/modernizr.js -->
  14. <script src="bower_components/modernizr/modernizr.js"></script>
  15. + <!-- endbuild -->
  16. + <!-- build:js scripts/js.js -->
  17. <script data-main="scripts/main" src="bower_components/requirejs/require.js"></script>
  18. + <!-- endbuild -->
  19. </head>
  20. <body>
  21. <!--[if lt IE 7]>
  1. Fdiff --git a/package.json b/package.json
  2. index 45d5aeb..5b65898 100644
  3. --- a/package.json
  4. +++ b/package.json
  5. H@@ -26,7 +26,8 @@
  6. "grunt-svgmin": "~0.1.0",
  7. "grunt-concurrent": "~0.1.0",
  8. "matchdep": "~0.1.1",
  9. - "connect-livereload": "~0.2.0"
  10. + "connect-livereload": "~0.2.0",
  11. + "grunt-cachebuster": "~0.1.5"
  12. },
  13. "engines": {
  14. "node": ">=0.8.0"