<commit_before>/*jshint node: true, camelcase: false */

"use strict";

module.exports = function (grunt) {

	grunt.initConfig({
		pkg: grunt.file.readJSON("package.json"),
		compare_size: {
			files: [
				"jquery.ui-contextmenu.min.js",
				"jquery.ui-contextmenu.js"
			],
			options: {
				compress: {
					gz: function (fileContents) {
							return require("gzip-js").zip(fileContents, {}).length;
					}
				}
			}
		},
		connect: {
			demo: {
				options: {
					hostname: "*",  // make accessible from everywhere
					port: 8080,
					base: "./",
					keepalive: true
				}
			},
			sauce: {
				options: {
					port: 9999,
					base: ""
				}
			}
		},
		exec: {
			tabfix: {
				// Cleanup whitespace according to http://contribute.jquery.org/style-guide/js/
				// (requires https://github.com/mar10/tabfix)
//				cmd: "tabfix -t --line=UNIX -r -m *.js,*.css,*.html,*json,*.yaml -i node_modules ."
				cmd: "tabfix -t -r -m *.js,*.css,*.html,*json,*.yaml -i node_modules ."
			},
			upload: {
				// FTP upload the demo files (requires https://github.com/mar10/pyftpsync)
				cmd: "pyftpsync --progress upload . ftp://www.wwwendt.de/tech/demo/jquery-contextmenu --delete-unmatched --omit dist,node_modules,.*,_* -x"
			}
		},
		jshint: {
			files: [
				"Gruntfile.js",
				"jquery.ui-contextmenu.js",
				"test/tests.js"
			],
			options: {
				jshintrc: ".jshintrc"
			}
		},
		qunit: {
			all: ["test/index.html"]
		},
		"saucelabs-qunit": {
			all: {
				options: {
					urls: ["http://192.168.3.11:9999/test/index.html"],
					// username: process.env.SAUCE_USERNAME,
					// key: process.env.SAUCE_ACCESS_KEY,
					tunnelTimeout: 5,
					build: process.env.TRAVIS_JOB_ID,
					concurrency: 3,
					browsers: [
						// { browserName: "safari", platform: "OS X 10.8"},
						// { browserName: "firefox", platform: "Windows 7"},
						// { browserName: "firefox", platform: "Windows XP"},
						{ browserName: "firefox", platform: "Linux"}
						// { browserName: "chrome", platform: "Windows 7"},
						// { browserName: "internet explorer", platform: "Windows 8", version: "10" },
						// { browserName: "internet explorer", platform: "Windows 7", version: "9" }
					],
					testname: "jquery.ui-contextmenu qunit tests"
				}
			}
		},
		uglify: {<commit_msg>Full test matrix<commit_after>/*jshint node: true, camelcase: false */

"use strict";

module.exports = function (grunt) {

	grunt.initConfig({
		pkg: grunt.file.readJSON("package.json"),
		compare_size: {
			files: [
				"jquery.ui-contextmenu.min.js",
				"jquery.ui-contextmenu.js"
			],
			options: {
				compress: {
					gz: function (fileContents) {
							return require("gzip-js").zip(fileContents, {}).length;
					}
				}
			}
		},
		connect: {
			demo: {
				options: {
					hostname: "*",  // make accessible from everywhere
					port: 8080,
					base: "./",
					keepalive: true
				}
			},
			sauce: {
				options: {
					hostname: "localhost",
					port: 9999,
					base: "",
					keepalive: false
				}
			}
		},
		exec: {
			tabfix: {
				// Cleanup whitespace according to http://contribute.jquery.org/style-guide/js/
				// (requires https://github.com/mar10/tabfix)
//				cmd: "tabfix -t --line=UNIX -r -m *.js,*.css,*.html,*json,*.yaml -i node_modules ."
				cmd: "tabfix -t -r -m *.js,*.css,*.html,*json,*.yaml -i node_modules ."
			},
			upload: {
				// FTP upload the demo files (requires https://github.com/mar10/pyftpsync)
				cmd: "pyftpsync --progress upload . ftp://www.wwwendt.de/tech/demo/jquery-contextmenu --delete-unmatched --omit dist,node_modules,.*,_* -x"
			}
		},
		jshint: {
			files: [
				"Gruntfile.js",
				"jquery.ui-contextmenu.js",
				"test/tests.js"
			],
			options: {
				jshintrc: ".jshintrc"
			}
		},
		qunit: {
			all: ["test/index.html"]
		},
		"saucelabs-qunit": {
			all: {
				options: {
					urls: ["http://localhost:9999/test/index.html"],
					// username: process.env.SAUCE_USERNAME,
					// key: process.env.SAUCE_ACCESS_KEY,
					tunnelTimeout: 5,
					build: process.env.TRAVIS_JOB_ID,
					concurrency: 3,
					browsers: [
						{ browserName: "safari", platform: "OS X 10.8"},
						{ browserName: "firefox", platform: "Windows 7"},
						{ browserName: "firefox", platform: "Windows XP"},
						{ browserName: "firefox", platform: "Linux"},
						{ browserName: "chrome", platform: "Windows 7"},
						{ browserName: "internet explorer", platform: "Windows 8", version: "10" },
						{ browserName: "internet explorer", platform: "Windows 7", version: "9" }
					],
					testname: "jquery.ui-contextmenu qunit tests"
				}
			}
		},
		uglify: {
{'fraction_non_alphanumeric': 0.17979973878972572, 'fraction_numerical': 0.014148889856334348, 'mean_word_length': 2.4757942511346447, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3248297', 'n_tokens_mistral': 2178, 'n_tokens_neox': 1665, 'n_words': 324}