如何在 Atom 编辑器中编辑核心文件
How to edit core files in Atom Editor
我想在 Atom 中编辑树视图包。我想在上下文菜单中添加一个新项目。但是我无法归档文件在哪里。打开config文件夹可以看到我安装的所有社区包,但是编辑器的核心文件在哪里找呢?
它们打包在 app.asar
文件中。此文件位于 OS X 版本中的以下位置。
Atom.app/Contents/Resources/app.asar
此文件由this build script生成。
当然,这个包是开源的,所以你可以查看the code for tree-view on GitHub。
GitHub 还有 some documentation for developing on official Atom packages.
The first step is creating your own clone.
For example, if you want to make changes to the tree-view
package,
fork the repo on your github account, then clone it:
> git clone git@github.com:your-username/tree-view.git
Next install all the dependencies:
> cd tree-view
> apm install
Installing modules ✓
Now you can link it to development mode so when you run an Atom window
with atom --dev
, you will use your fork instead of the built in
package:
> apm link -d
此外,如果您只想添加另一个菜单项,如果有另一个插件提供的 API 功能,我也不会感到惊讶。
我想在 Atom 中编辑树视图包。我想在上下文菜单中添加一个新项目。但是我无法归档文件在哪里。打开config文件夹可以看到我安装的所有社区包,但是编辑器的核心文件在哪里找呢?
它们打包在 app.asar
文件中。此文件位于 OS X 版本中的以下位置。
Atom.app/Contents/Resources/app.asar
此文件由this build script生成。
当然,这个包是开源的,所以你可以查看the code for tree-view on GitHub。
GitHub 还有 some documentation for developing on official Atom packages.
The first step is creating your own clone.
For example, if you want to make changes to the
tree-view
package, fork the repo on your github account, then clone it:> git clone git@github.com:your-username/tree-view.git
Next install all the dependencies:
> cd tree-view > apm install Installing modules ✓
Now you can link it to development mode so when you run an Atom window with
atom --dev
, you will use your fork instead of the built in package:> apm link -d
此外,如果您只想添加另一个菜单项,如果有另一个插件提供的 API 功能,我也不会感到惊讶。