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

Rewrite .editorconfig #3474

Closed
udanpe opened this issue Jan 8, 2016 · 6 comments
Closed

Rewrite .editorconfig #3474

udanpe opened this issue Jan 8, 2016 · 6 comments
Labels

Comments

@udanpe
Copy link

udanpe commented Jan 8, 2016

Change [ * ] to [ *.js ] in .editorconfig
2 space: 403.ejs 404.ejs 500.ejs
4 space: homepage.ejs layout.ejs
Maybe write for [ *.ejs ] too?

@sailsbot
Copy link

sailsbot commented Jan 8, 2016

Thanks for posting, @udanpe. I'm a repo bot-- nice to meet you!

The issue queue in this repo is for verified bugs with documented features. Unfortunately, we can't leave some other types of issues marked as "open". This includes bug reports about undocumented features or unofficial plugins, as well as feature requests, questions, and commentary about the core framework. Please review our contribution guide for details.

If you're here looking for help and can't find it, visit StackOverflow, our Google Group or our chat room. But please do not let this disrupt future conversation in this issue! I am only marking it as "closed" to keep organized.

Thanks so much for your help!

If I am mistaken, and this issue is about a critical bug with a documented feature, please accept my sincerest apologies-- I am but a humble bot working to make GitHub a better place. If you open a new issue, a member of the core team will take a look ASAP.

@sailsbot sailsbot closed this as completed Jan 8, 2016
@udanpe
Copy link
Author

udanpe commented Jan 8, 2016

So, you will change [ * ] to [ *.js ] in .editorconfig or we must change this every times when installing new project? Use difference spaces in ejs file not seriously too. Or you afraid that something may break?)

@udanpe
Copy link
Author

udanpe commented Jan 8, 2016

Directories images js style need rename to img js css because it's standard or images javascripts styles (but if i don't use pluralize it's will look strange) I understand this is not so important but...

@mikermcneil
Copy link
Member

Hey @udanpe, you might want to check out custom generators in Sails. Our docs on the subject aren't great, but Irl has put together a great early in-depth tutorial here. Hope that helps!

@udanpe
Copy link
Author

udanpe commented Jan 9, 2016

Oh. Robert Martin and Steve Jobs will cry when they see sails
I can change code, i can use generations, i can write my own code, i can do more... But i and other 13100 users, want nice and powerful nodejs framework and if world want something it's will happen. You can be part of this. But now sails look as child toy. Bad code, many bugs, deprecated modules and nothing changes
Why i can use sails generate model outside the project?
Why after sails generate we have not formatting code
Why you don't use generally standards?
Why you don't change .editorconfig
Why you don't rewrite ejs file
Why you use bad name for static directories
(if i use pluralize need "styles" if not use need "style" so better use css js img)
Why you use crunt if gulp are more popular
Where i can found sails ide helper?
Where i can found sails debugger?
Why i must wait when found security bugs in non supported deprecated modules and then close my project and wait when you do something
And many other. If Rails, Django, Laravel, Express are used. Sails only wait... People see and wait...
If you didn't created sails other people created something else but now we only wait
For last year, You didn't do anything. You didn't fix old bugs and ignoring new. And if you say you afraid do something and sails never be changes its means sails dead

I don't want speak more. It makes no sense. Good luck.

@mikermcneil
Copy link
Member

Hi again, @udanpe. From your comment:

Change [ * ] to [ *.js ] in .editorconfig
2 space: 403.ejs 404.ejs 500.ejs
4 space: homepage.ejs layout.ejs
Maybe write for [ *.ejs ] too?

Why you don't change .editorconfig
Why you don't rewrite ejs file

