-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
This is excellent @francoischalifour. I'd choose the version automatically for the user and later I'd add a new command line option to force a specific version. If I'm a newcomer to IS I won't know about versions that I should get. |
Makes sense. So no option for the user yet, we only inject the latest version in the template? |
Ready for review @bobylito. |
lib/fetchVersions.js
Outdated
let libVersion; | ||
|
||
try { | ||
const results = await index.search('instantsearch.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index.getObject('instantsearch.js')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#mindblown package name are objectID's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
config/index.js
Outdated
@@ -0,0 +1,7 @@ | |||
module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename this file to something more specific like yarn_search-credential.js
or something in this spirit that actually describes the kind of config you're doing here. Also we might not need a config file for that. It's an implementation detail of the version fetcher IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool feature 👍 Thanks a lot @francoischalifour
…pp#8) * feat(version): add dynamic versioning * feat(version): fetch latest version all the time * chore: inline Algolia config * chore: use `getObject()` to get the index fix algolia/create-instantsearch-app#1
This feature is needed for a guide I'm working on 😁
npm-search
Algolia index2.4.1
as of now)Let me know if there are other ways to solve it!
Note: Node >= 7.6 is necessary because I've used
async
functions.