Changeset 6d1b54b in OpenWorkouts-current


Ignore:
Timestamp:
Jan 24, 2019, 12:01:12 AM (4 years ago)
Author:
borja <borja@…>
Branches:
current, feature/docs, master
Children:
2f8a48f
Parents:
be40b02
Message:

(#7) - Added d3.js as a js component dependency

IMPORTANT: Remember to run js_deps in your existing environments:

./bin/js_deps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/js_deps

    rbe40b02 r6d1b54b  
    227227}
    228228
     229d3() {
     230    NAME="d3"
     231    VERSION=5.7.0
     232    URL=https://github.com/${NAME}/${NAME}/releases/download/v${VERSION}/${NAME}.zip
     233    check_cache ${NAME} ${VERSION}
     234    in_cache=$?
     235    if [ ${in_cache} -eq 0 -a ${REINSTALL} -eq 1 ]; then
     236        echo "${NAME}-${VERSION} $ALREADY_INSTALLED"
     237    else
     238        echo "> Installing ${NAME} ${VERSION}"
     239        if [ -d ${COMPONENTS}/${NAME} ]; then
     240            # Clean up, delete previous install before installing
     241            rm -r ${COMPONENTS}/${NAME}
     242        fi
     243        cd ${TMP}
     244        ${GET} ${URL}
     245        ${UNZIP} ${NAME}.zip -d ${NAME}
     246        cd ${CURRENT}
     247        mv ${TMP}/${NAME} ${COMPONENTS}/
     248        echo "${NAME}-${VERSION}" >> ${CACHE}
     249        echo "< Installed ${NAME} ${VERSION}"
     250    fi
     251}
     252
     253
    229254echo "Installing JS dependencies in ${COMPONENTS}"
    230255
     
    235260leaflet_elevation
    236261pickadate
     262d3
     263
    237264
    238265# Clean up, remove the tmp directory
Note: See TracChangeset for help on using the changeset viewer.