From 1b745dc7b7d754fa11f070d58eace6699a373dbf Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 20 Jul 2018 18:29:28 -0600 Subject: [PATCH] Update the publish.sh script --- tasks/publish.sh | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/tasks/publish.sh b/tasks/publish.sh index 4ae20c9c95..eff9d57145 100755 --- a/tasks/publish.sh +++ b/tasks/publish.sh @@ -8,15 +8,9 @@ set -o errexit # -# All profiles to be built. Must correspond to .json files in the config -# directory. +# Destination directory for the package. # -PROFILES="ol ol-debug" - -# -# Destination directory for builds. -# -BUILDS=dist +BUILT_PACKAGE=build/ol # # URL for canonical repo. @@ -61,21 +55,6 @@ assert_version_match() { fi } -# -# Build all of the distribution profiles. -# -build_js() { - for p in ${@}; do - echo building ${BUILDS}/${p}.js - node ./tasks/build.js config/${p}.json ${BUILDS}/${p}.js - done -} - -build_css() { - ./node_modules/.bin/cleancss css/ol.css -o ${BUILDS}/ol.css - cp css/ol.css ${BUILDS}/ol-debug.css -} - # # Check out the provided tag. This ensures that the tag has been pushed to # the canonical remote. @@ -86,7 +65,7 @@ checkout_tag() { } # -# Build all profiles and publish. +# Build the package and publish. # main() { root=$(cd -P -- "$(dirname -- "${0}")" && pwd -P)/.. @@ -94,10 +73,9 @@ main() { assert_clean checkout_tag ${1} assert_version_match ${1} - rm -rf ${BUILDS} npm install - build_js ${PROFILES} - build_css + npm run build-package + cd ${BUILT_PACKAGE} npm publish }