Skip to content
Open
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"/dist/**/*.js",
"/dist/**/*.d.ts",
"/bin/**/*",
"/python/**/*.py"
"/python/**/*.py",
"/python/resources/**/*"
],
"dependencies": {
"@rollup/plugin-commonjs": "^13.0.0",
Expand Down
7 changes: 6 additions & 1 deletion python/install.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from __future__ import print_function

import argparse
import glob
import json
import os
import pathlib
import shutil
import sys

try:
Expand Down Expand Up @@ -30,7 +33,9 @@ def install_kernel_spec(is_js, bin, user, prefix):
os.chmod(td, 0o755) # Starts off as 700, not user readable
with open(os.path.join(td, 'kernel.json'), 'w') as f:
json.dump(create_kernel_json(is_js, bin), f, sort_keys=True)
# TODO: Copy any resources
resources_dir = pathlib.Path(__file__).parent / 'resources' / ('js' if is_js else 'ts')
for logo_file in glob.glob(str(resources_dir / 'logo-*')):
shutil.copyfile(logo_file, os.path.join(td, os.path.basename(logo_file)))
print('Installing {} kernel spec'.format(
'JavaScript' if is_js else 'TypeScript'))
KernelSpecManager().install_kernel_spec(
Expand Down
8 changes: 8 additions & 0 deletions python/resources/js/logo-svg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions python/resources/ts/logo-svg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.