Skip to content

Article idea: Building a jQuery plugin with grunt #223

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

Closed
cowboy opened this issue Jan 30, 2013 · 14 comments
Closed

Article idea: Building a jQuery plugin with grunt #223

cowboy opened this issue Jan 30, 2013 · 14 comments

Comments

@cowboy
Copy link
Member

cowboy commented Jan 30, 2013

Since grunt 0.4.0 and the standalone grunt-init are almost published, it would be very helpful to have an article on learn.jquery.com explaining how to use grunt to build a jQuery plugin.

I don't have the bandwidth to do this right now, but I'd like to work with someone in an advisory role to help make it happen.

I figure the article would be comprised of a few main parts:

  1. Creating a new plugin with grunt-init.
  2. Using grunt in a pre-existing plugin.

The first could explain how to install grunt-init, how to clone the jquery template, and then explain how to choose names and other metadata, linking to the appropriate docs on the plugins site. Then it could get into actually using grunt in the generated project, in a relatively basic way, linking to the grunt getting started guide.

The second could be as simple as saying that it's actually easiest to create a whole new project using the jquery template, and then copy over the parts that you need (like package.json and Gruntfile.js), adapting as-necessary.

People are going to write this guide if we don't, but it would be good to have it here as canon.

@zenorocha
Copy link

It will be nice to include n2 on jquery-boilerplate too

@markdalgleish
Copy link
Contributor

@cowboy asked me to help out on this, if it goes ahead. I've written a similar article that might help give you a rough idea of what this might look like: 'Testing jQuery Plugins Cross-Version with Grunt'

@cowboy
Copy link
Member Author

cowboy commented Jan 30, 2013

@markdalgleish basically, you'd need to update that article for the way grunt 0.4 works and focus more on the grunt-init jquery template stuff up-front. But I liked your overall approach!

@ajpiano
Copy link
Member

ajpiano commented Jan 30, 2013

+1 @markdalgeish, we'd love to have you take a shot at this and then include it. Let me know if you need any help getting started with the site setup, but basically all you need to do is add a new markdown file to page/plugins

@markdalgleish
Copy link
Contributor

@cowboy Yeah, I was planning to update the article since Grunt is just about to change significantly, but I wanted to make sure I had an article out before jQuery 2.0 lands :)

@ajpiano Thanks!

@cowboy
Copy link
Member Author

cowboy commented Jan 30, 2013

And please come talk to me about grunt 0.4 and grunt-init. I'm almost always in #grunt on freenode IRC!

@ajpiano
Copy link
Member

ajpiano commented Jan 30, 2013

And #jquery-content in Freenode if you want to talk about this site ;)

@gnarf
Copy link
Member

gnarf commented Feb 27, 2013

Just a ping, any update @markdalgleish ?

@markdalgleish
Copy link
Contributor

Initial version of the article is complete, just waiting on feedback from @cowboy: https://github.com/markdalgleish/learn.jquery.com/blob/master/page/plugins/building-plugins-with-grunt.md

@cowboy If you're busy, would you be happy for me to send a pull request and let you make/suggest edits later, if need be?

@gnarf
Copy link
Member

gnarf commented Feb 28, 2013

You should really do that work in a branch instead of your master :)

Please just rebase / submit the PR now, it will open it up to review by
everyone including @cowboy

@markdalgleish
Copy link
Contributor

@gnarf37 @cowboy I've opened a pull request - not from my master branch ;) #275

@cowboy
Copy link
Member Author

cowboy commented Feb 28, 2013

Ok, I'll look over it as soon as I get a chance. Thanks!

@scottgonzalez
Copy link
Member

Closing due to inactivity. If someone is interested in actually submitting an article, they can still do so using either grunt-init or yeoman. If an article is submitted, the submitter should explain in their PR why they chose one tool over the other.

@markdalgleish
Copy link
Contributor

@scottgonzalez I submitted an article in PR #275 (see above), but it fell into the review process black hole.

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

No branches or pull requests

6 participants