I gathered you were suggesting that we change the .editorconfig file in newly generated Sails apps in order to apply 2 spaces to some EJS files and 4 spaces to others. As you probably agree, this seemed like a pretty strange request. But I spent about 30 minutes trying my best to figure out what was going on here, and I now understand that I misunderstood you: re: 4 spaces above-- in sails-generate-views, did you mean that .editorconfig file was still set to use tabs, from when the Sails framework was using tabs throughout? This was indeed unintentional, and I've corrected it, as well as formatting layout.ejs and homepage.ejs. The reason why no one else has brought this up before (including me), presumably, is because the generated .editorconfig file in new Sails projects is correctly set to 2 spaces (the convention we're using elsewhere for generated code files). Many text editors with an .editorconfig plugin (such as Sublime) automatically format the files as soon as you open them- hence the confusion. This has been resolved and will make it into the 0.12 release.

Directories images js style need rename to img js css because it's standard or images javascripts styles (but if i don't use pluralize it's will look strange) I understand this is not so important but...
Why you use bad name for static directories
(if i use pluralize need "styles" if not use need "style" so better use css js img)
Why you use crunt if gulp are more popular

re: my suggestion to look into generators: You suggested changing the default directories for images, stylesheets, and client-side JavaScript files in new projects. Unfortunately, I'm not willing to change these things in Sails at this time. One reason is because a large community of developers has become accustomed to this convention for the last few years. I'm not going to get into every reason of why I made the design choices I did in Sails here, but for example, the assets/styles/ folder of many developers contains .less files.

Sails is a convention over configuration framework: that means that some decisions are made for you by default. You can almost always change these decisions-- and in this case, based on your comments, generators seem like the best fit. Here are a few more examples of the kind of things you can customize:

  • tweaking any of the settings in sails.config - including installing a custom view engine, installing a custom session store, or custom Express-compatible middleware and/or policies.
  • installing custom adapters from the community
  • writing your own custom adapter inline in your project (or publishing it to npm)
  • installing custom generators from the community
  • writing your own custom generator inline in your project and specifying the path to it in your .sailsrc file (or publishing it to npm)
  • installing custom hooks from the community
  • writing your own custom hook inline in your project's api/hooks/ folder (or publishing it to npm)

Why i can use sails generate model outside the project?

Generating a model in Sails is a special case of running a generator. Since generators are sometimes useful outside of the context of a Sails app (such as sails-generate-new, which is used to generate sails apps), we don't prevent you from doing this. You could always override this core generator in your project if this is important to you.

Why you don't use generally standards?

Where i can found sails ide helper?

Where i can found sails debugger?

I can change code, i can use generations, i can write my own code, i can do more... But i and other 13100 users, want nice and powerful nodejs framework and if world want something it's will happen. You can be part of this. But now sails look as child toy.

You're entitled to your opinion, of course, but this is definitely not the opinion of the community at large.

Why i must wait when found security bugs in non supported deprecated modules and then close my project and wait when you do something

I think we can safely call this addressed in the discussion you and I had here. Please refer to our security policy if you have questions about how we handle these sorts of security issues, or if you have a suspected security vulnerability to report. We also have fairly extensive documentation on security best practices in Sails apps you may want to take a look at. For context, here's an example of a recent potential DoS vulnerability which we were able to quickly address thanks to the community member who reported it, swift efforts of @sgress454 on our core team, and the collaboration of Guillermo Rauch from the Socket.io project.

And many other. If Rails, Django, Laravel, Express are used. Sails only wait... People see and wait...
If you didn't created sails other people created something else but now we only wait
For last year, You didn't do anything. You didn't fix old bugs and ignoring new. And if you say you afraid do something and sails never be changes its means sails dead

I'm sorry that you feel this way; but you have to understand that after spending countless hours working on this framework, both over the last year and the past four years; personally, it's hard to take statements like these seriously.

Oh. Robert Martin and Steve Jobs will cry when they see sails
I don't want speak more. It makes no sense. Good luck.

Thank you for taking the time to look into Sails. It's clear we've reached a bit of an impasse here, so at this point, in the interest of time, and to be fair to the other members of the community and our team, I agree that it's time for us both to withdraw from this discussion and get back to work. I hope that you find what you're looking for in another web framework soon, or maybe even take a stab at putting together your own project-- it can be a great learning experience. In any case, I sincerely wish you the best.

@balderdashy balderdashy locked and limited conversation to collaborators Jan 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants