Made a couple of plugins (jira and docker) in javascript and I have to "hide the code" in a different folder and load it from a single file in the bitbar-plugins folder to avoid bitbar interpreting the wrong files.
Is there any best practice for that? I'd love to publish the plugins, but I don't know how to handle this problem.
here is the repo
https://github.com/dbuezas/jira-for-bitbar
same question.
It's there any way to ignore file just like .gitignore
@luoweihua7 I found this approach, may be useful for you also:
https://github.com/whitepages/bitbar-docker
$ npm install -g bitbar-docker
$ ln -s $(which bitbar-docker) bitbar-docker.10s.js
Also ran into this issue. Ideally I'd just like to have a package.json in the bitbar directory.
I think having an ignore file (.bitignore? 😁 ) would be the best solution.
I'm not sure what the problem is? I have about 10 plugins, all written in JS, and I point BitBar directly to that plugins dir.
They are all chmod +x and have the contents like:
#!/usr/local/bin/node
console.log('test')
@garyking The problem is not with the scripts themselves, they run fine. But in the NPM ecosystem, the recommended and canonical way to install dependencies is by using a package.json file to specify the dependencies and their versions.
bitbar will interpret this file as a script and try to run it, which will show up as an unwanted entry in the menu bar.
It would probably be a reasonable default behaviour to ignore data files (.json, .yaml, .txt, etc.) in general.
Indeed, so that's why I have the package file in my project's root
directory, then put the scripts in a subdirectory, then I don't have this
problem. I just point BitBar to my plugin subdirectory, then it never even
sees the package file.
On Sat, Dec 28, 2019 at 10:02 AM Lynn Smeria notifications@github.com
wrote:
@garyking https://github.com/garyking The problem is not with the
scripts themselves, they run fine. But in the NPM ecosystem, the
recommended and canonical way to install dependencies is by using a
package.json https://docs.npmjs.com/files/package.json file to specify
the dependencies and their versions .bitbar will interpret this file as a script and try to run it, which will
show up as an unwanted entry in the menu bar.It would probably be a reasonable default behaviour to ignore data files (
.json, .yaml, .txt, etc.) in general.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/matryer/bitbar/issues/442?email_source=notifications&email_token=AACT7BFLEUIZRRXMO4V2YZLQ25S63A5CNFSM4D5J4CVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYLSKY#issuecomment-569424171,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACT7BCM6U5XIFJCEVE2UWTQ25S63ANCNFSM4D5J4CVA
.
@garyking Smart! Thanks for the explanation, that's a good workaround. I will do the same.
Most helpful comment
Indeed, so that's why I have the package file in my project's root
directory, then put the scripts in a subdirectory, then I don't have this
problem. I just point BitBar to my plugin subdirectory, then it never even
sees the package file.
On Sat, Dec 28, 2019 at 10:02 AM Lynn Smeria notifications@github.com
wrote: