pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/visualpython/visualpython/commit/ef9650b08d5087f163ae6cdf42346b7f66ef5c3b

ink crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-12d60eb17c94521c.css" /> Edit build files · visualpython/visualpython@ef9650b · GitHub
Skip to content

Commit ef9650b

Browse files
committed
Edit build files
1 parent 214a2d1 commit ef9650b

4 files changed

Lines changed: 74 additions & 20 deletions

File tree

build.sh

100644100755
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,26 @@
88
# Date : 2023. 02. 08
99
# Change Date :
1010
#
11+
TEMP_PWD=$PWD
12+
13+
#=============================================================================
14+
# Build Visual Python for Colab
15+
#=============================================================================
16+
cd $TEMP_PWD/colab
17+
./build.colab.sh
18+
19+
#=============================================================================
20+
# Build Visual Python for Jupyter Notebook
21+
#=============================================================================
22+
cd $TEMP_PWD/jupyternotebook
23+
./build.jupyternotebook.sh
24+
25+
#=============================================================================
26+
# Build Visual Python for Jupyter Lab
27+
#=============================================================================
28+
cd $TEMP_PWD/jupyterlab
29+
./build.jupyterlab.sh
30+
31+
exit 0
32+
33+
# End of file

colab/build.colab.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,24 @@
88
# Date : 2023. 02. 08
99
# Change Date :
1010
#
11-
12-
# set visualpython version
11+
#=============================================================================
12+
# Replace Version
13+
#=============================================================================
1314
VP_ORG_VER=2.2.12
14-
VP_NEW_VER=2.2.13
15-
16-
# make directories to save build output
17-
mkdir -p ../dist/colab
15+
VP_NEW_VER=2.3.1
1816

