Skip to content

Commit 2657245

Browse files
Use webpack
1 parent 2d56f02 commit 2657245

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@ test-repo/
1616
venv/
1717

1818
.ipynb_checkpoints
19-
docs/_build
19+
docs/_build
20+
21+
node_modules/
22+
package-lock.json
23+
24+
nbgitpuller/static/dist

nbgitpuller/templates/status.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@
3434

3535
{% block script %}
3636
{{super()}}
37-
<script src="{{ base_url }}git-pull/static/index.js?v={{ version }}">
38-
</script>
37+
<script type="module src="{{ base_url }}git-pull/static/js/index.js"></script>
38+
<script src="{{ base_url }}git-pull/static/dist/bundle.js"></script>
3939
{% endblock %}
4040

4141
{% block stylesheet %}
4242
{{super()}}
4343

44-
<link rel="stylesheet" href="{{ static_url("terminal/css/override.css") }}" type="text/css" />
45-
<link rel="stylesheet" href="{{ static_url("components/xterm.js-css/index.css") }}" type="text/css" />
4644
<style>
4745
#status-details-container {
4846
padding: 16px;

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from setuptools import find_packages, setup
22
from distutils.util import convert_path
3+
import subprocess
34

45
# Imports __version__, reference: https://stackoverflow.com/a/24517154/2220152
56
ns = {}
@@ -8,6 +9,9 @@
89
exec(ver_file.read(), ns)
910
__version__ = ns['__version__']
1011

12+
subprocess.check_call(['npm', 'install'])
13+
subprocess.check_call(['npm', 'run', 'webpack'])
14+
1115
setup(
1216
name='nbgitpuller',
1317
version=__version__,

0 commit comments

Comments
 (0)