From 6cc5cfeae205c934189459d4e827a277155dc93f Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Wed, 28 Jan 2015 17:56:53 -0800 Subject: [PATCH] Download and install jQuery Unobtrusive Validation and its dependencies - avoids checking these external .js files into our repo - limit jQuery*.js versions to single value, mostly the latest but don't cross over to jQuery.js 2.0.x range (incompatible with IE 6, 7, 8) --- .gitignore | 3 +++ test/WebSites/ValidationWebSite/bower.json | 21 ++++++++++++++++++++ test/WebSites/ValidationWebSite/gruntfile.js | 21 ++++++++++++++++++++ test/WebSites/ValidationWebSite/package.json | 9 +++++++++ test/WebSites/ValidationWebSite/project.json | 12 +++++++++++ 5 files changed, 66 insertions(+) create mode 100644 test/WebSites/ValidationWebSite/bower.json create mode 100644 test/WebSites/ValidationWebSite/gruntfile.js create mode 100644 test/WebSites/ValidationWebSite/package.json diff --git a/.gitignore b/.gitignore index 2253fa08e6..b0dbe53b45 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ packages/ artifacts/ PublishProfiles/ .vs/ +bower_components/ +node_modules/ +**/wwwroot/lib/ debugSettings.json *.user *.suo diff --git a/test/WebSites/ValidationWebSite/bower.json b/test/WebSites/ValidationWebSite/bower.json new file mode 100644 index 0000000000..8724e16c39 --- /dev/null +++ b/test/WebSites/ValidationWebSite/bower.json @@ -0,0 +1,21 @@ +{ + "name": "ValidationWebSite", + "description": "Web site demonstrating various validations.", + "private": true, + "dependencies": { + "jquery": "1.11.2", + "jquery-validation": "1.13.1", + "jquery-validation-unobtrusive": "3.2.2" + }, + "exportsOverride": { + "jquery": { + "js": "jquery.{js,min.js,min.map}" + }, + "jquery-validation": { + "": "jquery.validate.js" + }, + "jquery-validation-unobtrusive": { + "": "jquery.validate.unobtrusive.{js,min.js}" + } + } +} diff --git a/test/WebSites/ValidationWebSite/gruntfile.js b/test/WebSites/ValidationWebSite/gruntfile.js new file mode 100644 index 0000000000..34c745b143 --- /dev/null +++ b/test/WebSites/ValidationWebSite/gruntfile.js @@ -0,0 +1,21 @@ + +module.exports = function (grunt) { + grunt.initConfig({ + bower: { + install: { + options: { + targetDir: "wwwroot/lib", + layout: "byComponent", + cleanTargetDir: false + } + } + } + }); + + // This command registers the default task which will install bower packages into wwwroot/lib + grunt.registerTask("default", ["bower:install"]); + + // The following line loads the grunt plugins. + // This line needs to be at the end of this this file. + grunt.loadNpmTasks("grunt-bower-task"); +}; \ No newline at end of file diff --git a/test/WebSites/ValidationWebSite/package.json b/test/WebSites/ValidationWebSite/package.json new file mode 100644 index 0000000000..a628bc5964 --- /dev/null +++ b/test/WebSites/ValidationWebSite/package.json @@ -0,0 +1,9 @@ +{ + "version": "0.0.0", + "name": "ValidationWebSite", + "description": "Web site demonstrating various validations.", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-bower-task": "^0.4.0" + } +} \ No newline at end of file diff --git a/test/WebSites/ValidationWebSite/project.json b/test/WebSites/ValidationWebSite/project.json index c582a1382f..3f61a9c174 100644 --- a/test/WebSites/ValidationWebSite/project.json +++ b/test/WebSites/ValidationWebSite/project.json @@ -15,5 +15,17 @@ "aspnet50": { }, "aspnetcore50": { } }, + "exclude": [ + "wwwroot", + "node_modules", + "bower_components" + ], + "packExclude": [ + "node_modules", + "bower_components", + "**.kproj", + "**.user", + "**.vspscc" + ], "webroot": "wwwroot" }