forked from zaclys/searxng
[fix] travis build : various fix about grunt builds
This commit is contained in:
parent
d0cebd6e77
commit
57dc6b625f
|
@ -15,10 +15,7 @@ before_install:
|
|||
- "sh -e /etc/init.d/xvfb start"
|
||||
- npm install less less-plugin-clean-css grunt-cli
|
||||
- export PATH=`pwd`/node_modules/.bin:$PATH
|
||||
- ls -l $VIRTUAL_ENV
|
||||
- ls -l $VIRTUAL_ENV/bin
|
||||
- ( cd searx/static/themes/oscar;npm install; cd - )
|
||||
- ( cd searx/static/themes/simple;npm install; cd - )
|
||||
- ./manage.sh grunt_packages
|
||||
- mkdir -p ~/drivers; export PATH=~/drivers:$PATH;
|
||||
- GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz";
|
||||
- FILE=`mktemp`; wget "$GECKODRIVER_URL" -qO $FILE && tar xz -C ~/drivers -f $FILE geckodriver; rm $FILE; chmod 777 ~/drivers/geckodriver;
|
||||
|
|
21
manage.sh
21
manage.sh
|
@ -5,6 +5,8 @@ PYTHONPATH=$BASE_DIR
|
|||
SEARX_DIR="$BASE_DIR/searx"
|
||||
ACTION=$1
|
||||
|
||||
cd $BASE_DIR
|
||||
|
||||
update_packages() {
|
||||
pip install -r "$BASE_DIR/requirements.txt"
|
||||
}
|
||||
|
@ -14,7 +16,7 @@ update_dev_packages() {
|
|||
pip install -r "$BASE_DIR/requirements-dev.txt"
|
||||
}
|
||||
|
||||
check_geckodriver() {
|
||||
install_geckodriver() {
|
||||
echo '[!] Checking geckodriver'
|
||||
set -e
|
||||
geckodriver -V 2>1 > /dev/null || NOTFOUND=1
|
||||
|
@ -73,13 +75,12 @@ tests() {
|
|||
set -e
|
||||
pep8_check
|
||||
unit_tests
|
||||
check_geckodriver
|
||||
install_geckodriver
|
||||
robot_tests
|
||||
set +e
|
||||
}
|
||||
|
||||
build_style() {
|
||||
# lessc -x "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
|
||||
lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
|
||||
}
|
||||
|
||||
|
@ -97,8 +98,19 @@ styles() {
|
|||
build_style themes/simple/less/style-rtl.less themes/simple/css/searx-rtl.min.css
|
||||
}
|
||||
|
||||
grunt_packages() {
|
||||
echo '[!] Grunt packages: install dependencies'
|
||||
cd $BASE_DIR/searx/static/themes/oscar
|
||||
npm install
|
||||
|
||||
cd $BASE_DIR/searx/static/themes/simple
|
||||
npm install
|
||||
}
|
||||
|
||||
grunt_build() {
|
||||
echo '[!] Grunt build : oscar theme'
|
||||
grunt --gruntfile "$SEARX_DIR/static/themes/oscar/gruntfile.js"
|
||||
echo '[!] Grunt build : simple theme'
|
||||
grunt --gruntfile "$SEARX_DIR/static/themes/simple/gruntfile.js"
|
||||
}
|
||||
|
||||
|
@ -112,6 +124,7 @@ help() {
|
|||
|
||||
Commands
|
||||
========
|
||||
grunt_packages - Download & install dependencies
|
||||
grunt_build - Build js files
|
||||
help - This text
|
||||
locales - Compile locales
|
||||
|
@ -123,7 +136,7 @@ Commands
|
|||
unit_tests - Run unit tests
|
||||
update_dev_packages - Check & update development and production dependency changes
|
||||
update_packages - Check & update dependency changes
|
||||
check_geckodriver - Check & download geckodriver (required for robot_tests)
|
||||
install_geckodriver - Download & install geckodriver if not already installed (required for robot_tests)
|
||||
"
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ module.exports = function(grunt) {
|
|||
jshint: {
|
||||
files: ['gruntfile.js', 'js/searx_src/*.js'],
|
||||
options: {
|
||||
reporterOutput: "",
|
||||
// options here to override JSHint defaults
|
||||
globals: {
|
||||
jQuery: true,
|
||||
|
@ -51,6 +52,8 @@ module.exports = function(grunt) {
|
|||
files: {"css/pointhi.min.css": "less/pointhi/oscar.less",
|
||||
"css/logicodev.min.css": "less/logicodev/oscar.less"}
|
||||
},
|
||||
/*
|
||||
// built with ./manage.sh styles
|
||||
bootstrap: {
|
||||
options: {
|
||||
paths: ["less/bootstrap"],
|
||||
|
@ -58,6 +61,7 @@ module.exports = function(grunt) {
|
|||
},
|
||||
files: {"css/bootstrap.min.css": "less/bootstrap/bootstrap.less"}
|
||||
},
|
||||
*/
|
||||
},
|
||||
watch: {
|
||||
scripts: {
|
||||
|
|
|
@ -34,6 +34,7 @@ module.exports = function(grunt) {
|
|||
jshint: {
|
||||
files: ['js/searx_src/*.js'],
|
||||
options: {
|
||||
reporterOutput: "",
|
||||
proto: true,
|
||||
// options here to override JSHint defaults
|
||||
globals: {
|
||||
|
|
Loading…
Reference in New Issue