Skip to content

Commit f538dec

Browse files
Add a warning about keeping min.js up to date (#44)
1 parent 2b1bab5 commit f538dec

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ The jQuery Unobtrusive Validation library complements jQuery Validation by addin
55

66
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo.
77

8+
`jquery.validate.unobtrusive.min.js` must be kept up to date with `jquery.validate.unobtrusive.js`, this can easily be done by running `gulp` before commiting.

gulpfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ var gulp = require("gulp"),
44

55
gulp.task("minifyJS", function () {
66
gulp.src(["jquery.validate.unobtrusive.js"], { base: "." })
7-
.pipe(uglify())
7+
.pipe(uglify({
8+
preserveComments: 'license'
9+
}))
810
.pipe(rename({suffix: '.min'}))
911
.pipe(gulp.dest("."));
1012
});

jquery.validate.unobtrusive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
function escapeAttributeValue(value) {
2626
// As mentioned on http://api.jquery.com/category/selectors/
27-
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\\\$1");
27+
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
2828
}
2929

3030
function getModelPrefix(fieldName) {

jquery.validate.unobtrusive.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)