Skip to content
Snippets Groups Projects
Select Git revision
  • 4bcc282a4865085e9dfa3c6a844e53605d65aaea
  • master default
  • feat/info-xml-backends
  • fix/shareapi-l10n
  • fix/missing-RemoteException-class
  • backport/46504/stable28
  • backport/46504/stable29
  • automated/noid/stable29-update-psalm-baseline
  • automated/noid/stable28-update-psalm-baseline
  • feat/46438/provide-feedback-edit-locally
  • fix-getimagesize
  • stable27
  • stable28
  • stable29
  • query-builder-connection
  • feature/request-803
  • autosharding
  • fix/noid/test-samba-with-self-hosted
  • fix/bring-back-forbidden-names
  • fix/htaccess
  • fix/use-filename-validator
  • v28.0.8rc1
  • v29.0.4rc1
  • v27.1.11
  • v28.0.7
  • v29.0.3
  • v28.0.7rc4
  • v29.0.3rc4
  • v29.0.3rc3
  • v28.0.7rc3
  • v27.1.11rc3
  • v27.1.11rc2
  • v28.0.7rc2
  • v29.0.3rc2
  • v27.1.11rc1
  • v28.0.7rc1
  • v29.0.3rc1
  • v29.0.2
  • v27.1.10
  • v29.0.2rc2
  • v29.0.2rc1
41 results

buildjsdocs.sh

Blame
  • user avatar
    Vincent Petry authored and Lukas Reschke committed
    f120846e
    History
    buildjsdocs.sh 818 B
    #!/usr/bin/env bash
    #
    # ownCloud
    #
    # Run JS tests
    #
    # @author Vincent Petry
    # @copyright 2014 Vincent Petry <pvince81@owncloud.com>
    #
    NPM="$(which npm 2>/dev/null)"
    PREFIX="build"
    OUTPUT_DIR="build/jsdocs"
    
    JS_FILES="core/js/*.js core/js/**/*.js apps/*/js/*.js"
    
    if test -z "$NPM"
    then
    	echo 'Node JS >= 0.8 is required to build the documentation' >&2
    	exit 1
    fi
    
    # update/install test packages
    mkdir -p "$PREFIX" && $NPM install --link --prefix "$PREFIX" jsdoc || exit 3
    
    JSDOC_BIN="$(which jsdoc 2>/dev/null)"
    
    # If not installed globally, try local version
    if test -z "$JSDOC_BIN"
    then
    	JSDOC_BIN="$PREFIX/node_modules/jsdoc/jsdoc.js"
    fi
    
    if test -z "$JSDOC_BIN"
    then
    	echo 'jsdoc executable not found' >&2
    	exit 2
    fi
    
    mkdir -p "$OUTPUT_DIR"
    
    NODE_PATH="$PREFIX/node_modules" $JSDOC_BIN -d "$OUTPUT_DIR" $JS_FILES