This is an automated email from the ASF dual-hosted git repository. heneveld pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
commit 62247c61558fe653b5b7d74e2f0e7a49dbd883ee Author: Alex Heneveld <[email protected]> AuthorDate: Mon May 17 16:43:08 2021 +0100 use a shared Makefile, and clean/install utils as part of other projects by default --- ui-modules/README.md | 5 ++-- ui-modules/app-inspector/Makefile | 32 +--------------------- ui-modules/blueprint-composer/Makefile | 32 +--------------------- ui-modules/blueprint-importer/Makefile | 32 +--------------------- ui-modules/catalog/Makefile | 32 +--------------------- ui-modules/groovy-console/Makefile | 32 +--------------------- ui-modules/home/Makefile | 32 +--------------------- ui-modules/location-manager/Makefile | 32 +--------------------- ui-modules/logout/Makefile | 32 +--------------------- ui-modules/rest-api-docs/Makefile | 32 +--------------------- .../{catalog/Makefile => shared/Makefile.include} | 22 ++++++++++++--- 11 files changed, 30 insertions(+), 285 deletions(-) diff --git a/ui-modules/README.md b/ui-modules/README.md index 6134c51..9e0a71d 100644 --- a/ui-modules/README.md +++ b/ui-modules/README.md @@ -4,10 +4,11 @@ Each of the module UI projects in this directory has a `Makefile` to make working with it easier. -To install node dependencies (any anytime things get out of sync wipe `node_modules` and do this again): +To install node dependencies (and anytime things get out of sync, to wipe `node_modules` in the local dir and the `../utils`; +also see `local_clean` and `local_install` if you know `../utils` is updated and want to skip that update): ```sh -make install +make clean install ``` To run a local development server: diff --git a/ui-modules/app-inspector/Makefile b/ui-modules/app-inspector/Makefile old mode 100755 new mode 100644 index c7cb424..2bc7724 --- a/ui-modules/app-inspector/Makefile +++ b/ui-modules/app-inspector/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/blueprint-composer/Makefile b/ui-modules/blueprint-composer/Makefile index c7cb424..2bc7724 100644 --- a/ui-modules/blueprint-composer/Makefile +++ b/ui-modules/blueprint-composer/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/blueprint-importer/Makefile b/ui-modules/blueprint-importer/Makefile index c7cb424..2bc7724 100755 --- a/ui-modules/blueprint-importer/Makefile +++ b/ui-modules/blueprint-importer/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/catalog/Makefile b/ui-modules/catalog/Makefile index c7cb424..2bc7724 100644 --- a/ui-modules/catalog/Makefile +++ b/ui-modules/catalog/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/groovy-console/Makefile b/ui-modules/groovy-console/Makefile index c7cb424..2bc7724 100755 --- a/ui-modules/groovy-console/Makefile +++ b/ui-modules/groovy-console/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/home/Makefile b/ui-modules/home/Makefile index c7cb424..2bc7724 100644 --- a/ui-modules/home/Makefile +++ b/ui-modules/home/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/location-manager/Makefile b/ui-modules/location-manager/Makefile index c7cb424..2bc7724 100644 --- a/ui-modules/location-manager/Makefile +++ b/ui-modules/location-manager/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/logout/Makefile b/ui-modules/logout/Makefile index c7cb424..2bc7724 100644 --- a/ui-modules/logout/Makefile +++ b/ui-modules/logout/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/rest-api-docs/Makefile b/ui-modules/rest-api-docs/Makefile index c7cb424..2bc7724 100755 --- a/ui-modules/rest-api-docs/Makefile +++ b/ui-modules/rest-api-docs/Makefile @@ -15,35 +15,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -default: dev -build: - @echo "Building production bundle..." - NODE_ENV="production" npm run build - -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules - -dev: - @echo "Starting dev web server..." - @npm start - -server: build - @echo "Starting api proxy server..." - NODE_ENV="production" npm start - -install: - @echo "Installing npm modules..." - @npm install - -test: - @echo "Running tests..." - @npm test - -setup: clean install - -war: - @mvn clean install - -.PHONY: build clean deploy dev install server setup test war +include ../shared/Makefile.include diff --git a/ui-modules/catalog/Makefile b/ui-modules/shared/Makefile.include similarity index 78% copy from ui-modules/catalog/Makefile copy to ui-modules/shared/Makefile.include index c7cb424..ea02669 100644 --- a/ui-modules/catalog/Makefile +++ b/ui-modules/shared/Makefile.include @@ -17,13 +17,25 @@ # under the License. default: dev +utils_clean: + @echo "Cleaning utils modules..." + cd ../utils + rm -rf ./node_modules + +utils_install: + @echo "Installing utils npm modules..." + cd ../utils + npm install + build: @echo "Building production bundle..." NODE_ENV="production" npm run build -clean: - @echo "Cleaning modules..." - @rm -rf ./node_modules +local_clean: + @echo "Cleaning modules and builds..." + @rm -rf ./node_modules ./dist + +clean: utils_clean local_clean dev: @echo "Starting dev web server..." @@ -33,10 +45,12 @@ server: build @echo "Starting api proxy server..." NODE_ENV="production" npm start -install: +local_install: @echo "Installing npm modules..." @npm install +install: utils_install local_install + test: @echo "Running tests..." @npm test
