如何手动下载原子编辑器的包并(手动)安装它们?
How can I manually download packages for atom editor and install them (manually)?
由于互联网连接不佳,我的原子包无法从 settings>preferences>install>packages
安装。所以我想我需要手动安装它们。
例如:我尝试了各自 github 页面的存储库并将其克隆到 users>.atom>packages
但这没有用。
有什么帮助吗?
我喜欢这个文本编辑器,所以如果我可以手动安装更多的包,它会非常方便。
随时欢迎任何其他方式!
有几种方法,大多数与此类似:
You can download the package, unzip or decompress, go to that folder
and run: apm link that will create a symbolic link from that package
to your ~/.atom/packages folder.
但请确保您也安装了软件包所需的所有依赖项,如果您没有互联网连接,那么您可能会遇到问题。
有一些很好的信息 here 为了您的方便,我将引用概述如何处理此问题的信息:
When you manually download and extract the zip file you need to run
apm install in the package's directory afterwards to pull in any
dependencies. This will download all dependencies and place them in
the node_modules folder and recursively pulls in their dependencies as
well. Since this is not possible in your environment, you'll have to
do that manually.
Recursively go over each package.json file. If it lists a package as a
dependency search on npm6 for the package and follow the link to
package's github page to read its package.json and repeat the whole
process.
希望这对您有所帮助。让我知道在您尝试后我是否可以进一步提供帮助。
在linux中:
cd ~/.atom/packages
git clone https://github.com/url_to_your_package
cd your_package
npm install
你必须先安装 npm。
要获取 npm,只需安装 node.js,npm 将自动安装,然后 运行:
cd ~/.atom/packages
git clone https://github.com/package-name your_package
cd your_package
npm install
完成了。
选项 1:使用 atom 包管理器 (apm)
从命令行:
apm install <github repo link>
其中 github link 与您通常用来克隆存储库的 link 相同。
apm install
文档
$ apm help install
Usage: apm install [<package_name>...]
apm install <package_name>@<package_version>
apm install <git_remote>
apm install <github_username>/<github_project>
apm install --packages-file my-packages.txt
apm i (with any of the previous argument usage)
Install the given Atom package to ~/.atom/packages/<package_name>.
If no package name is given then all the dependencies in the package.json
file are installed to the node_modules folder in the current working
directory.
A packages file can be specified that is a newline separated list of
package names to install with optional versions using the
`package-name@version` syntax.
Options:
--check Check that native build tools are installed [boolean]
--verbose Show verbose debug information [boolean] [default: false]
--packages-file A text file containing the packages to install [string]
--production Do not install dev dependencies [boolean]
-c, --compatible Only install packages/themes compatible with this Atom version [string]
-h, --help Print this usage message
-s, --silent Set the npm log level to silent [boolean]
-q, --quiet Set the npm log level to warn [boolean]
Prefix an option with `no-` to set it to false such as --no-color to disable
colored output.
选项 2:手动下载
以下似乎适用于 MacOS
cd ~/.atom/packages
git clone https://github.com/url_to_your_package
cd your_package
apm install
- 注意 apm 不是 npm
由于互联网连接不佳,我的原子包无法从 settings>preferences>install>packages
安装。所以我想我需要手动安装它们。
例如:我尝试了各自 github 页面的存储库并将其克隆到 users>.atom>packages
但这没有用。
有什么帮助吗? 我喜欢这个文本编辑器,所以如果我可以手动安装更多的包,它会非常方便。
随时欢迎任何其他方式!
有几种方法,大多数与此类似:
You can download the package, unzip or decompress, go to that folder and run: apm link that will create a symbolic link from that package to your ~/.atom/packages folder.
但请确保您也安装了软件包所需的所有依赖项,如果您没有互联网连接,那么您可能会遇到问题。
有一些很好的信息 here 为了您的方便,我将引用概述如何处理此问题的信息:
When you manually download and extract the zip file you need to run apm install in the package's directory afterwards to pull in any dependencies. This will download all dependencies and place them in the node_modules folder and recursively pulls in their dependencies as well. Since this is not possible in your environment, you'll have to do that manually.
Recursively go over each package.json file. If it lists a package as a dependency search on npm6 for the package and follow the link to package's github page to read its package.json and repeat the whole process.
希望这对您有所帮助。让我知道在您尝试后我是否可以进一步提供帮助。
在linux中:
cd ~/.atom/packages
git clone https://github.com/url_to_your_package
cd your_package
npm install
你必须先安装 npm。
要获取 npm,只需安装 node.js,npm 将自动安装,然后 运行:
cd ~/.atom/packages
git clone https://github.com/package-name your_package
cd your_package
npm install
完成了。
选项 1:使用 atom 包管理器 (apm)
从命令行:
apm install <github repo link>
其中 github link 与您通常用来克隆存储库的 link 相同。
apm install
文档
$ apm help install
Usage: apm install [<package_name>...]
apm install <package_name>@<package_version>
apm install <git_remote>
apm install <github_username>/<github_project>
apm install --packages-file my-packages.txt
apm i (with any of the previous argument usage)
Install the given Atom package to ~/.atom/packages/<package_name>.
If no package name is given then all the dependencies in the package.json
file are installed to the node_modules folder in the current working
directory.
A packages file can be specified that is a newline separated list of
package names to install with optional versions using the
`package-name@version` syntax.
Options:
--check Check that native build tools are installed [boolean]
--verbose Show verbose debug information [boolean] [default: false]
--packages-file A text file containing the packages to install [string]
--production Do not install dev dependencies [boolean]
-c, --compatible Only install packages/themes compatible with this Atom version [string]
-h, --help Print this usage message
-s, --silent Set the npm log level to silent [boolean]
-q, --quiet Set the npm log level to warn [boolean]
Prefix an option with `no-` to set it to false such as --no-color to disable
colored output.
选项 2:手动下载
以下似乎适用于 MacOS
cd ~/.atom/packages
git clone https://github.com/url_to_your_package
cd your_package
apm install
- 注意 apm 不是 npm