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

jquery plugin support #6

Closed
acornejo opened this issue Mar 2, 2014 · 4 comments
Closed

jquery plugin support #6

acornejo opened this issue Mar 2, 2014 · 4 comments

Comments

@acornejo
Copy link

acornejo commented Mar 2, 2014

I've been using mversion with great pleasure. Unfortunately mversion does not work for projects which are registered as jquery plugins.

For a jquery plugin named X, the plugin file is X.jquery.json.

To support this, mversion should search for all files matching *.jquery.json in the current directory, and update their version numbers too (together with package.json, bower.json, etc)

Adding wildcard support to mversion should be relatively straightforward by using the node_module glob. I could submit a pull-request implementing this feature if necessary/preferred.

@mikaelbr
Copy link
Owner

mikaelbr commented Mar 2, 2014

Yes, I think this is a great idea! I think glob will be a good fit for defining files with support for more. Maybe some rewrite is required though, for reading all files.

@acornejo
Copy link
Author

acornejo commented Mar 2, 2014

If you want to maximize concurrency you could go with two nested calls to async.parallel, the first one to translate a pattern to a set of files (or a single file, if the pattern was just a filename). The second one to read each of the filenames.

In pseudo-code the flow would look like this:

async.parallel(_patterns.map(function (pattern)...
    glob(pattern, function (files) ...
        async.parallel(files.map(function (file)...

@mikaelbr
Copy link
Owner

mikaelbr commented Mar 2, 2014

I rewrote the inner workings of the module. It's now using streams internally and supports globs as patterns for supported files - adding a lot more power.

Hope you like it! Please notify me if you find any troubles using it.

@acornejo
Copy link
Author

acornejo commented Mar 2, 2014

Thanks Mikael, it worked beautifully.

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

No branches or pull requests

2 participants