From 1f686848de20a70c89c646237baf139e17155e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Fri, 30 Oct 2015 12:33:40 +0100 Subject: [PATCH] Add taigaPlugins, used by taiga-front-extras --- .gitignore | 1 - app/coffee/app.coffee | 1 + app/plugins/.gitignore | 3 +++ app/plugins/main.coffee | 22 ++++++++++++++++++++++ gulpfile.js | 21 ++++++++++++++++++++- 5 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 app/plugins/.gitignore create mode 100644 app/plugins/main.coffee diff --git a/.gitignore b/.gitignore index ae661769..9fe650a7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,5 @@ app/coffee/modules/locales/locale*.coffee tags tmp/ app/config/main.coffee -app/plugins/taiga-front-extras scss-lint.log e2e/screenshots/ diff --git a/app/coffee/app.coffee b/app/coffee/app.coffee index 44e6b72c..f1e17b00 100644 --- a/app/coffee/app.coffee +++ b/app/coffee/app.coffee @@ -648,6 +648,7 @@ modules = [ "taigaProject", "taigaUserSettings", "taigaFeedback", + "taigaPlugins", "taigaIntegrations", "taigaComponents", # new modules diff --git a/app/plugins/.gitignore b/app/plugins/.gitignore new file mode 100644 index 00000000..61d16771 --- /dev/null +++ b/app/plugins/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!main.coffee diff --git a/app/plugins/main.coffee b/app/plugins/main.coffee new file mode 100644 index 00000000..b6b7d504 --- /dev/null +++ b/app/plugins/main.coffee @@ -0,0 +1,22 @@ +### +# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014 Jesús Espino Garcia +# Copyright (C) 2014 David Barragán Merino +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +# File: modules/backlog.coffee +### + +module = angular.module("taigaPlugins", ["ngRoute"]) diff --git a/gulpfile.js b/gulpfile.js index ab19bc08..066f2951 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -51,6 +51,7 @@ paths.jade = [ paths.htmlPartials = [ paths.tmp + "partials/**/*.html", paths.tmp + "modules/**/*.html", + paths.tmp + "plugins/**/*.html", "!" + paths.tmp + "partials/includes/**/*.html", "!" + paths.tmp + "/modules/**/includes/**/*.html" ]; @@ -81,6 +82,7 @@ paths.styles_dependencies = [ paths.css = [ paths.tmp + "styles/**/*.css", paths.tmp + "modules/**/*.css", + paths.tmp + "plugins/**/*.css" ]; paths.css_order = [ @@ -96,6 +98,7 @@ paths.css_order = [ paths.tmp + "styles/modules/**/*.css", paths.tmp + "modules/**/*.css", paths.tmp + "styles/shame/*.css", + paths.tmp + "plugins/**/*.css", paths.tmp + "themes/**/*.css" ]; @@ -127,7 +130,9 @@ paths.coffee_order = [ paths.app + "coffee/modules/user-settings/*.coffee", paths.app + "coffee/modules/integrations/*.coffee", paths.app + "modules/**/*.module.coffee", - paths.app + "modules/**/*.coffee" + paths.app + "modules/**/*.coffee", + paths.app + "plugins/*.coffee", + paths.app + "plugins/**/*.coffee" ]; paths.libs = [ @@ -480,6 +485,17 @@ gulp.task("copy-theme-images", function() { .pipe(gulp.dest(paths.dist + "/images/" + themes.current.name)); }); +gulp.task("copy-images-plugins", function() { + return gulp.src(paths.app + "/plugins/**/images/*") + .pipe(flatten()) + .pipe(gulp.dest(paths.dist + "/images/")); +}); + +gulp.task("copy-plugin-templates", function() { + return gulp.src(paths.app + "/plugins/**/templates/**/*.html") + .pipe(gulp.dest(paths.dist + "/plugins/")); +}); + gulp.task("copy-extras", function() { return gulp.src(paths.extras + "/*") .pipe(gulp.dest(paths.dist + "/")); @@ -490,6 +506,8 @@ gulp.task("copy", [ "copy-theme-fonts", "copy-images", "copy-theme-images", + "copy-images-plugins", + "copy-plugin-templates", "copy-svg", "copy-theme-svg", "copy-extras" @@ -509,6 +527,7 @@ gulp.task("express", function() { app.use("/svg", express.static(__dirname + "/dist/svg")); app.use("/partials", express.static(__dirname + "/dist/partials")); app.use("/fonts", express.static(__dirname + "/dist/fonts")); + app.use("/plugins", express.static(__dirname + "/dist/plugins")); app.use("/locales", express.static(__dirname + "/dist/locales")); app.use("/maps", express.static(__dirname + "/dist/maps"));