From: Jakub Pawlowicz Date: Mon, 6 Oct 2014 17:23:29 +0000 (+0100) Subject: Removes unnecessary libraries. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5dc23ed5c5c126c235b5bbfce287897f6f52abe9;p=clean-css.git Removes unnecessary libraries. --- diff --git a/lib/properties/scanner.js b/lib/properties/scanner.js deleted file mode 100644 index d6751d5b..00000000 --- a/lib/properties/scanner.js +++ /dev/null @@ -1,20 +0,0 @@ -(function() { - var OPEN_BRACE = '{'; - var SEMICOLON = ';'; - var COLON = ':'; - - var PropertyScanner = function PropertyScanner(data) { - this.data = data; - }; - - PropertyScanner.prototype.nextAt = function(cursor) { - var lastColon = this.data.lastIndexOf(COLON, cursor); - var lastOpenBrace = this.data.lastIndexOf(OPEN_BRACE, cursor); - var lastSemicolon = this.data.lastIndexOf(SEMICOLON, cursor); - var startAt = Math.max(lastOpenBrace, lastSemicolon); - - return this.data.substring(startAt + 1, lastColon).trim(); - }; - - module.exports = PropertyScanner; -})(); diff --git a/lib/text/name-quotes.js b/lib/text/name-quotes.js deleted file mode 100644 index 7324ac5b..00000000 --- a/lib/text/name-quotes.js +++ /dev/null @@ -1,37 +0,0 @@ -(function() { - var QuoteScanner = require('../utils/quote-scanner'); - var PropertyScanner = require('../properties/scanner'); - - var NameQuotes = function NameQuotes() {}; - - var STRIPPABLE = /^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/; - - var properties = [ - 'animation', - '-moz-animation', - '-o-animation', - '-webkit-animation', - 'animation-name', - '-moz-animation-name', - '-o-animation-name', - '-webkit-animation-name', - 'font', - 'font-family' - ]; - - NameQuotes.prototype.process = function(data) { - var scanner = new PropertyScanner(data); - - return new QuoteScanner(data).each(function(match, store, cursor) { - var lastProperty = scanner.nextAt(cursor); - if (properties.indexOf(lastProperty) > -1) { - if (STRIPPABLE.test(match)) - match = match.substring(1, match.length - 1); - } - - store.push(match); - }); - }; - - module.exports = NameQuotes; -})();