Mac OSX, Adobe Brackets - Cannot find file (JS, part of Brackets) to edit “_staticHtmlFileExts”

怎甘沉沦 提交于 2019-12-25 06:33:06

问题


Sorry if this isn't the place for this, I don't know where else I'd ask.

For Mac OSX El Capitan

I am trying to edit the property _staticHtmlFileExts

The variable used to be defined in src/file/FileUtils.js, but has since been moved to src/LiveDevelopment/LiveDevelopmentUtils.js.

When I go to Show Developer Tools within Brackets, I can view the sources, and very easily find /LiveDevelopment/ (and the child JS file)...

But any changes I make to the file are not saves on the system, and thus do not persist on successive opens of the Brackets app.

When I try to find the same file on my system, it is nowhere to be found...

I have hidden folders set to display (which they all do, when present), so I do not believe this to be the issue.

How come I can view the files in the Dev Tools, but not on my system? How, or where, can I make the change permanently?


回答1:


The build installed with the Brackets.dmg installed minified, concatenated source file (main.js under ~/Application/Brackets.app/Contents/www/) along with a source map, which is why you can see the sources in developer tools, but you cannot see the original source files.

See the article How to hack on Brackets for instructions on setting up a development environment if you want to modify the files themselves.

For reference, the steps are as follows:

  1. Install the latest Brackets build (this gives you the native shell binaries which you'll use in step 6)
  2. Fork the brackets repo
  3. Clone your fork of the repo: git clone https://github.com/<username>/brackets
  4. Fetch submodules: cd brackets && git submodule update --init
  5. Add an "upstream" remote: git remote add upstream https://github.com/adobe/brackets
  6. Run setup_for_hacking script with tools/setup_for_hacking.sh "/Applications/Brackets.app"

Note that the steps 2 and 3 are optional if you are just making modifications for yourself. If so, you can just clone straight from the master (git clone https://github.com/adobe/brackets).



来源:https://stackoverflow.com/questions/38536163/mac-osx-adobe-brackets-cannot-find-file-js-part-of-brackets-to-edit-stat

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