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

Getting Started with GRUNT #1744

Open
Luxcium opened this issue Apr 12, 2022 · 3 comments
Open

Getting Started with GRUNT #1744

Luxcium opened this issue Apr 12, 2022 · 3 comments

Comments

@Luxcium
Copy link

Luxcium commented Apr 12, 2022

Where to start if you are new to GRUNT?

Can you help me start with using GRUNT (or is it a legacy tool???)

Is the documentation up to date?

I am unsure how to start using GRUNT (with VS Code in a TypeScript project) and I do not know if it is still a thing that many people are using or not... I have the impression that it could help me fix many many problems I have at managing my (too many) projects...

I am new to GRUNT and I was looking at the documentation and the version was off compared to the available version on NPM.

At the moment of writing this:

 It appears that the version was updated only 12 hours ago 🎉

Useless rant to make you smile

I have that same feeling as when you arrive at the party and the best food in the buffet is all gone... I am unsure if I am too late to get into the GRUNT adventure when I read stuff like -> Grunt 0.4.x requires stable Node.js versions >= 0.8.0 or Be advised Grunt 1.0.0 no longer supports Node.js v0.8.

I think I started using nodeJS at v8.x and I have looked up on Wikipedia for insight but the information about older versions only starts at 0.10 (Node.js 0.8.0 was introduced on 2012-06-22).

@noelforte
Copy link

Hey @Luxcium, although Grunt is an older project, it is still maintained for security patches and basic quality-of-life updates (see #1700).

To answer your question about whether Grunt is still the best thing worth "getting into" these days, that's really up to you. At its core, Grunt is a simple task runner that lets you automate parts of your build pipeline. Given that there are other, more complex, more specific tools out there that will do everything grunt can and more, it really depends on what you're looking to do with whatever project you're considering using Grunt on. If your needs are simple and you're happy working with an older but solid build pipeline then Grunt will be very approachable in 2022, however understand that there might be tools out there that might better serve your needs if they're more complex or specific.

@jimmywarting
Copy link
Contributor

Speaking for myself: I like more or less build-less setups, i use ESM in both nodejs and browser (with script[type=module]) so that i don't need any build tools or wasting time compiling things.

then when i want to support more older versions then i use something to down-level the code using grunt, esbuild, webpack, or whatever build tool i'm using.

it work perfectly to have type safety with vanilla js + jsdoc
just need to turn on a few settings
Here are some things i got:

// settings.json

{
  // The 3 most important one:
  // Enable semantic checking of JavaScript files.
  // Existing jsconfig.json or tsconfig.json files override this setting.
  "js/ts.implicitProjectConfig.checkJs": true,
  // Enable suggestion to complete JSDoc comments.
  "javascript.suggest.completeJSDocs": true,
  // Preferred path ending with extension (good for ESM & cjs).
  "javascript.preferences.importModuleSpecifierEnding": "js",
  
  // Other suggestions useful stuff:
  // Complete functions with their parameter signature.
  "javascript.suggest.completeFunctionCalls": true,
  // Enable auto import suggestions.
  "javascript.suggest.autoImports": true
}

it's also possible to turn on strict mode

@jimmywarting
Copy link
Contributor

could close this issue now i think - this is pretty old

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

3 participants