From e9e8612611fe017862fc25957f904d8ae34baede Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 2 Dec 2016 16:02:47 -0800 Subject: [PATCH] GUACAMOLE-136: Minify JavaScript and CSS. Add templates to Angular's cache. --- extensions/guacamole-auth-duo/.gitignore | 1 + extensions/guacamole-auth-duo/pom.xml | 80 +++++++++++++++++++ .../src/main/resources/guac-manifest.json | 11 +-- .../src/main/resources/license.txt | 18 +++++ 4 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 extensions/guacamole-auth-duo/src/main/resources/license.txt diff --git a/extensions/guacamole-auth-duo/.gitignore b/extensions/guacamole-auth-duo/.gitignore index 42f4a1a64..1de9633ae 100644 --- a/extensions/guacamole-auth-duo/.gitignore +++ b/extensions/guacamole-auth-duo/.gitignore @@ -1,2 +1,3 @@ +src/main/resources/generated/ target/ *~ diff --git a/extensions/guacamole-auth-duo/pom.xml b/extensions/guacamole-auth-duo/pom.xml index 4c1fdf6a1..a55e54f4d 100644 --- a/extensions/guacamole-auth-duo/pom.xml +++ b/extensions/guacamole-auth-duo/pom.xml @@ -34,6 +34,86 @@ + + + com.keithbranton.mojo + angular-maven-plugin + 0.3.2 + + + generate-resources + + html2js + + + + + ${basedir}/src/main/resources + **/*.html + ${basedir}/src/main/resources/generated/templates-main/templates.js + app/ext/duo + + + + + + com.samaxes.maven + minify-maven-plugin + 1.7.5 + + + default-cli + + UTF-8 + + ${basedir}/src/main/resources + ${project.build.directory}/classes + + / + / + duo.css + + + license.txt + + + + **/*.css + + + / + / + duo.js + + + license.txt + lib/DuoWeb/LICENSE.js + + + + **/*.js + + + + + **/*.test.js + + CLOSURE + + + + OFF + OFF + + + + + minify + + + + + org.apache.maven.plugins diff --git a/extensions/guacamole-auth-duo/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-duo/src/main/resources/guac-manifest.json index ff8fab2a0..27658a827 100644 --- a/extensions/guacamole-auth-duo/src/main/resources/guac-manifest.json +++ b/extensions/guacamole-auth-duo/src/main/resources/guac-manifest.json @@ -14,18 +14,11 @@ ], "js" : [ - - "duoModule.js", - "controllers/duoSignedResponseController.js", - "config/duoConfig.js", - - "lib/DuoWeb/LICENSE.js", - "lib/DuoWeb/Duo-Web-v2.js" - + "duo.min.js" ], "css" : [ - "styles/duo.css" + "duo.min.css" ], "resources" : { diff --git a/extensions/guacamole-auth-duo/src/main/resources/license.txt b/extensions/guacamole-auth-duo/src/main/resources/license.txt new file mode 100644 index 000000000..042f3ce1f --- /dev/null +++ b/extensions/guacamole-auth-duo/src/main/resources/license.txt @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */