Comments (6)
Let's go with 2
. We might want other options in the future.
from alfy.
This also made me think, should we also bundle alfred-link
here, to make it a fully featured experience out of the box? We could depend on alfred-link
and just proxy it in a binary here as alfy-setup
/alfy-init
(we might want to do other things in the future, so could be useful to have a generic name).
from alfy.
Let's go with 2. We might want other options in the future.
My thoughts exactly!
Should we also bundle
alfred-link
here
Yes sure, why not. One dependency instead of 3 would be a very nice improvement.
from alfy.
Ok, I started looking into this and I think we have to rethink the way we want to do this.
My first thought was that we just put alfredNotification()
at the top of the index file and we're done. But, we have to have a way of disabling this behaviour (see alfy.configure()
).
Option 1 - Opt-in
Instead of opt-out, we also could go for opt-in and offer a alfy.updateNotification()
method. Rather have an opt-out though because this might be easily forgotten.
Option 2 - output
Run the alfredNotification()
method in the alfy.output()
method which will be used in all the workflows, or am I wrong here?
Option 3 - cli flag
Disable the behaviour in the workflow script with a flag (which is default true
).
$ run-node index.js --no-notification
Downside is, we will have to parse this flag. We could also go for an environment variable.
Option 4 - package.json
Add an alfy
section to package.json
with some config options.
{
"name": "alfred-ng2",
"version": "0.4.0",
"alfy": {
"disableNotification": true
}
}
The thing we should check for this, is it easy to read the package.json
file from the workflow itself with something like read-pkg-up
?
My personal favorite is option number 4 to be honest. Easy to configure for users, easily understandable and easy to add new options for the future.
But feedback is always welcome. Like to discuss this first before implementing it :).
from alfy.
I checked what read-pkg-up
does when executed within Alfy, and it just returns the workflow package.json
. So number 4 would be perfectly possible.
from alfy.
Let's go with 4.
"disableNotification": true
=> "updateNotification": false
from alfy.
Related Issues (20)
- Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader HOT 3
- Type for "mods" requires all properties to be defined
- alfy.matches doesn't work with umlauts
- fetch method does not work correctly HOT 1
- fetch with `json: false` is ignored? HOT 2
- Script filter with images? HOT 1
- Usage with bun? HOT 1
- Dependabot alerts on dependencies HOT 2
- Using console log in global scope crashes the execution HOT 3
- Package location different than workflow location
- Cannot use import statement outside a module HOT 1
- Package workflows so that end users donβt require `node` at runtime? HOT 1
- How should Alfy change to accommodate the new Alfred Gallery? HOT 2
- How to show a loading indicator? HOT 1
- Alfred 5 HOT 1
- Unable to install and use Alfred workflow locally HOT 1
- Alfy.fetch not working with https HOT 1
- alfy-init failed if using volta as a toolchain manager.
- Question about caching, fetch vs alfy.fetch HOT 1
- Search for multiple object properties in `alfy.matches` and `alfy.inputMatches` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfy.