-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removing bower, using bower-lite script to copy dependencies, install…
…ed with npm, into components folder. this is applying the changes made by @minrk in https://github.com/jupyter/notebook/pull/6213/files to nbclassic
- Loading branch information
Rosio Reyes
authored and
Rosio Reyes
committed
May 11, 2022
1 parent
2a8235d
commit 21af09c
Showing
9 changed files
with
95 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
""" | ||
bower-lite | ||
Since Bower's on its way out, | ||
stage frontend dependencies from node_modules into components | ||
""" | ||
import json | ||
import os | ||
import shutil | ||
from os.path import join | ||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
components = join(HERE, "nbclassic", "static", "components") | ||
node_modules = join(HERE, "node_modules") | ||
|
||
if os.path.exists(components): | ||
shutil.rmtree(components) | ||
os.mkdir(components) | ||
|
||
with open(join(HERE, "package.json")) as f: | ||
package_json = json.load(f) | ||
|
||
renames = { | ||
"jquery-ui-dist": "jquery-ui", | ||
} | ||
|
||
dependencies = package_json["dependencies"] | ||
for dep in dependencies: | ||
src = join(node_modules, dep) | ||
dest_name = renames.get(dep, dep) | ||
dest = join(components, dest_name) | ||
print(f"{src} -> {dest}") | ||
shutil.copytree(src, dest) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters