Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transcrypt support to local web interface #175

Merged
merged 10 commits into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
max-parallel: 4
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v1
Expand Down
3 changes: 2 additions & 1 deletion pyp5js/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def command_line(self):
"""
Builds transcrypt command line with the required parameters and flags
"""
pyp5_dir = PYP5JS_FILES.install
pyp5_dir = PYP5JS_FILES.transcrypt_conf_dir
target = self.sketch.target_sketch
return ' '.join([str(c) for c in [
'transcrypt', '-xp', f'"{pyp5_dir}"', '-k', '-ks', '-b', '-m', '-n', f'"{target}"'
Expand Down Expand Up @@ -76,6 +76,7 @@ def clean_up(self):
shutil.move(self.target_dir, self.sketch.target_dir)

if self.sketch.target_sketch.exists():

self.sketch.target_sketch.unlink()


Expand Down
6 changes: 5 additions & 1 deletion pyp5js/config/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def static_dir(self):

@property
def pytop5js(self):
return self.install.joinpath('pyp5js.py')
return self.transcrypt_conf_dir.joinpath('pyp5js.py')

@property
def p5js(self):
Expand All @@ -39,6 +39,10 @@ def p5_yml(self):

##### TRANSCRYPT SPECIFICS

@property
def transcrypt_conf_dir(self):
return self.templates_dir.joinpath('transcrypt')

@property
def transcrypt_index_html(self):
return self.templates_dir.joinpath('transcrypt', 'index.html')
Expand Down
1 change: 1 addition & 0 deletions pyp5js/http/static/styles/basscss-7.1.1.min.css

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

Loading