Skip to content

Commit d9f385e

Browse files
committed
2 parents bec242c + 0785552 commit d9f385e

18 files changed

+338
-3
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ __pycache__/
2525
.Python
2626
build/
2727
develop-eggs/
28-
dist/
2928
downloads/
3029
eggs/
3130
.eggs/

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ for the frontend extension.
2020
- JupyterLab >= 3.0
2121

2222
## Install
23-
23+
Install using jupyter:
2424
```bash
2525
jupyter labextension install jupyterlab-code-snippets
2626
```
27+
Install using pip:
28+
```bash
29+
pip install jupyterlab-code-snippets
30+
```
2731

2832
## Troubleshoot
2933

@@ -74,3 +78,7 @@ Now every change will be built locally and bundled into JupyterLab. Be sure to r
7478
```bash
7579
jupyter labextension uninstall jupyterlab-code-snippets
7680
```
81+
OR
82+
```bash
83+
pip uninstall jupyterlab-code-snippets
84+
```

code_snippet/labextension/static/266.7c095df4c14c532d8790.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code_snippet/labextension/static/534.ff25b6990217fe73fcd1.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code_snippet/labextension/static/remoteEntry.dbdbed7c413868b37118.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
118 KB
Binary file not shown.
155 KB
Binary file not shown.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
import json
3+
import os.path as osp
4+
5+
from ._version import __version__
6+
7+
HERE = osp.abspath(osp.dirname(__file__))
8+
9+
with open(osp.join(HERE, 'labextension', 'package.json')) as fid:
10+
data = json.load(fid)
11+
12+
def _jupyter_labextension_paths():
13+
return [{
14+
'src': 'labextension',
15+
'dest': data['name']
16+
}]
17+
18+
19+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
__all__ = ['__version__']
2+
3+
def _fetchVersion():
4+
import json
5+
import os
6+
7+
HERE = os.path.abspath(os.path.dirname(__file__))
8+
9+
for d, _, _ in os.walk(HERE):
10+
try:
11+
with open(os.path.join(d, 'package.json')) as f:
12+
return json.load(f)['version']
13+
except FileNotFoundError:
14+
pass
15+
16+
raise FileNotFoundError('Could not find package.json under dir {}'.format(HERE))
17+
18+
__version__ = _fetchVersion()
19+

0 commit comments

Comments
 (0)