From a78d3f7d4bc23c8758d61fcc7a0d2850decd1873 Mon Sep 17 00:00:00 2001 From: Faisal Salman Date: Fri, 7 Nov 2014 15:19:58 +0700 Subject: [PATCH] Keep license comment when minifying --- build/build.sh | 2 +- src/ua-parser.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build/build.sh b/build/build.sh index 6ca6f32..b2a8336 100755 --- a/build/build.sh +++ b/build/build.sh @@ -33,5 +33,5 @@ echo "Running test..." $MOCHA_DIR -R nyan test/test.js echo "Minifying script..." -$UGLIFY_DIR src/ua-parser.js > dist/ua-parser.min.js +$UGLIFY_DIR src/ua-parser.js > dist/ua-parser.min.js --comments '/UAParser\.js/' echo "OK" diff --git a/src/ua-parser.js b/src/ua-parser.js index baff9ae..f5e6ab6 100644 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -1,9 +1,11 @@ -// UAParser.js v0.7.1 -// Lightweight JavaScript-based User-Agent string parser -// https://github.com/faisalman/ua-parser-js -// -// Copyright © 2012-2014 Faisal Salman -// Dual licensed under GPLv2 & MIT +/** + * UAParser.js v0.7.1 + * Lightweight JavaScript-based User-Agent string parser + * https://github.com/faisalman/ua-parser-js + * + * Copyright © 2012-2014 Faisal Salman + * Dual licensed under GPLv2 & MIT + */ (function (window, undefined) {