我正试图得到一个清单,列出所有与jupyterlabv1.1.4打包的依赖项。我想我可以通过
python3 -m venv .env
pip install jupyterlab==1.1.4
pip freeze
但我不知道如何处理javascript依赖项。我对js了解不多。你知道吗
似乎这些信息可能在纱线.锁紧文件夹。但我不确定我是否想要纱线.锁紧主目录中的文件或/jupyterlab/staging/中的文件。我认为这可能是一个更简短的阶段,因为CONTRIBUTING.md说:
By default, the application will load from the JupyterLab staging directory (default is
<sys-prefix>/share/jupyter/lab/build
. If you wish to run the core application in<git root>/jupyterlab/build
, runjupyter lab --core-mode
. This is the core application that will be shipped.
但问题是,一旦我确定了正确的纱线.锁紧文件,如何删除开发依赖项?我看到在/jupyterlab/staging/package.json中有一个开发依赖项部分,这些依赖项似乎包含在纱线.锁紧文件。的依赖项部分中的所有内容包.json前缀为@jupyterlab
。这意味着我可以过滤纱线.锁紧只保留本节中的块?所以我会保留所有这些依赖关系
"@jupyterlab/coreutils@^3.1.0", "@jupyterlab/coreutils@~3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@jupyterlab/coreutils/-/coreutils-3.1.0.tgz#b307569462c468d6a09dfa06f32fed03e55dd811"
integrity sha512-ZqgzDUyanyvc86gtCrIbc1M6iniKHYmWNWHvWOcnq3KIP3wk3grchsTYPTfQDxcUS6F04baPGp/KohEU2ml40Q==
dependencies:
"@phosphor/commands" "^1.6.3"
"@phosphor/coreutils" "^1.3.1"
"@phosphor/disposable" "^1.2.0"
"@phosphor/properties" "^1.1.3"
"@phosphor/signaling" "^1.2.3"
ajv "^6.5.5"
json5 "^2.1.0"
minimist "~1.2.0"
moment "^2.24.0"
path-posix "~1.0.0"
url-parse "~1.4.3"
因为(@jupyterlab/coreutils)[https://github.com/jupyterlab/jupyterlab/blob/v1.1.4/jupyterlab/staging/package.json#L24]在dependencies部分,但是我可以排除
glob@^7.1.3, glob@^7.1.4, glob@~7.1.2:
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
因为glob只在dev依赖中?但是如果glob是一个非dev依赖的依赖,会发生什么呢?在这种情况下,我仍然希望保留glob和所有iot的依赖关系。你知道吗
最后,resolutions部分是否意味着我可能需要将同一个库的多个版本视为打包的最终依赖项?你知道吗
他们是否对yarn list
进行了筛选,可能会给出我想要的列表?你知道吗
yarn list prod
只提供JupyterLab附带的生产依赖项。resolutions
部分实际上覆盖了包的版本-它用来确保只安装了给定包的一个版本。用于列出依赖项的Yarn实用程序将理解这一点,因此只要您浏览了Yarn,就不必担心它。你知道吗请注意,JupyterLab附带了许多依赖项,这些依赖项通常可能被视为开发人员依赖项—这是因为它需要在最终用户机器上包含Webpack和相关工具以支持扩展。你知道吗
相关问题 更多 >
编程相关推荐