From d64a4e03cc1294fe83b9b0a273d02becb2f09aa1 Mon Sep 17 00:00:00 2001 From: Soumya Deb Date: Mon, 15 Jan 2018 16:54:44 +0530 Subject: [PATCH] chore(scripts): update references to npm scripts to adopt new syntax --- README.adoc | 4 ++-- docker-compose.f8ui.yml | 2 +- docker-compose.yml | 2 +- docs/building_planner.adoc | 4 ++-- scripts/bootstrap.sh | 2 +- scripts/local_docker.sh | 2 +- scripts/local_docker2.sh | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.adoc b/README.adoc index d0d4f3571..8835f0531 100644 --- a/README.adoc +++ b/README.adoc @@ -72,7 +72,7 @@ The following table lists some of the most useful or frequently used scripts and |Cleans the dependencies and reinstalls them |Unit Tests -|`$ npm run test:unit` +|`$ npm run tests -- --unit` |Runs the unit tests |Semantic Release @@ -80,7 +80,7 @@ The following table lists some of the most useful or frequently used scripts and |Builds the library and performs a semantic release to npmjs |Continuous Build -|`$ npm run watch:library` +|`$ npm run build -- --watch` |Runs the build in watch mode, watches for changes and rebuilds source |=== diff --git a/docker-compose.f8ui.yml b/docker-compose.f8ui.yml index 527a80775..5a999979a 100644 --- a/docker-compose.f8ui.yml +++ b/docker-compose.f8ui.yml @@ -4,7 +4,7 @@ services: planner: container_name: fabric8-planner-platform image: fabric8-planner-platform - # command: npm run test:unit + # command: npm run tests -- --unit environment: # $PROXY_PASS_URL is required by the nginx-config file # It's set by pipeline-library in CI & is emulated here diff --git a/docker-compose.yml b/docker-compose.yml index fc389de65..e1560fe54 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: . container_name: fabric8-planner-runtime image: fabric8-planner-runtime - # command: npm run test:unit + # command: npm run tests -- --unit environment: FABRIC8_WIT_API_URL: http://localhost:8080/api/ FABRIC8_SSO_API_URL: https://sso.prod-preview.openshift.io/ diff --git a/docs/building_planner.adoc b/docs/building_planner.adoc index 6011cbb3d..82ce91291 100644 --- a/docs/building_planner.adoc +++ b/docs/building_planner.adoc @@ -67,7 +67,7 @@ NOTE: You may need to have root access to run the following commands. + [sh] ---- -npm run watch:library +npm run build -- --watch ---- . Change directory to *_runtime_* and get the dependencies for planner runtime. @@ -129,7 +129,7 @@ To *integrate planner with Fabric8 UI environment*, the steps are quite similar + [sh] ---- -npm run watch:library +npm run build -- --watch ---- . Change directory to the webapp into which you want to embed the Planner library (let's use Fabric8 UI in this example) and ensure that you have installed the npm package. diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 5ca6099d1..501d71b81 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -86,7 +86,7 @@ then else echo "Building planner library..." npm install - npm run build:library + npm run build fi echo "Starting docker..." diff --git a/scripts/local_docker.sh b/scripts/local_docker.sh index bf2368b0f..269cd00f0 100755 --- a/scripts/local_docker.sh +++ b/scripts/local_docker.sh @@ -3,7 +3,7 @@ docker build -t fabric8-ui-builder -f Dockerfile . mkdir -p runtime/dist && docker run --detach=true --name=fabric8-ui-builder -e "API_URL=http://demo.api.openshift.io/api/" -t -v $(pwd)/runtime/dist:/dist:Z fabric8-ui-builder docker exec fabric8-ui-builder npm install -docker exec fabric8-ui-builder npm run test:unit +docker exec fabric8-ui-builder npm run tests -- --unit if [[ "$1" == "functionalTests" ]]; then echo "Running functional tests..." diff --git a/scripts/local_docker2.sh b/scripts/local_docker2.sh index ba57ce492..c8e27c5bc 100755 --- a/scripts/local_docker2.sh +++ b/scripts/local_docker2.sh @@ -4,7 +4,7 @@ set -x docker build -t fabric8-planner-builder -f Dockerfile . mkdir -p runtime/dist && docker run --detach=true --name=fabric8-planner-builder --user=root --cap-add=SYS_ADMIN -t -v $(pwd)/runtime/dist:/dist:Z fabric8-planner-builder docker exec fabric8-planner-builder npm install -docker exec fabric8-planner-builder npm run test:unit +docker exec fabric8-planner-builder npm run tests -- --unit docker exec fabric8-planner-builder npm run build docker exec fabric8-planner-builder bash -c "cd runtime ; npm link ../dist" docker exec -i fabric8-planner-builder bash -c "cd runtime ; npm install"