Showing with 75 additions and 20 deletions.
  1. +1 −1 .gitignore
  2. +5 −19 Makefile
  3. +36 −0 grunt.js
  4. +33 −0 package.json
@@ -9,7 +9,7 @@ combine/
compiled/
tmp/
*.swp
.gitignore
node_modules

# branch preview
branches
@@ -50,6 +50,7 @@ clean:
# Create the output directory.
init:
@@mkdir -p ${OUTPUT}
@@git log -1 --format=format:"Git Build: SHA1: %H <> Date: %cd" > sha.txt

# Build and minify the CSS files
css: init
@@ -61,10 +62,7 @@ css: init
out=${OUTPUT}/${NAME}.compiled.css
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${NAME}.css
@@cat ${OUTPUT}/${NAME}.compiled.css >> ${OUTPUT}/${NAME}.css
@@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.css
@@java -XX:ReservedCodeCacheSize=64m \
-jar build/yuicompressor-2.4.6.jar \
--type css ${OUTPUT}/${NAME}.compiled.css >> ${OUTPUT}/${NAME}.min.css
@@grunt cssmin:all
@@rm ${OUTPUT}/${NAME}.compiled.css
# Build the CSS Structure-only file
${RUN_JS} \
@@ -74,19 +72,13 @@ css: init
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${STRUCTURE}.css
@@cat ${OUTPUT}/${STRUCTURE}.compiled.css >> ${OUTPUT}/${STRUCTURE}.css
# ..... and then minify it
@@echo ${VER_MIN} > ${OUTPUT}/${STRUCTURE}.min.css
@@java -XX:ReservedCodeCacheSize=64m \
-jar build/yuicompressor-2.4.6.jar \
--type css ${OUTPUT}/${STRUCTURE}.compiled.css >> ${OUTPUT}/${STRUCTURE}.min.css
@@grunt cssmin:structure
@@rm ${OUTPUT}/${STRUCTURE}.compiled.css
# Build the theme only file
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${THEME_FILENAME}.css
@@cat css/themes/default/jquery.mobile.theme.css >> ${OUTPUT}/${THEME_FILENAME}.css
# ..... and then minify it
@@echo ${VER_MIN} > ${OUTPUT}/${THEME_FILENAME}.min.css
@@java -XX:ReservedCodeCacheSize=64m \
-jar build/yuicompressor-2.4.6.jar \
--type css ${OUTPUT}/${THEME_FILENAME}.css >> ${OUTPUT}/${THEME_FILENAME}.min.css
@@grunt cssmin:theme
# Copy in the images
@@cp -R css/themes/${THEME}/images ${OUTPUT}/
# Css portion is complete.
@@ -138,13 +130,7 @@ js: init
@@cat ${OUTPUT}/${NAME}.compiled.js | ${SED_VER_API} >> ${OUTPUT}/${NAME}.js
@@rm ${OUTPUT}/${NAME}.compiled.js
# ..... and then minify it
@@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.js
@@java -XX:ReservedCodeCacheSize=64m \
-jar build/google-compiler-20111003.jar \
--js ${OUTPUT}/${NAME}.js \
--js_output_file ${OUTPUT}/${NAME}.compiled.js
@@cat ${OUTPUT}/${NAME}.compiled.js >> ${OUTPUT}/${NAME}.min.js
@@rm ${OUTPUT}/${NAME}.compiled.js
@@grunt min:main
# -------------------------------------------------


@@ -0,0 +1,36 @@
/*global module:false*/
module.exports = function(grunt) {

// provided by Makefile for now
var version = grunt.file.read( "sha.txt" );

grunt.loadNpmTasks("grunt-css");

grunt.initConfig({
pkg: "<json:package.json>",
meta: {
banner: "/*! jQuery Mobile v" + version + "jquerymobile.com | jquery.org/license */"
},
min: {
main: {
src: ["<banner:meta.banner>", "compiled/jquery.mobile.js"],
dest: "compiled/jquery.mobile.min.js"
}
},
cssmin: {
all: {
src: ["<banner:meta.banner>", "compiled/jquery.mobile.compiled.css"],
dest: "compiled/jquery.mobile.min.css"
},
structure: {
src: ["<banner:meta.banner>", "compiled/jquery.mobile.structure.compiled.css"],
dest: "compiled/jquery.mobile.structure.min.css"
},
theme: {
src: ["<banner:meta.banner>", "compiled/jquery.mobile.theme.css"],
dest: "compiled/jquery.mobile.theme.min.css"
}
}
});

};
@@ -0,0 +1,33 @@
{
"name": "jquery-mobile",
"title": "jQuery Mobile",
"description": "?",
"version": "1.1.0pre",
"homepage": "https://jquerymobile.com",
"author": {
"name": "?"
},
"repository": {
"type": "git",
"url": "git://github.com/jquery/jquery-mobile.git"
},
"bugs": {
"url": "https://github.com/jquery/jquery-mobile/issues"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
},
{
"type": "GPL",
"url": "http://www.opensource.org/licenses/GPL-2.0"
}
],
"dependencies": {},
"devDependencies": {
"grunt": "0.3.7",
"grunt-css": "0.1.1"
},
"keywords": []
}