-
Notifications
You must be signed in to change notification settings - Fork 175
Initial gulp Documentation #24
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
Conversation
@travm You don't mind that I flesh out things in this manner? |
@contra Would you like to review these md docs? |
@dashed Not at all, I appreciate the help! It may be better to wait for it to be merged and then fork the main repo and submit a PR from your fork with your changes. I'm wondering what would be the best way to collaborate on the docs. @addyosmani How would you prefer we update and submit changes to the documentation? I know organization discussions are still taking place and I don't want to get things started in the wrong direction. |
@travm I should probably do a PR on your fork of the repo? |
Also https://stackedit.io/ would be super useful for this. |
|
||
## Difference | ||
The core difference with gulp as compared to Grunt or other build systems is that it is a _streaming_ build system. This removes the need for temporary files and folders and gives you more refined control of how your files flow through the task runner. Additionally, the file you create to run tasks is code instead of config. If you are familiar with Node.JS or the CommonJS spec, then you will feel right at home when writing your tasks file. |
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.
Node.js
Also need some mention of streams, concurrency, and running tasks synchronously and task dependencies. // @contra |
Check out the wiki again btw if you haven't seen it in a while - it has changed quite a bit and has a lot more info |
Thanks everyone! @sindresorhus and @dashed A lot of good points. I'll correct these asap. @contra Thanks for letting me know. I hadn't seen the updates. Those recipes will help, especially the Mocha one as we need a testing example. What is the best practice with documentation projects like this? Should I close the PR, resolve these issues and the submit another? Any guidance would be appreciated! cc @addyosmani |
@travm just push more commits to this PR when you're ready and we'll squash it at the end ;) |
@sindresorhus Much appreciated. :) I'll get these fixed after work this evening and add in the remaining tasks. |
@travm I only looked through the beginning md docs. I'll need to set aside some time to look through the rest extensively. |
As @sindresorhus has already mentioned, great work. We can continue iterating on this PR and just squash your commits at the end of the process once you're ready :) |
Okay, I think that should cover most of the initial corrections. I apologize if I missed a few. LiveReload section has been fleshed out a bit more, but may need to be further explained. To do:
|
@addyosmani @sindresorhus what do you guys think of the little convention to only use one line per sentence and each sentence a new line. So a sentence like
would be written as
This makes it easier to see diffs in commits etc.. |
@PascalPrecht no, and github now support wrapping lines in diffs: https://github.com/blog/1707-soft-wrapping-on-prose-diffs |
Streams introduction is complete. Let me know if I should go into more detail. I was afraid of overwhelming readers in the introduction, so I kept it very basic. Added a quick reminder about To do:
|
|
||
## What are Streams? | ||
Streams were designed to perform complex operations by using a collection of smaller, single purpose applications in a sequence. The idea was that we could stack these applications end to end and then pass the output of one application into the input of another. As the data passes through each application it is modified (or analyzed) and then piped to the next application in the sequence until the stream is complete. This connection of applications is referred to as _piping_ and the collection of pipes as a whole is referred to as the _pipechain_. |
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.
Streams wereare designed to perform complex operations by using when constructed as a sequence of smaller, single purpose applications (streams?) in a sequence. The idea was that we could stack These applications (streams?) would connect from one end -point to end and a starting-point of another, then pass the output of one application into the input of another. As allowing the passage of the data passes through each application it is to be modified (or analyzed) at each application. and then piped to the next application in the sequence until the stream is complete. As data make their journey through streams, they may have been modified or transformed so as to be indistinguishable from what they have begun to be. This connection of applications is a concept referred to as piping, (comma here) and the collection of pipes as a whole is referred to as the pipechain.
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.
Good suggestions and corrections! I'll put some more thought into this and maybe add an real world example to make it easier to understand for people who are completely new to the idea of streams.
Maybe a quick primer of http://nodejs.org/api/events.html and mention the standard events of streams? These seem to be frequently used handlers: |
I'm beginning to wonder if this stream and api information wouldn't better be suited in the Node and npm chapter? Thoughts? |
It may mislead readers to its relevance in the book until they read the gulp chapter. |
Yeah, that's true. Maybe if another tool makes use of streams then we could unify the streams information in the Node chapter and each tool can reference it. For now, It's probably best to remain here. My biggest fear with including api information this early is that we may overwhelm our target audience who may have never used Node or npm before. What do you think about including more advanced api information and examples after the introductory content? |
I certainly wouldn't mind seeing more advanced information after the introductory portions. |
Sounds great! I'll be committing more of the basic documentation for review very soon. |
@sindresorhus how happy are you with the current state of the chapter? |
@addyosmani happy :D @travm very nice work! @dashed thanks for reviewing. |
Thanks so much for all of the hard work @travm! |
@sindresorhus @addyosmani My pleasure! I'm glad I can help! |
Here's some of the initial gulp documentation for writing tasks (and a few other additions). There is a lot more to be done, but this should get us started.
With all the discussions going on, I'm unsure if this is the approved way of organizing this content. This was written using the initially approved content base by @rowoot.