Merge pull request #1408 from PeterDaveHello/doctoc
[Docs] [Tests] Introduce doctoc for "Table of Contents" autogeneration
commit
286090b607
|
@ -13,6 +13,7 @@ addons:
|
|||
- ksh
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.npm
|
||||
- $HOME/.ghc
|
||||
- $HOME/.cabal
|
||||
- $TRAVIS_BUILD_DIR/.cache
|
||||
|
@ -21,14 +22,16 @@ before_install:
|
|||
- curl --version
|
||||
- wget --version
|
||||
- if [ -n "${SHELLCHECK-}" ]; then cabal update && cabal install transformers-0.4.3.0 ShellCheck && shellcheck --version ; fi
|
||||
- if [ -n "${DOCTOCCHECK-}" ]; then nvm install node && npm install -g doctoc && type doctoc ; fi
|
||||
install:
|
||||
- (mkdir /tmp/urchin && cd /tmp/urchin && curl -s "$(curl -s https://registry.npmjs.com/urchin | grep -Eo '"tarball":\s*"[^"]+"' | tail -n 1 | awk -F\" '{ print $4 }')" -O && tar -x -f urchin*)
|
||||
- chmod +x /tmp/urchin/package/urchin
|
||||
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
|
||||
script:
|
||||
- if [ -n "${DOCTOCCHECK-}" ]; then cp README.markdown README.markdown.orig && npm run doctoc && diff -q README.markdown README.markdown.orig ; fi
|
||||
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash nvm.sh && shellcheck -s sh nvm.sh && shellcheck -s dash nvm.sh && shellcheck -s ksh nvm.sh ; fi
|
||||
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash install.sh bash_completion nvm-exec ; fi
|
||||
- if [ -z "${SHELLCHECK-}" ]; then make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL ; fi
|
||||
- if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL ; fi
|
||||
env:
|
||||
global:
|
||||
- CXX=g++-4.8
|
||||
|
@ -36,6 +39,7 @@ env:
|
|||
- PATH="~/.cabal/bin/:$(echo $PATH | sed 's/::/:/')"
|
||||
- NVM_DIR="${TRAVIS_BUILD_DIR}"
|
||||
matrix:
|
||||
- DOCTOCCHECK=true
|
||||
- SHELLCHECK=true
|
||||
- SHELL=bash TEST_SUITE=install_script
|
||||
- SHELL=sh TEST_SUITE=fast
|
||||
|
|
|
@ -1,27 +1,33 @@
|
|||
# Node Version Manager [![Build Status](https://travis-ci.org/creationix/nvm.svg?branch=master)][3] [![nvm version](https://img.shields.io/badge/version-v0.33.1-yellow.svg)][4] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/684/badge)](https://bestpractices.coreinfrastructure.org/projects/684)
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table of Contents
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Install script](#install-script)
|
||||
- [Verify installation](#verify-installation)
|
||||
- [Manual install](#manual-install)
|
||||
- [Manual upgrade](#manual-upgrade)
|
||||
- [Usage](#usage)
|
||||
- [Long-term support](#long-term-support)
|
||||
- [Migrating global packages while installing](#migrating-global-packages-while-installing)
|
||||
- [io.js](#iojs)
|
||||
- [System version of node](#system-version-of-node)
|
||||
- [Listing versions](#listing-versions)
|
||||
- [.nvmrc](#nvmrc)
|
||||
- [Deeper Shell Integration](#deeper-shell-integration)
|
||||
- [License](#license)
|
||||
- [Running tests](#running-tests)
|
||||
- [Bash completion](#bash-completion)
|
||||
- [Usage](#usage-1)
|
||||
- [Compatibility Issues](#compatibility-issues)
|
||||
- [Installing nvm on Alpine Linux](#installing-nvm-on-alpine-linux)
|
||||
- [Problems](#problems)
|
||||
- [Installation](#installation)
|
||||
- [Install script](#install-script)
|
||||
- [Verify installation](#verify-installation)
|
||||
- [Manual install](#manual-install)
|
||||
- [Manual upgrade](#manual-upgrade)
|
||||
- [Usage](#usage)
|
||||
- [Long-term support](#long-term-support)
|
||||
- [Migrating global packages while installing](#migrating-global-packages-while-installing)
|
||||
- [io.js](#iojs)
|
||||
- [System version of node](#system-version-of-node)
|
||||
- [Listing versions](#listing-versions)
|
||||
- [.nvmrc](#nvmrc)
|
||||
- [Deeper Shell Integration](#deeper-shell-integration)
|
||||
- [zsh](#zsh)
|
||||
- [Calling `nvm use` automatically in a directory with a `.nvmrc` file](#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file)
|
||||
- [License](#license)
|
||||
- [Running tests](#running-tests)
|
||||
- [Bash completion](#bash-completion)
|
||||
- [Usage](#usage-1)
|
||||
- [Compatibility Issues](#compatibility-issues)
|
||||
- [Installing nvm on Alpine Linux](#installing-nvm-on-alpine-linux)
|
||||
- [Problems](#problems)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -305,7 +311,7 @@ You can use [`avn`](https://github.com/wbyoung/avn) to deeply integrate into you
|
|||
|
||||
If you prefer a lighter-weight solution, the recipes below have been contributed by `nvm` users. They are **not** supported by the `nvm` development team. We are, however, accepting pull requests for more examples.
|
||||
|
||||
#### Zsh
|
||||
#### zsh
|
||||
|
||||
##### Calling `nvm use` automatically in a directory with a `.nvmrc` file
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
"test/installation": "npm run --silent test/installation/node && npm run --silent test/installation/iojs",
|
||||
"test/installation/node": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation_node test-$shell",
|
||||
"test/installation/iojs": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation_iojs test-$shell",
|
||||
"test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell"
|
||||
"test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell",
|
||||
"doctoc": "doctoc --title='## Table of Contents' --github README.markdown"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -35,6 +36,7 @@
|
|||
"devDependencies": {
|
||||
"replace": "^0.3.0",
|
||||
"semver": "^5.0.1",
|
||||
"urchin": "^0.0.5"
|
||||
"urchin": "^0.0.5",
|
||||
"doctoc": "^1.2.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue