6 Star 14 Fork 3

Gitee 极速下载/JupyterHub

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/jupyterhub/jupyterhub
克隆/下载
bower-lite 821 Bytes
一键复制 编辑 原始数据 按行查看 历史
Min RK 提交于 2024-03-11 09:39 . run ruff via pre-commit
#!/usr/bin/env python
# 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, "share", "jupyterhub", "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)
dependencies = package_json['dependencies']
for dep in dependencies:
src = join(node_modules, dep)
dest = join(components, dep)
print(f"{src} -> {dest}")
shutil.copytree(src, dest)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mirrors/JupyterHub.git
git@gitee.com:mirrors/JupyterHub.git
mirrors
JupyterHub
JupyterHub
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385