Skip to content

Commit

Permalink
Merge pull request #282 from lastmjs/static-build
Browse files Browse the repository at this point in the history
add more languages to the static build
  • Loading branch information
lastmjs committed Jan 16, 2020
2 parents 23b8b51 + e0cda35 commit fe34316
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 63 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zwitterion",
"version": "0.44.0",
"version": "0.44.1",
"description": "A web dev server that lets you import anything*",
"scripts": {
"start": "ts-node --transpile-only src/app.ts --port 5050",
Expand Down
142 changes: 81 additions & 61 deletions src/static-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,67 +74,87 @@ export function buildStatic(params: {
fi
done
#echo "Download and save all .rs files from Zwitterion"
#shopt -s globstar
#for file in **/*.rs; do
# if [[ ! $file =~ ${excludeRegex} ]]
# then
# wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.rs"
# fi
#done
#echo "Download and save all .tsx files from Zwitterion"
#shopt -s globstar
#for file in **/*.tsx; do
# if [[ ! $file =~ ${excludeRegex} ]] || [[ $file =~ ${includeRegex} ]]
# then
# echo $file
# wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.tsx"
# fi
#done
#echo "Download and save all .jsx files from Zwitterion"
#shopt -s globstar
#for file in **/*.jsx; do
# if [[ ! $file =~ ${excludeRegex} ]] || [[ $file =~ ${includeRegex} ]]
# then
# echo $file
# wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.jsx"
# fi
#done
#echo "Download and save all .c files from Zwitterion"
#shopt -s globstar
#for file in **/*.c; do
# if [[ ! $file =~ ${excludeRegex} ]]
# then
# wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.c"
# fi
#done
#echo "Download and save all .cc files from Zwitterion"
#shopt -s globstar
#for file in **/*.cc; do
# if [[ ! $file =~ ${excludeRegex} ]]
# then
# wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.cc"
# fi
#done
#echo "Download and save all .cpp files from Zwitterion"
#shopt -s globstar
#for file in **/*.cpp; do
# if [[ ! $file =~ ${excludeRegex} ]]
# then
# wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.cpp"
# fi
#done
echo "Download and save all .rs files from Zwitterion"
shopt -s globstar
for file in **/*.rs; do
if [[ ! $file =~ ${excludeRegex} ]]
then
wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.rs"
fi
done
echo "Download and save all .tsx files from Zwitterion"
shopt -s globstar
for file in **/*.tsx; do
if [[ ! $file =~ ${excludeRegex} ]] || [[ $file =~ ${includeRegex} ]]
then
echo $file
wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.tsx"
fi
done
echo "Download and save all .jsx files from Zwitterion"
shopt -s globstar
for file in **/*.jsx; do
if [[ ! $file =~ ${excludeRegex} ]] || [[ $file =~ ${includeRegex} ]]
then
echo $file
wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.jsx"
fi
done
echo "Download and save all .c files from Zwitterion"
shopt -s globstar
for file in **/*.c; do
if [[ ! $file =~ ${excludeRegex} ]]
then
wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.c"
fi
done
echo "Download and save all .cc files from Zwitterion"
shopt -s globstar
for file in **/*.cc; do
if [[ ! $file =~ ${excludeRegex} ]]
then
wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.cc"
fi
done
echo "Download and save all .cpp files from Zwitterion"
shopt -s globstar
for file in **/*.cpp; do
if [[ ! $file =~ ${excludeRegex} ]]
then
wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.cpp"
fi
done
echo "Download and save all .c++ files from Zwitterion"
shopt -s globstar
for file in **/*.c++; do
if [[ ! $file =~ ${excludeRegex} ]]
then
wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.c++"
fi
done
echo "Download and save all .wat files from Zwitterion"
shopt -s globstar
for file in **/*.wat; do
if [[ ! $file =~ ${excludeRegex} ]]
then
wget -q -x -nH "http://localhost:${params.httpPort}/$\{file%.*\}.wat"
fi
done
echo "Copy ZWITTERION_TEMP to dist directory in the project root directory"
Expand Down

0 comments on commit fe34316

Please sign in to comment.