Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Add build-git task for CDN deployment
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 26 Jul 2012 14:46:04 +0000 (16:46 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 26 Jul 2012 14:46:27 +0000 (16:46 +0200)
.gitignore
grunt.js

index 7e11d0b..e41c37d 100644 (file)
@@ -5,3 +5,4 @@
 .DS_Store
 .settings
 node_modules
+dist/
index 1a31f6b..448cbf2 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -77,6 +77,19 @@ grunt.initConfig({
        }
 });
 
+grunt.registerTask( "build-git", function( sha ) {
+       function processor( content ) {
+               var tagline = " - A JavaScript Unit Testing Framework";
+               return content.replace( tagline, "-" + sha + " " + grunt.template.today('isoDate') + tagline );
+       }
+       grunt.file.copy( "qunit/qunit.css", "dist/qunit-git.css", {
+               process: processor
+       });
+       grunt.file.copy( "qunit/qunit.js", "dist/qunit-git.js", {
+               process: processor
+       });
+});
+
 grunt.registerTask( "testswarm", function( commit, configFile ) {
        var testswarm = require( "testswarm" ),
                config = grunt.file.readJSON( configFile ).qunit;

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf