mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-03-05 13:30:32 -05:00
Indeed https://github.com/maty21/mocha-sidebar/issues/181#issuecomment-1016768595 seems to work and pointed me to a better extension. This works better than maty.vscode-mocha-sidebar which could not find nyc.
25 lines
981 B
Bash
Executable File
25 lines
981 B
Bash
Executable File
#!/bin/sh
|
|
|
|
#COMPOSER_BIN="$HOME/.composer/vendor/bin" # should be equivalent
|
|
COMPOSER_BIN="$(composer global config bin-dir --absolute --quiet)"
|
|
# LOCAL_VENDOR_BIN="$PWD/vendor/bin" # should be equivalent
|
|
LOCAL_VENDOR_BIN="$(composer config vendor-dir --absolute --quiet)"
|
|
export PATH="$PATH:$COMPOSER_BIN"
|
|
export PATH="$PATH:$LOCAL_VENDOR_BIN"
|
|
echo 'export PATH="$PATH:$(composer global config bin-dir --absolute --quiet)"' >> ~/.bashrc
|
|
echo 'export PATH="$PATH:$(composer config vendor-dir --absolute --quiet)"' >> ~/.bashrc
|
|
ln -s ./conf.sample.php cfg/conf.php
|
|
composer install --no-dev --optimize-autoloader
|
|
|
|
# for PHP unit testing
|
|
composer global require phpunit/phpunit
|
|
composer global require google/cloud-storage
|
|
|
|
# for JS testing
|
|
JAVASCRIPT_DIRECTORY="$(pwd)/js"
|
|
npm --prefix "$JAVASCRIPT_DIRECTORY" install "$JAVASCRIPT_DIRECTORY"
|
|
npm install --global nyc
|
|
|
|
# development webserver
|
|
sudo chmod a+x "$(pwd)" && sudo rm -rf /var/www/html && sudo ln -s "$(pwd)" /var/www/html
|