Add build script for JS and TS codes.

This commit is contained in:
krahets
2023-02-08 19:45:06 +08:00
parent 22b7d65d20
commit 05f0054005
28 changed files with 227 additions and 2217 deletions

View File

@ -1,8 +1,14 @@
# This script is borrowed from https://gist.github.com/cobyism/4730490
git add build && git commit -m "build"
git subtree push --prefix build origin built-docs
cd build
git add .
git commit -m "build"
git push -u origin docs
cd ..
mkdocs build --clean
git add site && git commit -m "deploy"
git subtree push --prefix site origin gh-pages
cd site
git add .
git commit -m "deploy"
git push -u origin gh-pages

View File

@ -16,10 +16,10 @@ class ExtractCodeBlocksJSTS(ExtractCodeBlocksJava):
super().__init__()
# Pattern to match function names and class names
self.func_pattern = r'\s*(function|private|public|)\s*(\S*)\(.*\)(:|)\s*(\S*)\s*{\s*\n'
self.func_pattern = r'(\s*)(function|private|public|)\s*(\S*)\(.*\)(:|)\s*(.*)\s+{\s*\n'
self.class_pattern = r'class\s+(\w+)\s*\{'
self.func_pattern_keys = ["total", "prefix", "label", ":", "return"]
self.func_pattern_keys = ["total", "ind", "prefix", "label", ":", "return"]
self.class_pattern_keys = ["total", "label"]