Repository: brooklyn-ui Updated Branches: refs/heads/master 5556aaf90 -> c5e56897e
rename js "conf" files to end in js and include header Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/3637aed2 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/3637aed2 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/3637aed2 Branch: refs/heads/master Commit: 3637aed227fa9b01421ac1d16bdc088a428f76ee Parents: 5556aaf Author: Alex Heneveld <alex.henev...@cloudsoftcorp.com> Authored: Tue Nov 8 11:08:18 2016 +0000 Committer: Alex Heneveld <alex.henev...@cloudsoftcorp.com> Committed: Tue Nov 8 11:10:17 2016 +0000 ---------------------------------------------------------------------- pom.xml | 21 ++++++++++++--------- src/build/optimize-css.conf.js | 28 ++++++++++++++++++++++++++++ src/build/optimize-css.json | 12 ------------ src/build/optimize-js.conf.js | 35 +++++++++++++++++++++++++++++++++++ src/build/optimize-js.json | 19 ------------------- 5 files changed, 75 insertions(+), 40 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/3637aed2/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 4f6de0e..143c8bb 100644 --- a/pom.xml +++ b/pom.xml @@ -257,13 +257,6 @@ Copy of swagger-ui from https://github.com/swagger-api/swagger-ui tag::v2.1.3 --> <exclude>**/src/main/webapp/assets/swagger-ui/**</exclude> - - <!-- - Trivial Json controlling the build, "without any degree of creativity". - Json does not support comments, therefore far easier to just omit the license header! - --> - <exclude>**//src/build/optimize-css.json</exclude> - <exclude>**//src/build/optimize-js.json</exclude> </excludes> </configuration> </plugin> @@ -313,6 +306,16 @@ </lifecycleMappingMetadata> </configuration> </plugin> + <plugin> + <!-- maven knows there is nothing to compile; but eclipse complains if this block is absent --> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.3</version> + <configuration> + <source>1.7</source> + <target>1.7</target> + </configuration> + </plugin> </plugins> </pluginManagement> </build> @@ -421,7 +424,7 @@ <goal>optimize</goal> </goals> <configuration> - <configFile>${project.basedir}/src/build/optimize-js.json</configFile> + <configFile>${project.basedir}/src/build/optimize-js.conf.js</configFile> </configuration> </execution> <execution> @@ -431,7 +434,7 @@ <goal>optimize</goal> </goals> <configuration> - <configFile>${project.basedir}/src/build/optimize-css.json</configFile> + <configFile>${project.basedir}/src/build/optimize-css.conf.js</configFile> </configuration> </execution> </executions> http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/3637aed2/src/build/optimize-css.conf.js ---------------------------------------------------------------------- diff --git a/src/build/optimize-css.conf.js b/src/build/optimize-css.conf.js new file mode 100644 index 0000000..e0e2bc2 --- /dev/null +++ b/src/build/optimize-css.conf.js @@ -0,0 +1,28 @@ +// 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. +({ + cssIn: "${project.build.webapp}/assets/css/styles.css", + out: "${project.build.webapp}/assets/css/styles.min.css", + + // CSS optimization options are: + // - "standard": @import inlining, comment removal and line returns. + // - "standard.keepLines": like "standard" but keeps line returns. + // - "standard.keepComments": keeps the file comments, but removes line returns. + // - "standard.keepComments.keepLines": keeps the file comments and line returns. + // - "none": skip CSS optimizations. + optimizeCss: "standard" +}) http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/3637aed2/src/build/optimize-css.json ---------------------------------------------------------------------- diff --git a/src/build/optimize-css.json b/src/build/optimize-css.json deleted file mode 100644 index d27d7ac..0000000 --- a/src/build/optimize-css.json +++ /dev/null @@ -1,12 +0,0 @@ -({ - cssIn: "${project.build.webapp}/assets/css/styles.css", - out: "${project.build.webapp}/assets/css/styles.min.css", - - // CSS optimization options are: - // - "standard": @import inlining, comment removal and line returns. - // - "standard.keepLines": like "standard" but keeps line returns. - // - "standard.keepComments": keeps the file comments, but removes line returns. - // - "standard.keepComments.keepLines": keeps the file comments and line returns. - // - "none": skip CSS optimizations. - optimizeCss: "standard" -}) http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/3637aed2/src/build/optimize-js.conf.js ---------------------------------------------------------------------- diff --git a/src/build/optimize-js.conf.js b/src/build/optimize-js.conf.js new file mode 100644 index 0000000..ca1f987 --- /dev/null +++ b/src/build/optimize-js.conf.js @@ -0,0 +1,35 @@ +// 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. +({ + // The entry point to the application. Brooklyn's is in config.js. + name: "config", + baseUrl: "${project.build.webapp}/assets/js", + mainConfigFile: "${project.build.webapp}/assets/js/config.js", + paths: { + // Include paths to external resources (e.g. on a CDN) here. + + // Optimiser looks for js/requireLib.js by default. + "requireLib": "libs/require" + }, + + // Place the optimised file in target/<war>/assets. + out: "${project.build.webapp}/assets/js/gui.all.min.js", + + // Set to "none" to skip minification + optimize: "uglify" +}) + http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/3637aed2/src/build/optimize-js.json ---------------------------------------------------------------------- diff --git a/src/build/optimize-js.json b/src/build/optimize-js.json deleted file mode 100644 index 9cca776..0000000 --- a/src/build/optimize-js.json +++ /dev/null @@ -1,19 +0,0 @@ -({ - // The entry point to the application. Brooklyn's is in config.js. - name: "config", - baseUrl: "${project.build.webapp}/assets/js", - mainConfigFile: "${project.build.webapp}/assets/js/config.js", - paths: { - // Include paths to external resources (e.g. on a CDN) here. - - // Optimiser looks for js/requireLib.js by default. - "requireLib": "libs/require" - }, - - // Place the optimised file in target/<war>/assets. - out: "${project.build.webapp}/assets/js/gui.all.min.js", - - // Set to "none" to skip minification - optimize: "uglify" -}) -