Closed dax70 closed 8 years ago
I suppose you pressed the big red button?
The Hitchhiker's Guide to the Lupa defines Big Red Button as "Index Project" button. I also says that in order to index all files in the project you're gonna need to create lupaProject.json file in root directory of your project, e.g.
{
"filePattern": "src/**/*.js",
"autolabels": []
}
https://atom.io/packages/atom-lupa
Although there is some corner case which I haven't handled yet. Before indexing you have to open some file you have in project (e.g. foo.js
or bar.js
or any file you have) because indexer takes file path from active file and then perform recursive directory search based on path from active file.
This basically means that you're for example in a Atom settings tab and you activate lupa, there will be error:
And this is a corner case I really need to fix.
But I assume from your message error, that you just haven't created lupaProject.json
(unless you've created such file - this would be indeed a bug).
Maybe I'm gonna do some sort of automatic creation of lupaProject.json
with default values in case that such file is not found. That would be less confusing.
TL;DR
lupaProject.json
have to exist in root directory of your project index project
button. This is temporary inconvenience :/ Thanks, this works. I am still exploring Lupa, great work so far.
A few suggestions, perhaps I'll find time to help with one up if you think they are worthwhile.
@anri-asaturov fixed this corner case which caused bug when user was in settings #15
Also, make the button create the lupaProj file if it does not exist.
I've added auto-creation of lupaProject.json file.
It now creates automatically lupaProject.json
if such file doesn't exist. It looks for the .git
directory to define what is the root of the project (because user can open file in some deep nested subdirectory e.g. /Users/foo/work/my-project/src/components/animated/Carousel.js
and there is a need to figure out somehow what is the root without asking user directly.
Later I'm gonna add detection of other "root indicators" like package.json, .eslintrc or node_modules directory.
Although some projects can have subpackages, where there is a main root with package.json etc. and there are some subpackages with separate package.json files etc.
[Enter steps to reproduce below:]
Atom Version: 1.7.3 System: Mac OS X 10.11.4 Thrown From: atom-lupa package, v0.5.14
Stack Trace
Uncaught Error: Lupa: couldn't find config file for /Users/eddyrecio/code/rw30/source/client/reducers
Commands
Config
Installed Packages