<commit_before># Copyright (c) 2012, Yahoo! Inc.  All rights reserved.
# Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.

# source directories
SRC := src
SRC_COMMON := $(SRC)/common
SRC_YUI := $(SRC)/yui/3.3.0
SRC_FIREFOX := $(SRC)/firefox
SRC_CHROME := $(SRC)/chrome
SRC_BOOKMARKLET := $(SRC)/bookmarklet
SRC_HAR := $(SRC)/har
SRC_NODEJS := $(SRC)/nodejs
SRC_OPERA := $(SRC)/opera
SRC_SAFARI := $(SRC)/safari
SRC_WSH := $(SRC)/wsh
SRC_RHINO := $(SRC)/rhino
SRC_PHANTOMJS := $(SRC)/phantomjs
SRC_NODESERVER := $(SRC)/nodeserver

# build directories
BUILD := build
BUILD_FIREFOX := $(BUILD)/firefox
BUILD_CHROME := $(BUILD)/chrome
BUILD_YUI := $(BUILD)/yui
BUILD_BOOKMARKLET := $(BUILD)/bookmarklet
BUILD_HAR := $(BUILD)/har
BUILD_NODEJS := $(BUILD)/nodejs
BUILD_OPERA := $(BUILD)/opera
BUILD_SAFARI_ROOT := $(BUILD)/safari
BUILD_SAFARI := $(BUILD_SAFARI_ROOT)/yslow.safariextension
BUILD_WSH := $(BUILD)/wsh
BUILD_RHINO := $(BUILD)/rhino
BUILD_PHANTOMJS := $(BUILD)/phantomjs
BUILD_NODESERVER := $(BUILD)/nodeserver

# package directories
PKG := pkg
PKG_FIREFOX := $(PKG)/firefox
PKG_CHROME := $(PKG)/chrome
PKG_BOOKMARKLET := $(PKG)/bookmarklet
PKG_NODEJS := $(PKG)/nodejs
PKG_OPERA := $(PKG)/opera
PKG_SAFARI := $(PKG)/safari
PKG_WSH := $(PKG)/wsh
PKG_RHINO := $(PKG)/rhino
PKG_PHANTOMJS := $(PKG)/phantomjs
PKG_NODESERVER := $(PKG)/nodeserver

# file names / versions / licenses
BOOKMARKLET_YSLOW_JS := yslow-files-bookmarklet.js
BOOKMARKLET_YSLOW_CSS := yslow-files-style.css
BOOKMARKLET_JS := yslow-bookmarklet.js
BOOKMARKLET_CSS := yslow-style.css
YSLOW_VERSION := $(shell egrep '^Version' CHANGELOG | head -1 | awk '{print $$2;}')
ifdef config
    BM_CONFIG = $(config)
else
    BM_CONFIG = config-local.js
endif
YUI_LICENSE := $(SRC_YUI)/license
YSLOW_LICENSE := $(SRC_COMMON)/license

# lib/tools directories/files
YUI_LIB := $(SRC_YUI)/build
IMG := img
YUICOMPRESSOR := java -jar ~/bin/yuicompressor-2.4.7.jar
TAC = $(shell which tac || echo 'tail -r')

.PHONY: bookmarklet chrome firefox har nodejs opera safari wsh rhino phantomjs nodeserver

all: show-version bookmarklet chrome firefox har nodejs opera safari wsh rhino phantomjs nodeserver

clean: clean-bookmarklet clean-chrome clean-firefox clean-har clean-nodejs clean-opera clean-safari clean-wsh clean-rhino clean-phantomjs clean-nodeserver
	@if [ -d $(BUILD) ]; then rmdir $(BUILD); fi

pkg: pkg-bookmarklet pkg-chrome pkg-firefox pkg-nodejs pkg-opera pkg-safari pkg-wsh pkg-rhino pkg-phantomjs pkg-nodeserver

show-version:
	@echo "YSLOW version: $(YSLOW_VERSION)"

yui:<commit_msg>better yuicompressor path<commit_after># Copyright (c) 2012, Yahoo! Inc.  All rights reserved.
# Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.

# source directories
SRC := src
SRC_COMMON := $(SRC)/common
SRC_YUI := $(SRC)/yui/3.3.0
SRC_FIREFOX := $(SRC)/firefox
SRC_CHROME := $(SRC)/chrome
SRC_BOOKMARKLET := $(SRC)/bookmarklet
SRC_HAR := $(SRC)/har
SRC_NODEJS := $(SRC)/nodejs
SRC_OPERA := $(SRC)/opera
SRC_SAFARI := $(SRC)/safari
SRC_WSH := $(SRC)/wsh
SRC_RHINO := $(SRC)/rhino
SRC_PHANTOMJS := $(SRC)/phantomjs
SRC_NODESERVER := $(SRC)/nodeserver

# build directories
BUILD := build
BUILD_FIREFOX := $(BUILD)/firefox
BUILD_CHROME := $(BUILD)/chrome
BUILD_YUI := $(BUILD)/yui
BUILD_BOOKMARKLET := $(BUILD)/bookmarklet
BUILD_HAR := $(BUILD)/har
BUILD_NODEJS := $(BUILD)/nodejs
BUILD_OPERA := $(BUILD)/opera
BUILD_SAFARI_ROOT := $(BUILD)/safari
BUILD_SAFARI := $(BUILD_SAFARI_ROOT)/yslow.safariextension
BUILD_WSH := $(BUILD)/wsh
BUILD_RHINO := $(BUILD)/rhino
BUILD_PHANTOMJS := $(BUILD)/phantomjs
BUILD_NODESERVER := $(BUILD)/nodeserver

# package directories
PKG := pkg
PKG_FIREFOX := $(PKG)/firefox
PKG_CHROME := $(PKG)/chrome
PKG_BOOKMARKLET := $(PKG)/bookmarklet
PKG_NODEJS := $(PKG)/nodejs
PKG_OPERA := $(PKG)/opera
PKG_SAFARI := $(PKG)/safari
PKG_WSH := $(PKG)/wsh
PKG_RHINO := $(PKG)/rhino
PKG_PHANTOMJS := $(PKG)/phantomjs
PKG_NODESERVER := $(PKG)/nodeserver

# file names / versions / licenses
BOOKMARKLET_YSLOW_JS := yslow-files-bookmarklet.js
BOOKMARKLET_YSLOW_CSS := yslow-files-style.css
BOOKMARKLET_JS := yslow-bookmarklet.js
BOOKMARKLET_CSS := yslow-style.css
YSLOW_VERSION := $(shell egrep '^Version' CHANGELOG | head -1 | awk '{print $$2;}')
ifdef config
    BM_CONFIG = $(config)
else
    BM_CONFIG = config-local.js
endif
YUI_LICENSE := $(SRC_YUI)/license
YSLOW_LICENSE := $(SRC_COMMON)/license

# lib/tools directories/files
YUI_LIB := $(SRC_YUI)/build
IMG := img
YUICOMPRESSOR := `which yuicompressor`
TAC = $(shell which tac || echo 'tail -r')

.PHONY: bookmarklet chrome firefox har nodejs opera safari wsh rhino phantomjs nodeserver

all: show-version bookmarklet chrome firefox har nodejs opera safari wsh rhino phantomjs nodeserver

clean: clean-bookmarklet clean-chrome clean-firefox clean-har clean-nodejs clean-opera clean-safari clean-wsh clean-rhino clean-phantomjs clean-nodeserver
	@if [ -d $(BUILD) ]; then rmdir $(BUILD); fi

pkg: pkg-bookmarklet pkg-chrome pkg-firefox pkg-nodejs pkg-opera pkg-safari pkg-wsh pkg-rhino pkg-phantomjs pkg-nodeserver

show-version:
	@echo "YSLOW version: $(YSLOW_VERSION)"

yui:
{'fraction_non_alphanumeric': 0.14489402697495182, 'fraction_numerical': 0.004046242774566474, 'mean_word_length': 5.496871088861076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '4677355', 'n_tokens_mistral': 2035, 'n_tokens_neox': 1930, 'n_words': 438}