Commit 06a5d19c authored by Michael Fairchild's avatar Michael Fairchild
Browse files

Merge branch '4.1' of git.unl.edu:iim/UNL_Search into 4.1

parents 3d97e547 7559ea0b
......@@ -5,6 +5,7 @@
/.settings
/www/css
/www/less/lib
/www/wdn
/.buildpath
/vendor
/tmp
#Thu Apr 15 08:48:11 CDT 2010
eclipse.preferences.version=1
include_path=0;/UNL_Search
var every = require('lodash/collection/every');
var fs = require('fs');
module.exports = function (grunt) {
var lessDir = 'www/less';
var lessVendorDir = lessDir + '/lib';
var cssDir = 'www/css';
var jsDir = 'www/js';
var cssFiles = [
'search',
'search-google',
];
var jsFiles = [
jsDir + '/search.js',
];
var wdnMixinLibBaseUrl = 'https://raw.githubusercontent.com/unl/wdntemplates/4.1/wdn/templates_4.1/less/_mixins/';
var wdnMixins = [
'breakpoints.less',
'colors.less',
'fonts.less',
];
var allMixinsExist = every(wdnMixins, function(value) {
return fs.existsSync(lessVendorDir + '/' + value);
});
var lessFiles = {};
cssFiles.forEach(function(file) {
lessFiles[cssDir + '/' + file + '.css'] = lessDir + '/' + file + '.less';
});
var builtJsFiles = {};
builtJsFiles[jsDir + '/search.min.js'] = jsFiles;
var autoprefixPlugin = new (require('less-plugin-autoprefix'))({browsers: ["last 2 versions"]});
var cleanCssPlugin = new (require('less-plugin-clean-css'))();
// load all grunt tasks matching the ['grunt-*', '@*/grunt-*'] patterns
require('load-grunt-tasks')(grunt);
grunt.initConfig({
'curl-dir': {
'less-libs': {
src: wdnMixins.map(function(file) {
return wdnMixinLibBaseUrl + file;
}),
dest: lessVendorDir
}
},
less: {
all: {
options: {
paths: [lessDir],
plugins: [
autoprefixPlugin,
cleanCssPlugin
]
},
files: lessFiles
}
},
uglify: {
options: {
sourceMap: true
},
all: {
files: builtJsFiles
}
},
requirejs: {
all: {
options: {
appDir: 'www/js/embed-src/',
baseUrl: './',
dir: 'www/js/embed/',
optimize: 'uglify2',
logLevel: 2,
preserveLicenseComments: false,
generateSourceMaps: true,
paths: {
'requireLib': 'require'
},
map: {
"*": {
css: 'require-css/css'
}
},
modules: [
{
name: 'all',
create: true,
include: ['requireLib', 'require-css/css', 'ga', 'main'],
exclude: ['require-css/normalize']
}
]
}
}
},
clean: {
css: Object.keys(lessFiles).concat(lessVendorDir),
js: Object.keys(builtJsFiles).concat(jsDir + '/**/*.map')
},
watch: {
less: {
files: lessDir + '/**/*.less',
tasks: ['less']
}
}
});
// establish grunt default
var defaultTasks = ['less', 'uglify', 'requirejs'];
var localTasks = defaultTasks.slice();
if (!allMixinsExist) {
defaultTasks.unshift('curl-dir');
}
grunt.registerTask('default', defaultTasks);
grunt.registerTask('all-local', localTasks);
// legacy targets from Makefile
grunt.registerTask('all', ['default']);
grunt.registerTask('js', ['uglify']);
};
SHELL := /bin/bash
CURL := curl
# NodeJS Find/Install
NODE_PATH = $(shell ./find-node-or-install)
PATH := $(NODE_PATH):$(shell echo $$PATH)
# External Build Tools
NODE_DIR = node_modules
LESSC = $(NODE_DIR)/less/bin/lessc
UGLIFYJS = $(NODE_DIR)/uglify-js/bin/uglifyjs
# Local Vars
LESS_LIB = www/less/lib
# External Dependencies
LESSHAT := $(LESS_LIB)/lesshat.less
WDN_MIXINS := \
$(LESS_LIB)/breakpoints.less \
$(LESS_LIB)/colors.less \
$(LESS_LIB)/fonts.less
WDN_LIB_RAW = https://raw.githubusercontent.com/unl/wdntemplates/master/wdn/templates_4.0/less/_mixins/
LESSHAT_RAW = https://raw.githubusercontent.com/csshat/lesshat/c8c211b2442734bfc1ae2509ff0ccebdc2e73664/build/lesshat.less
# Built Files
CSS_OBJ = www/css/search.css
JS_OBJ = www/js/search.min.js
all: less js
less: $(CSS_OBJ)
js: $(JS_OBJ)
clean:
rm -r $(NODE_DIR)
rm -r $(LESS_LIB)
rm $(JS_OBJ)
rm $(CSS_OBJ)
$(CSS_OBJ): www/less/search.less $(LESSC) $(LESSHAT) $(WDN_MIXINS)
$(LESSC) --clean-css $< $@
$(LESSC):
npm install less less-plugin-clean-css
$(LESS_LIB)/%.less:
@mkdir -p $(@D)
$(CURL) -s $(WDN_LIB_RAW)$(@F) -o $@
$(LESSHAT):
@mkdir -p $(@D)
$(CURL) -s $(LESSHAT_RAW) -o $@
$(UGLIFYJS):
npm install uglify-js
$(JS_OBJ): www/js/search.js $(UGLIFYJS)
$(UGLIFYJS) -c -m -o $@ -p 2 --source-map $(<).map --source-map-url $(<F).map $<
.PHONY: all less js clean
{
"autoload": {
"psr-0": {
"UNL": "src/"
}
},
"require": {
"unl/php-wdn-templates": "^4.1",
"ezyang/htmlpurifier": "^4.7"
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "2d845b7f75c033016d222d604c9c8c3b",
"hash": "f17d4e9d564c0acba4f1de21967b413c",
"content-hash": "c6195cd1756aa110358f46cb9356f29b",
"packages": [
{
......@@ -53,16 +53,16 @@
},
{
"name": "unl/php-dwt-parser",
"version": "v1.0.0",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/unl/phpdwtparser.git",
"reference": "0b49f94c19fb21299fe768ada2ac64989b7c6fbb"
"reference": "1de8770c4d8675771d1529c2f81d96e0aa51931f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/unl/phpdwtparser/zipball/0b49f94c19fb21299fe768ada2ac64989b7c6fbb",
"reference": "0b49f94c19fb21299fe768ada2ac64989b7c6fbb",
"url": "https://api.github.com/repos/unl/phpdwtparser/zipball/1de8770c4d8675771d1529c2f81d96e0aa51931f",
"reference": "1de8770c4d8675771d1529c2f81d96e0aa51931f",
"shasum": ""
},
"require": {
......@@ -100,7 +100,7 @@
],
"description": "A PHP library for parsing DWT files and turning them into PHP classes",
"homepage": "http://wdn.unl.edu/",
"time": "2015-12-14 23:51:40"
"time": "2016-01-05 21:35:46"
},
{
"name": "unl/php-wdn-templates",
......@@ -208,16 +208,16 @@
},
{
"name": "zendframework/zend-code",
"version": "2.6.1",
"version": "2.6.2",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-code.git",
"reference": "f6c2713c9c5628ccce62d5db3a129c7066af06df"
"reference": "c4e8f976a772cfb14b47dabd69b5245a423082b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-code/zipball/f6c2713c9c5628ccce62d5db3a129c7066af06df",
"reference": "f6c2713c9c5628ccce62d5db3a129c7066af06df",
"url": "https://api.github.com/repos/zendframework/zend-code/zipball/c4e8f976a772cfb14b47dabd69b5245a423082b4",
"reference": "c4e8f976a772cfb14b47dabd69b5245a423082b4",
"shasum": ""
},
"require": {
......@@ -256,7 +256,7 @@
"code",
"zf2"
],
"time": "2015-11-24 15:49:25"
"time": "2016-01-05 05:58:37"
},
{
"name": "zendframework/zend-eventmanager",
......
......@@ -3,10 +3,7 @@
ini_set('display_errors', false);
error_reporting(E_ALL);
set_include_path(dirname(__FILE__).'/src:'.dirname(__FILE__).'/lib/php:'.get_include_path());
require_once 'UNL/Autoload.php';
require_once __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/autoload.php';
/* A Google Loader API Key is presumably needed to ensure proper functionality.
* Register for an API Key at http://code.google.com/apis/loader/signup.html
......
#!/bin/bash
##############################################################################
# Finds the bin directory where node and npm are installed, or installs a
# local copy of them in a temp folder if not found. Then outputs where they
# are.
#
# Usage and install instructions:
# https://github.com/hugojosefson/find-node-or-install
##############################################################################
# Creates temp dir which stays the same every time this script executes
function setTEMP_DIR()
{
local NEW_OS_SUGGESTED_TEMP_FILE=$(mktemp -t asdXXXXX)
local OS_ROOT_TEMP_DIR=$(dirname ${NEW_OS_SUGGESTED_TEMP_FILE})
rm ${NEW_OS_SUGGESTED_TEMP_FILE}
TEMP_DIR=${OS_ROOT_TEMP_DIR}/nvm
mkdir -p ${TEMP_DIR}
}
# Break on error
set -e
# Try to find node, but don't break if not found
NODE=$(which node || true)
if [[ -n "${NODE}" ]]; then
# Good. We found it.
echo $(dirname ${NODE})
else
# Did not find node. Better install it.
# Do it in a temp dir, which stays the same every time this script executes
setTEMP_DIR
cd ${TEMP_DIR}
# Do we have nvm here?
if [[ ! -d "nvm" ]]; then
git clone git://github.com/creationix/nvm.git >/dev/null
fi
# Clear and set NVM_* env variables to our installation
mkdir -p .nvm
export NVM_DIR=$( (cd .nvm && pwd) )
unset NVM_PATH
unset NVM_BIN
# Load nvm into current shell
. nvm/nvm.sh >/dev/null
# Install and use latest 0.10.* node
nvm install 0.10 >/dev/null
nvm alias default 0.10 >/dev/null
nvm use default >/dev/null
# Find and output node's bin directory
NODE=$(which node)
echo $(dirname ${NODE})
fi
<?xml version="1.0"?>
<pearconfig version="1.0"><php_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/php</php_dir><ext_dir>/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/</ext_dir><cfg_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/cfg</cfg_dir><doc_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/docs</doc_dir><bin_dir>/usr/local/bin</bin_dir><data_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/data</data_dir><www_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/www</www_dir><test_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/tests</test_dir><src_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/src</src_dir><php_bin>/usr/local/bin/php</php_bin><php_ini>/usr/local/lib/php.ini</php_ini><php_prefix></php_prefix><php_suffix></php_suffix></pearconfig>
<?xml version="1.0"?>
<pearconfig version="1.0"><php_dir>/Users/bbieber/Documents/workspace/UNL_Search/trunk/lib/php</php_dir><ext_dir>/usr/local/lib/php/extensions/no-debug-non-zts-20090626/</ext_dir><cfg_dir>/Users/bbieber/Documents/workspace/UNL_Search/trunk/lib/cfg</cfg_dir><doc_dir>/Users/bbieber/Documents/workspace/UNL_Search/trunk/lib/docs</doc_dir><bin_dir>/usr/local/bin</bin_dir><data_dir>/Users/bbieber/Documents/workspace/UNL_Search/trunk/lib/data</data_dir><www_dir>/Users/bbieber/Documents/workspace/UNL_Search/trunk/lib/www</www_dir><test_dir>/Users/bbieber/Documents/workspace/UNL_Search/trunk/lib/tests</test_dir><src_dir>/Users/bbieber/Documents/workspace/UNL_Search/trunk/lib/src</src_dir><php_bin>/usr/local/bin/php</php_bin><php_ini>/usr/local/lib/php.ini</php_ini><php_prefix></php_prefix><php_suffix></php_suffix></pearconfig>
<?xml version="1.0"?>
<pearconfig version="1.0"><php_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/php</php_dir><ext_dir>/usr/local/lib/php/extensions/no-debug-non-zts-20090626/</ext_dir><cfg_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/cfg</cfg_dir><doc_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/docs</doc_dir><bin_dir>/usr/local/bin</bin_dir><data_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/data</data_dir><www_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/www</www_dir><test_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/tests</test_dir><src_dir>/Users/bbieber/Documents/workspace/UNL_Search/lib/src</src_dir><php_bin>/usr/local/bin/php</php_bin><php_ini>/usr/local/lib/php.ini</php_ini><php_prefix></php_prefix><php_suffix></php_suffix></pearconfig>
<?xml version="1.0"?>
<pearconfig version="1.0"><php_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/php</php_dir><ext_dir>/usr/lib/php/extensions/no-debug-non-zts-20100525</ext_dir><cfg_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/cfg</cfg_dir><doc_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/docs</doc_dir><bin_dir>/usr/bin</bin_dir><data_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/data</data_dir><www_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/www</www_dir><test_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/tests</test_dir><src_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/src</src_dir><php_bin>/usr/bin/php</php_bin><php_ini>/etc/php.ini</php_ini><php_prefix></php_prefix><php_suffix></php_suffix></pearconfig>
<?xml version="1.0" encoding="UTF-8"?>
<channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/channel-1.0http://pear.php.net/dtd/channel-1.0.xsd">
<name>__uri</name>
<suggestedalias>__uri</suggestedalias>
<summary>Pseudo-channel for static packages</summary>
<servers>
<primary>
<xmlrpc>
<function version="1.0">****</function>
</xmlrpc>
</primary>
</servers>
</channel>
<?xml version="1.0" encoding="UTF-8"?>
<channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/channel-1.0http://pear.php.net/dtd/channel-1.0.xsd">
<name>doc.php.net</name>
<summary>PHP Documentation team</summary>
<suggestedalias>phpdocs</suggestedalias>
<servers>
<primary>
<rest>
<baseurl type="REST1.0">http://doc.php.net/rest/</baseurl>
<baseurl type="REST1.1">http://doc.php.net/rest/</baseurl>
</rest>
</primary>
</servers>
</channel>
<?xml version="1.0" encoding="UTF-8"?>
<channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/channel-1.0http://pear.php.net/dtd/channel-1.0.xsd">
<name>htmlpurifier.org</name>
<summary>PEAR channel for HTML Purifier library</summary>
<suggestedalias>hp</suggestedalias>
<servers>
<primary>
<rest>
<baseurl type="REST1.0">http://htmlpurifier.org/Chiara_PEAR_Server_REST/</baseurl>
<baseurl type="REST1.1">http://htmlpurifier.org/Chiara_PEAR_Server_REST/</baseurl>
</rest>
</primary>
</servers>
</channel>
<?xml version="1.0" encoding="UTF-8"?>
<channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/channel-1.0http://pear.php.net/dtd/channel-1.0.xsd">
<name>pear.php.net</name>
<suggestedalias>pear</suggestedalias>
<summary>PHP Extension and Application Repository</summary>
<servers>
<primary>
<rest>
<baseurl type="REST1.0">http://pear.php.net/rest/</baseurl>
<baseurl type="REST1.1">http://pear.php.net/rest/</baseurl>
<baseurl type="REST1.2">http://pear.php.net/rest/</baseurl>
<baseurl type="REST1.3">http://pear.php.net/rest/</baseurl>
</rest>
</primary>
<mirror host="us.pear.php.net">
<rest>
<baseurl type="REST1.0">http://us.pear.php.net/rest/</baseurl>
<baseurl type="REST1.1">http://us.pear.php.net/rest/</baseurl>
<baseurl type="REST1.2">http://us.pear.php.net/rest/</baseurl>
<baseurl type="REST1.3">http://us.pear.php.net/rest/</baseurl>
</rest>
</mirror>
<mirror host="de.pear.php.net" ssl="yes" port="3452">
<rest>
<baseurl type="REST1.0">https://de.pear.php.net:3452/rest/</baseurl>
<baseurl type="REST1.1">https://de.pear.php.net:3452/rest/</baseurl>
<baseurl type="REST1.2">https://de.pear.php.net:3452/rest/</baseurl>
<baseurl type="REST1.3">https://de.pear.php.net:3452/rest/</baseurl>
</rest>
</mirror>
</servers>
</channel>
<?xml version="1.0" encoding="UTF-8"?>
<channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/channel-1.0http://pear.php.net/dtd/channel-1.0.xsd">
<name>pear.unl.edu</name>
<summary>UNL PHP Extension and Application Repository</summary>
<suggestedalias>unl</suggestedalias>
<servers>
<primary>
<rest>
<baseurl type="REST1.0">http://pear.unl.edu/Chiara_PEAR_Server_REST/</baseurl>
<baseurl type="REST1.1">http://pear.unl.edu/Chiara_PEAR_Server_REST/</baseurl>
<baseurl type="REST1.3">http://pear.unl.edu/Chiara_PEAR_Server_REST/</baseurl>
</rest>
</primary>
</servers>
</channel>
<?xml version="1.0" encoding="UTF-8"?>
<channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/channel-1.0http://pear.php.net/dtd/channel-1.0.xsd">
<name>pear2.php.net</name>
<suggestedalias>pear2</suggestedalias>
<summary>PEAR packages for PHP 5.3+ installed by Pyrus</summary>
<servers>
<primary>
<rest>
<baseurl type="REST1.0">http://pear2.php.net/rest/</baseurl>
<baseurl type="REST1.1">http://pear2.php.net/rest/</baseurl>
<baseurl type="REST1.2">http://pear2.php.net/rest/</baseurl>
<baseurl type="REST1.3">http://pear2.php.net/rest/</baseurl>
</rest>
</primary>
</servers>
</channel>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment