From 757ebb5d9fdc24757f199e52575f32f6faf091b3 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 25 Mar 2020 14:09:47 +0100 Subject: [fix] brands: add variables from build env to grunt process We have some variables in the build environment which are also needed in the grunt process when building themes. Theses variables are relavant if one creates a fork with its own branding. We treat these variables under the term 'brands'. Signed-off-by: Markus Heiser --- searx/static/themes/oscar/gruntfile.js | 4 +--- searx/static/themes/simple/gruntfile.js | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'searx/static') diff --git a/searx/static/themes/oscar/gruntfile.js b/searx/static/themes/oscar/gruntfile.js index def035dba..606b6bcfb 100644 --- a/searx/static/themes/oscar/gruntfile.js +++ b/searx/static/themes/oscar/gruntfile.js @@ -13,7 +13,7 @@ module.exports = function(grunt) { }, uglify: { options: { - banner: '/*! oscar/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n' + banner: '/*! oscar/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' }, dist: { files: { @@ -38,7 +38,6 @@ module.exports = function(grunt) { development: { options: { paths: ["less/pointhi", "less/logicodev", "less/logicodev-dark"] - //banner: '/*! less/oscar/oscar.css | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n' }, files: {"css/pointhi.css": "less/pointhi/oscar.less", "css/logicodev.css": "less/logicodev-dark/oscar.less", @@ -47,7 +46,6 @@ module.exports = function(grunt) { production: { options: { paths: ["less/pointhi", "less/logicodev", "less/logicodev-dark"], - //banner: '/*! less/oscar/oscar.css | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n', cleancss: true }, files: {"css/pointhi.min.css": "less/pointhi/oscar.less", diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index c372ec730..c8f2ed3c6 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -36,7 +36,7 @@ module.exports = function(grunt) { }, uglify: { options: { - banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n', + banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n', output: { comments: 'some' }, @@ -57,7 +57,7 @@ module.exports = function(grunt) { development: { options: { paths: ["less"], - banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n' + banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' }, files: { "css/searx.css": "less/style.less", @@ -73,7 +73,7 @@ module.exports = function(grunt) { compatibility: '*' }) ], - banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n' + banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' }, files: { "css/searx.min.css": "less/style.less", -- cgit v1.2.3 From d471ec86dd72cfae80bdaf72b1ed266b1a8cada7 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 25 Mar 2020 16:38:52 +0100 Subject: Makefile: add target node.env - download & install npm dependencies Signed-off-by: Markus Heiser --- searx/static/themes/oscar/.gitignore | 3 ++- searx/static/themes/simple/.gitignore | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 searx/static/themes/simple/.gitignore (limited to 'searx/static') diff --git a/searx/static/themes/oscar/.gitignore b/searx/static/themes/oscar/.gitignore index c2658d7d1..49e0fc6b4 100644 --- a/searx/static/themes/oscar/.gitignore +++ b/searx/static/themes/oscar/.gitignore @@ -1 +1,2 @@ -node_modules/ +/node_modules +/package-lock.json \ No newline at end of file diff --git a/searx/static/themes/simple/.gitignore b/searx/static/themes/simple/.gitignore new file mode 100644 index 000000000..49e0fc6b4 --- /dev/null +++ b/searx/static/themes/simple/.gitignore @@ -0,0 +1,2 @@ +/node_modules +/package-lock.json \ No newline at end of file -- cgit v1.2.3 From 6846402d734c9f4f7fb68fb3980aa2ada5adb763 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 26 Mar 2020 15:35:32 +0100 Subject: .gitignore: make package-lock.json visible Even if we do not versioning them right now. Signed-off-by: Markus Heiser --- searx/static/themes/oscar/.gitignore | 1 - searx/static/themes/simple/.gitignore | 1 - 2 files changed, 2 deletions(-) (limited to 'searx/static') diff --git a/searx/static/themes/oscar/.gitignore b/searx/static/themes/oscar/.gitignore index 49e0fc6b4..07e6e472c 100644 --- a/searx/static/themes/oscar/.gitignore +++ b/searx/static/themes/oscar/.gitignore @@ -1,2 +1 @@ /node_modules -/package-lock.json \ No newline at end of file diff --git a/searx/static/themes/simple/.gitignore b/searx/static/themes/simple/.gitignore index 49e0fc6b4..07e6e472c 100644 --- a/searx/static/themes/simple/.gitignore +++ b/searx/static/themes/simple/.gitignore @@ -1,2 +1 @@ /node_modules -/package-lock.json \ No newline at end of file -- cgit v1.2.3