Commit a208ced8 authored by Michael Fairchild's avatar Michael Fairchild
Browse files

Merge branch '4.1' into 'master'

4.1

Please don't merge until we are closer to launch.

Outstanding issues:
1. Styling of the search input group needs adjustment (button is not aligned correctly)
2. Testing

See merge request !6
parents e4c885de 1912cd50
......@@ -5,4 +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
......@@ -11,4 +11,4 @@ Querystring parameters:
To build and run this project:
1. Copy/Update config.sample.php to config.inc.php (see in-file documentation)
2. Run `make`
2. run `composer install && npm install && grunt`
{
"autoload": {
"psr-0": {
"UNL": "src/"
}
},
"require": {
"unl/php-wdn-templates": "^4.1",
"ezyang/htmlpurifier": "^4.7"
}
}
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "f17d4e9d564c0acba4f1de21967b413c",
"content-hash": "c6195cd1756aa110358f46cb9356f29b",
"packages": [
{
"name": "ezyang/htmlpurifier",
"version": "v4.7.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "ae1828d955112356f7677c465f94f7deb7d27a40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/ae1828d955112356f7677c465f94f7deb7d27a40",
"reference": "ae1828d955112356f7677c465f94f7deb7d27a40",
"shasum": ""
},
"require": {
"php": ">=5.2"
},
"type": "library",
"autoload": {
"psr-0": {
"HTMLPurifier": "library/"
},
"files": [
"library/HTMLPurifier.composer.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL"
],
"authors": [
{
"name": "Edward Z. Yang",
"email": "admin@htmlpurifier.org",
"homepage": "http://ezyang.com"
}
],
"description": "Standards compliant HTML filter written in PHP",
"homepage": "http://htmlpurifier.org/",
"keywords": [
"html"
],
"time": "2015-08-05 01:03:42"
},
{
"name": "unl/php-dwt-parser",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/unl/phpdwtparser.git",
"reference": "1de8770c4d8675771d1529c2f81d96e0aa51931f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/unl/phpdwtparser/zipball/1de8770c4d8675771d1529c2f81d96e0aa51931f",
"reference": "1de8770c4d8675771d1529c2f81d96e0aa51931f",
"shasum": ""
},
"require": {
"php": ">=5.5",
"zaininnari/html-minifier": "*",
"zendframework/zend-code": "^2.5"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"bin": [
"bin/createTemplates.php"
],
"type": "library",
"autoload": {
"psr-4": {
"UNL\\DWT\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Kevin Abel (kabel)",
"email": "kabel2@unl.edu",
"role": "Developer"
},
{
"name": "Brett Bieber (saltybeagle)",
"email": "brett.bieber@gmail.com",
"role": "Retired Developer"
}
],
"description": "A PHP library for parsing DWT files and turning them into PHP classes",
"homepage": "http://wdn.unl.edu/",
"time": "2016-01-05 21:35:46"
},
{
"name": "unl/php-wdn-templates",
"version": "v4.1.0",
"source": {
"type": "git",
"url": "https://github.com/unl/phpunltemplates.git",
"reference": "ddece80fce8611c22fa674a0f36eac3ddf4ca423"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/unl/phpunltemplates/zipball/ddece80fce8611c22fa674a0f36eac3ddf4ca423",
"reference": "ddece80fce8611c22fa674a0f36eac3ddf4ca423",
"shasum": ""
},
"require": {
"php": ">=5.5",
"unl/php-dwt-parser": "1.0.*"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"satooshi/php-coveralls": "^0.7.0"
},
"type": "library",
"autoload": {
"psr-4": {
"UNL\\Templates\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Kevin Abel (kabel)",
"email": "kabel2@unl.edu",
"role": "Developer"
},
{
"name": "Brett Bieber (saltybeagle)",
"email": "brett.bieber@gmail.com",
"role": "Retired Developer"
},
{
"name": "Ned Hummel (nhummel2)",
"email": "nhummel2@math.unl.edu",
"role": "Retired Developer"
}
],
"description": "A PHP library for rendering the UNL templates",
"homepage": "http://wdn.unl.edu/",
"time": "2015-12-15 00:14:04"
},
{
"name": "zaininnari/html-minifier",
"version": "0.4.2",
"source": {
"type": "git",
"url": "https://github.com/zaininnari/html-minifier.git",
"reference": "5b94d85705626f9bb33b7c667bc4400088ed4ece"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zaininnari/html-minifier/zipball/5b94d85705626f9bb33b7c667bc4400088ed4ece",
"reference": "5b94d85705626f9bb33b7c667bc4400088ed4ece",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"satooshi/php-coveralls": "dev-master"
},
"type": "library",
"autoload": {
"psr-0": {
"zz": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"The BSD 3-Clause License"
],
"authors": [
{
"name": "Google inc",
"homepage": "http://www.chromium.org/blink",
"role": "Author"
},
{
"name": "zaininnari",
"homepage": "https://github.com/zaininnari/",
"role": "Developer"
}
],
"description": "The Blink HTMLTokenizer ported to PHP.",
"homepage": "https://github.com/zaininnari/html-minifier",
"keywords": [
"Blink",
"HTML minify",
"php"
],
"time": "2015-08-18 14:10:55"
},
{
"name": "zendframework/zend-code",
"version": "2.6.2",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-code.git",
"reference": "c4e8f976a772cfb14b47dabd69b5245a423082b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-code/zipball/c4e8f976a772cfb14b47dabd69b5245a423082b4",
"reference": "c4e8f976a772cfb14b47dabd69b5245a423082b4",
"shasum": ""
},
"require": {
"php": ">=5.5",
"zendframework/zend-eventmanager": "^2.6|^3.0"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/phpunit": "~4.0",
"zendframework/zend-stdlib": "~2.7"
},
"suggest": {
"doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features",
"zendframework/zend-stdlib": "Zend\\Stdlib component"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6-dev",
"dev-develop": "2.7-dev"
}
},
"autoload": {
"psr-4": {
"Zend\\Code\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "provides facilities to generate arbitrary code using an object oriented interface",
"homepage": "https://github.com/zendframework/zend-code",
"keywords": [
"code",
"zf2"
],
"time": "2016-01-05 05:58:37"
},
{
"name": "zendframework/zend-eventmanager",
"version": "2.6.1",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-eventmanager.git",
"reference": "a03de810b99b0302059ab744c535d464b8dc4721"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/a03de810b99b0302059ab744c535d464b8dc4721",
"reference": "a03de810b99b0302059ab744c535d464b8dc4721",
"shasum": ""
},
"require": {
"php": ">=5.5",
"zendframework/zend-stdlib": "~2.5"
},
"require-dev": {
"athletic/athletic": "dev-master",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/phpunit": "~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6-dev",
"dev-develop": "3.0-dev"
}
},
"autoload": {
"psr-4": {
"Zend\\EventManager\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"homepage": "https://github.com/zendframework/zend-eventmanager",
"keywords": [
"eventmanager",
"zf2"
],
"time": "2015-10-06 11:53:40"
},
{
"name": "zendframework/zend-hydrator",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-hydrator.git",
"reference": "f3ed8b833355140350bbed98d8a7b8b66875903f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/f3ed8b833355140350bbed98d8a7b8b66875903f",
"reference": "f3ed8b833355140350bbed98d8a7b8b66875903f",
"shasum": ""
},
"require": {
"php": ">=5.5",
"zendframework/zend-stdlib": "^2.5.1"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "^2.0@dev",
"zendframework/zend-eventmanager": "^2.5.1",
"zendframework/zend-filter": "^2.5.1",
"zendframework/zend-inputfilter": "^2.5.1",
"zendframework/zend-serializer": "^2.5.1",
"zendframework/zend-servicemanager": "^2.5.1"
},
"suggest": {
"zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage",
"zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage",
"zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy",
"zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev",
"dev-develop": "1.1-dev"
}
},
"autoload": {
"psr-4": {
"Zend\\Hydrator\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"homepage": "https://github.com/zendframework/zend-hydrator",
"keywords": [
"hydrator",
"zf2"
],
"time": "2015-09-17 14:06:43"
},
{
"name": "zendframework/zend-stdlib",
"version": "2.7.4",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-stdlib.git",
"reference": "cae029346a33663b998507f94962eb27de060683"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cae029346a33663b998507f94962eb27de060683",
"reference": "cae029346a33663b998507f94962eb27de060683",
"shasum": ""
},
"require": {
"php": ">=5.5",
"zendframework/zend-hydrator": "~1.0"
},
"require-dev": {
"athletic/athletic": "~0.1",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/phpunit": "~4.0",
"zendframework/zend-config": "~2.5",
"zendframework/zend-eventmanager": "~2.5",
"zendframework/zend-filter": "~2.5",
"zendframework/zend-inputfilter": "~2.5",
"zendframework/zend-serializer": "~2.5",
"zendframework/zend-servicemanager": "~2.5"
},
"suggest": {
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
"zendframework/zend-filter": "To support naming strategy hydrator usage",
"zendframework/zend-serializer": "Zend\\Serializer component",
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev",
"dev-develop": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Zend\\Stdlib\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"homepage": "https://github.com/zendframework/zend-stdlib",
"keywords": [
"stdlib",
"zf2"
],
"time": "2015-10-15 15:57:32"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",