diff --git a/scripts/package.sh b/scripts/package.sh index 99580bc..5b1a89f 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -14,7 +14,9 @@ vsce package --baseContentUrl=$(json -f package.json repository.url)/tree unzip -d $VSIX_FILE_NAME{.d,} cd $VSIX_FILE_NAME.d -MINIFY_XML_OPTIONS='--no-shorten-namespaces --no-remove-unused-namespaces --no-remove-unused-default-namespace' +MINIFY_XML_OPTIONS='--no-shorten-namespaces + --no-remove-unused-namespaces + --no-remove-unused-default-namespace' minify-xml $MINIFY_XML_OPTIONS --output \[Content_Types\].xml{,} minify-xml $MINIFY_XML_OPTIONS --output extension.vsixmanifest{,} cd extension @@ -27,7 +29,8 @@ tail -n +9 README.md > _ && mv _ README.md tail -n +9 CHANGELOG.md > _ && mv _ CHANGELOG.md cd ext # Minify Perl scripts. -if [ -x "$(command -v perltidy)" ]; then +# You can install perltidy with `cpan Perl::Tidy` +if [[ -x "$(command -v perltidy)" ]]; then perltidy --mangle -dac -b html-preview.pm rm html-preview.pm.bak fi diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 4865b96..14a0429 100755 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -10,7 +10,7 @@ SRC_PATH=./node_modules/language-texinfo DEST_PATH=./out/grammars mkdir -p $DEST_PATH -# Convert TextMate grammar from CSON to JSON, as VSCode cannot recognize CSON ones. +# Convert TextMate grammar to JSON, as VSCode cannot recognize CSON ones. cson2json $SRC_PATH/grammars/texinfo.cson | json5 > $DEST_PATH/texinfo.json VERSION=$(json -f package.json version)