Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve upon installation instructions #333

Closed
wants to merge 3 commits into from
Closed

Improve upon installation instructions #333

wants to merge 3 commits into from

Conversation

pqt
Copy link

@pqt pqt commented May 16, 2017

Closes #332

Just added the commands listed in the issue above to the readme, not dependant on any other branch feature and a simple change so I'm making the request directly for master.

pqt added 3 commits May 16, 2017 12:45
Improve instructions as per the issue:
    - #332
specify codeblock language style
Copy link
Member

@FagnerMartinsBrack FagnerMartinsBrack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made some comments, waiting for your feedback. No need to apply them right away, let's talk first.


- #### NPM
```
npm install js-cookie --save
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if using npm specific command example will help. People might be using yarn.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extremely fair point. perhaps it's own header separated section as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean creating one example for Yarn too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

@@ -41,10 +41,28 @@ in Internet Explorer on Windows 7 for instance (because of the wrong MIME type).

JavaScript Cookie supports [npm](https://www.npmjs.com/package/js-cookie) and [Bower](http://bower.io/search/?q=js-cookie) under the name `js-cookie`.

- #### Bower
```
bower install js-cookie --save
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we need to document the command? Bower exist for a while so I expect people to know the command of how to install it as long as we document it's supported. We can't teach people how to use their tools, they should know what they are doing before using the library.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not about teaching them their own tools, it's a convenience thing. I love it when it's done for me cause then I copy and paste the command knowing it'll work.

It's a mixture between commonplace and specificity.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I see. In this case, it's a tradeoff between convenience and adding more stuff to read. Besides, the README is pretty big already and there are some topics that direct you to links to reduce cluttering.

There are also arguments against copy/pasting code that also applies to commands, which might also be useful to people for learning purposes.

Do you think it's still worth adding this information here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still waiting for the answer to the question:

Do you think it's still worth adding this information here?

Copy link
Author

@pqt pqt May 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it's still worth it. While I agree with the ideology of the article, the whole purpose of this PR was to satisfy #332, so being explicit about the the available commands was apart of the fundamental focus.

```

```javascript
const Cookie = require('js-cookie');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link above sends the reader to #233 (comment). There there's a discussion on how to use it using the current mainstream tools.

Maybe we can document the ES6 module version because it's standard. But using code snippets for AMD might not be optimal since it occupies space in the README and it's a not standard thing.

We need to take care not to clutter the README with a lot of stuff. Maybe some of these could be in the Wiki?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely agree with this point. Adding it to the README might be too much. Though it seems like too small of a segment to justify a click-away wiki article.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what's the conclusion?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's too small for it's own Wiki, my preference remains in the README.

@Oxicode
Copy link

Oxicode commented May 19, 2017

+1

@FagnerMartinsBrack
Copy link
Member

FagnerMartinsBrack commented May 29, 2017

@austinpaquette Sorry to be so pedantic on this. It's that historically this project has invested a lot of effort to keep the README small, hope you understand.

Here's an idea, what do you think about creating one PR for each command and leave it for people to leave feedback over time and in the end we decide which ones to land? Everybody could do it in the form for a "+1" reaction.

Waiting for your feedback and thank you very much for this!

@pqt
Copy link
Author

pqt commented May 29, 2017

@FagnerMartinsBrack completely understand, I'll probably sit down and do it tonight!

@pqt pqt closed this May 29, 2017
@FagnerMartinsBrack
Copy link
Member

Thanks @austinpaquette, good stuff!

@FagnerMartinsBrack
Copy link
Member

FagnerMartinsBrack commented Jul 3, 2017

@austinpaquette Just pinging it back, did you manage to look at this? If not then I'll create a few issues to keep track of it.

@FagnerMartinsBrack
Copy link
Member

FagnerMartinsBrack commented Aug 19, 2017

@austinpaquette I have created #349, #350, #351, #352, and #353.

Waiting for community feedback.

Why?

Maybe Bower is not used a lot, maybe ES6 is getting traction, maybe CommonJS is used a lot, etc. It's hard to know if documenting something will have long lasting benefits. If they change the syntax of the tool or abandon it, then we'll still have to maintain the code snippet and change it here.

These will allow us to have an idea of what to do and some evidence if it might be worth documenting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants