How to edit core files in Atom Editor

本小妞迷上赌 提交于 2019-12-21 04:51:09

问题


I want to edit the tree-view package in Atom. I want to add a new item to the context menu. But i can't file where are the files. I can open the config folder and I can see all the community packages I have installed, but where do I find the core files of the editor?


回答1:


They are packed inside the app.asar file. This file is located at the following location in the OS X version.

Atom.app/Contents/Resources/app.asar

This file is generated by this build script.

Of course, this package is open-source, so you can view the code for tree-view on GitHub.

GitHub also has 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

Also, if all you want to do is add another menu item, I wouldn't be surprised if there is an API for doing so from another plugin.



来源:https://stackoverflow.com/questions/31444401/how-to-edit-core-files-in-atom-editor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!