1917
# update version info
2018
# update manifest version with new numbering for new version
2119
grep -REil ${VP_ORG_VER//\./\\.}\.[0-9] manifest.json | xargs sed -i "s/${VP_ORG_VER//\./\\.}\.[0-9]/${VP_NEW_VER}.1/g"
2220
# update version inside visualpython package
2321
grep -REil ${VP_ORG_VER//\./\\.} visualpython/* | xargs sed -i --follow-symlinks "s/${VP_ORG_VER//\./\\.}/${VP_NEW_VER}/g"
2422

23+
#=============================================================================
24+
# Build output for Colab
25+
#=============================================================================
26+
# make directories to save build output
27+
mkdir -p ../dist/colab
28+
2529
# build package
2630
# sudo apt-get install zip
2731
zip -r ../dist/colab/visualpython-v$VP_NEW_VER.zip background.js content.js icon.png inject.js manifest.json visualpython

jupyterlab/build.jupyterlab.sh

100644100755
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,35 @@
88
# Date : 2023. 02. 08
99
# Change Date :
1010
#
11+
#=============================================================================
12+
# Replace Version and Basic Files
13+
#=============================================================================
1114
VP_ORG_VER=2.2.12
12-
VP_NEW_VER=2.2.13
15+
VP_NEW_VER=2.3.1
1316

14-
# on conda environment
15-
pip install build
17+
# update version info
18+
grep -REil "version = \"${VP_ORG_VER}\"" pyproject.toml | xargs sed -i "s/version = \"${VP_ORG_VER//\./\\.}\"/version = \"${VP_NEW_VER}\"/g"
19+
grep -REil "current = \"${VP_ORG_VER}\"" pyproject.toml | xargs sed -i "s/current = \"${VP_ORG_VER//\./\\.}\"/current = \"${VP_NEW_VER}\"/g"
20+
grep -REil ${VP_ORG_VER//\./\\.} ../visualpython/* | xargs sed -i "s/${VP_ORG_VER//\./\\.}/${VP_NEW_VER}/g"
1621

1722
# update LICENSE, README.md files
1823
cp ../LICENSE LICENSE
1924
cp ../README.md README.md
2025

21-
# update version info
22-
grep -REil "version = \"${VP_ORG_VER}\"" pyproject.toml | xargs sed -i "s/version = \"${VP_ORG_VER//\./\\.}\"/version = \"${VP_NEW_VER}\"/g"
23-
grep -REil ${VP_ORG_VER//\./\\.} visualpython/* | xargs sed -i --follow-symlinks "s/${VP_ORG_VER//\./\\.}/${VP_NEW_VER}/g"
24-
26+
#=============================================================================
27+
# Build output for Jupyter Lab
28+
#=============================================================================
2529
# Run dev-build script to build static files to ./visualpython/labextension
2630
# chmod 755 dev-build.jupyterlab.sh
2731
./dev-build.jupyterlab.sh
2832

2933
# make dist directory if not exist
3034
mkdir -p ../dist/jupyterlab
3135

32-
# build file to output dir
36+
# on conda environment, install build package
37+
pip install build
38+
39+
# build file for pypi jupyterlab-visualpython
3340
python -m build --outdir ../dist/jupyterlab
3441

3542
exit 0

jupyterlab/dev-build.jupyterlab.sh

100644100755
Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,37 @@
88
# Date : 2023. 02. 08
99
# Change Date :
1010
#
11+
#=============================================================================
12+
# Replace Source Code and Loader pattern
13+
#=============================================================================
1114
# cp current core source code
1215
rm -rf lib/visualpython
1316
cp -r ../visualpython lib/visualpython
1417

1518
# convert text-loader, raw-loader, css-loader
16-
grep -rl "vp_text_loader" lib/visualpython/js/* | xargs sed -i "s/vp_text_loader('\(.\+\)')\(.\+$\)/'!!text-loader!\1'\2/g"
17-
grep -rl "vp_raw_loader" lib/visualpython/js/* | xargs sed -i "s/vp_raw_loader('\(.\+\)')\(.\+$\)/'\1'\2/g"
18-
grep -rl "vp_css_loader" lib/visualpython/js/* | xargs sed -i "s/vp_css_loader('\(.\+\)')\(.\+$\)/'\1.css'\2/g"
19+
grep -rl "__VP_TEXT_LOADER__" lib/visualpython/js/* | xargs sed -i "s/__VP_TEXT_LOADER__('\(.\+\)')\(.\+$\)/'!!text-loader!\1'\2/g"
20+
grep -rl "__VP_RAW_LOADER__" lib/visualpython/js/* | xargs sed -i "s/__VP_RAW_LOADER__('\(.\+\)')\(.\+$\)/'\1'\2/g"
21+
grep -rl "__VP_CSS_LOADER__" lib/visualpython/js/* | xargs sed -i "s/__VP_CSS_LOADER__('\(.\+\)')\(.\+$\)/'\1.css'\2/g"
1922

20-
# run build as static files
21-
# npm install # install npm package dependencies
22-
# npm run build # optional build step if using TypeScript, babel, etc.
23+
#=============================================================================
24+
# Build as development version (output dir to ./visualpython/labextension)
25+
# Requirements:
26+
# - nodejs, npm, jupyterlab (conda or jupyter)
27+
# ----------------------------------------------------------------------------
28+
# * Install nodejs, npm for linux(ubuntu)
29+
# sudo apt update
30+
# sudo apt install nodejs
31+
# sudo apt install npm # need npm/nodejs to build extension
32+
# ----------------------------------------------------------------------------
33+
# * Install nodejs, npm for WSL2
34+
# sudo apt-get install curl
35+
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash # install nvm
36+
# nvm install 16.15.1 # install node 16.15.1
37+
#=============================================================================
38+
# python -m pip install jupyterlab
39+
# npm install # install npm package dependencies
40+
# npm run build # optional build step if using TypeScript, babel, etc.
2341
# jupyter labextension install # install the current directory as an extension
42+
43+
# Run Build for jupyterlab extension
2444
jlpm run build

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy