Giter VIP home page Giter VIP logo

Comments (9)

robsonsobral avatar robsonsobral commented on May 23, 2024 1

the editor config file

I can't see any effort on creating one. It's just to fix the line endings and indentation. I prefer to use tabs, but I lost the battle and set my editor to use spaces. So, I had to replace all of them before to submit my PR.

GULP

It's just a matter of add gulp to the package.json scritps:

"scripts": {
  "gulp": "gulp"
},

Anybody with Gulp installed globally, can run gulp watch. Other ones, like I did, can run npm run gulp watch. No need to update anything.

Tests

I'm studying Jest and I'm really impressed. Fast and easy. I almost wrote an test for the pattern function before my PR, but had some problems at home to attend to.

CHANGELOG

The file isn't to replace tags, but just to keep track of what changed and when. I also use tags. Every time I run the npm version command, a prescript adds the right tag and date to changelog file. I can write it, if you want to.


Also, the lock file is important to make sure everybody is running the same versions of dependencies. As it is automatically created, there's no extra effort.

from bouncer.

robsonsobral avatar robsonsobral commented on May 23, 2024 1

Actually they do need an empty final line. Did you never saw the "No newline at end of file" warning on git? Diff and patch utilities complain about it a lot.


Ok! I made a sample of each suggestion! Each one on a different branch, if you want to accept a PR.

  1. editor config file, to make collaborators editors (or yourself when editing away from your own computer) respect the same file edition standards;
  2. to make gulp locally available and to add 2 common scripts alias;
  3. add the dependencies lock file to make sure every contributor uses the same dependencies versions;
  4. add the changelog file. Every run of npm version SOMETHING or yarn version --SOMETHING will move the unreleased section of changes to below a new one with the updated version number of package.json and date, before to add the git tag as usual.

from bouncer.

cferdinandi avatar cferdinandi commented on May 23, 2024

Thanks for these... great suggestions! Some quick thoughts...

add an editor config file, so everybody can respect the code style easilly;

I like this idea, but...

There's an effort vs. benefit challenge with this one. The amount of detail needed for this file to be useful (and then the need to maintain it if codebase styles change) vs. the number of folks that actually contribute to these projects makes its benefit negligible and the cost of creating it high.

It's easier to just fix little things here and there manually, since almost no one submits PRs with version number updates so I need to run a build and repush anyways.

allow the use of the Gulp installed dependency as an option to developers who doesn't install it globally (like me);

YES! Definitely. Migrating to Gulp 3 and updating the build process are on my todo list.

add tests;

Also on the todo list. Currently wrestling with which testing platform to move forward with.

centralize changes on CHANGELOG.md.

Probably won't be doing this. I maintain literally several dozen OSS projects, and even small added steps like this create work that ends up falling off the radar after a few releases.

I've found git tags (shown under the Releases tab) serve the same purpose and involve less effort on my part (since they're needed for CDN releases anyways... two birds, one stone)

from bouncer.

cferdinandi avatar cferdinandi commented on May 23, 2024

Jest has been on my short list, but I haven't had time to properly grok the docs yet. If you get even a test set up, I'd love to take a look.

I'm also open to seeing what the version command looks like (and maybe just porting it into my Gulp build). Also, good catch on adding Gulp to the package.json. I thought it already was, but I copy/pasted this from another project that must not have the updated list yet.

And I'm open to seeing what an editor config might look like.

from bouncer.

robsonsobral avatar robsonsobral commented on May 23, 2024

I'm preparing samples to show you!

Just two questions:

  1. Are you sure you want to use tabs on package.json? I didn't know that, since npm 5, npm commands which edit package.json respect its indentation;
  2. Why your files don't have a empty line at their end?

from bouncer.

cferdinandi avatar cferdinandi commented on May 23, 2024

Thanks!

  1. Yes. Tabs for all the things! 😜
  2. Because they don't need one?

from bouncer.

cferdinandi avatar cferdinandi commented on May 23, 2024

Actually they do need an empty final line.

I know PHP files do for weird legacy server reasons. JS and CSS files? Not that I've ever seen. Never once gotten that warning.

from bouncer.

robsonsobral avatar robsonsobral commented on May 23, 2024

I've to confess there's so many time a saw this warning that I don't recall the situation.

from bouncer.

cferdinandi avatar cferdinandi commented on May 23, 2024

Moved to individual issues.

from bouncer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.