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

Publish as package to npm for reusability #7

Closed
Glavin001 opened this issue Feb 20, 2016 · 10 comments
Closed

Publish as package to npm for reusability #7

Glavin001 opened this issue Feb 20, 2016 · 10 comments

Comments

@Glavin001
Copy link

If you publish this package I can add support for it on Atom Beautify. See Glavin001/atom-beautify#199
Thank you and great work!

@vingorius
Copy link
Owner

Good morning @Glavin001. I did read the article "How to add a Beautifier for a Language" a couple month ago. i forked your atom-beautify for adding jade support. and i tried. but as a newbie, it was too diffcult to do. With my whole heart, i want to contribute community if i can. but it will take many time to find out how atom-beautify work and to run coffeescript. If there are a short way to help you, tell me. tks.

@Glavin001
Copy link
Author

Don't worry about that Atom Beautify integration -- I will take care of that for you 😃 . If you could publish a package that implemented jade beautification then I will make the appropriate changes to Atom Beautify.

Suggested usage for jade beautify package:

var jadeBeautify = require('jade-beautify');
var code = "...";
var options = {
  indent_size: 4
};
try {
  var output = jadeBeautify(code, options);
} catch (error) {
  // Error occurred
}

Great work so far. Thanks in advance!

@vingorius
Copy link
Owner

Ok @Glavin001. Did you mean that i write a new npm package for atom-beautify. if yes, i will. and how about changing it's name to 'beautify-jade' without confusing.

@Glavin001
Copy link
Author

Did you mean that i write a new npm package for atom-beautify.

Yes, to publish to npm, (see https://docs.npmjs.com/getting-started/publishing-npm-packages for details) however not necessarily specifically for Atom Beautify.
By publishing to npm it will allow other developers to access your package as well. Maybe a Sublime package will use it, etc.
The important part is that it is modular, does not depend on Atom at all. It is just a simple, Node.js package published to npm.

how about changing it's name to 'beautify-jade' without confusing.

Atom packages are published with apm while Node.js packages are published to npm.
I do not see an existing package named jade-beautify published to npm yet. See https://www.npmjs.com/search?q=jade-beautify

So please feel free to keep the the name as jade-beautify.

Thank you.

@vingorius
Copy link
Owner

Ok. i understand you clearly. but is it possible that a module support both a npm node moudle and a atom package simultaniously ? there's only one entry-porint 'main' on 'package.json' file.

@Glavin001
Copy link
Author

It would probably be easiest if you created a separate package to publish to npm.

@vingorius
Copy link
Owner

That's what i say it making confusing.
Avoid name conflicting on github, how about change library package name to 'jade-beautifier'?

@vingorius
Copy link
Owner

And FYI, Jade change it's project name to 'Pug'.

pugjs/pug#2184

@Glavin001
Copy link
Author

Good eye! I did not know that. Thanks for sharing.
So I suppose pug-beautify makes sense and afterwards I will add pug support to Atom Beautify.

@vingorius
Copy link
Owner

Good Morning @Glavin001 . I'm very happy to release a pug-beautify on npm. First i modified the jade-beautify for monitoring whether there's error. Check that module what you want. Enjoy it. Thanks.

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