Browse Source

Update build scripts.

primary
CismonX 2 months ago
parent
commit
2fd2a025c3
Signed by: CismonX GPG Key ID: 3094873E29A482FB
  1. 7
      scripts/package.sh
  2. 2
      scripts/prepare.sh

7
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

2
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)

Loading…
Cancel
Save