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

Add support for 11ty #394

Closed
what1s1ove opened this issue Dec 17, 2023 · 8 comments
Closed

Add support for 11ty #394

what1s1ove opened this issue Dec 17, 2023 · 8 comments
Labels
feature request Feature request

Comments

@what1s1ove
Copy link
Contributor

what1s1ove commented Dec 17, 2023

Hey guys! I've just added your package to some of my small projects. Thank you so much for your work!!

Here is my knip.config.js as a result:

/** @typedef {import('knip/dist').KnipConfig} KnipConfig */

/** @type {KnipConfig} */
let config = {
	entry: [
		`source/scripts/index.js`,
		`eleventy.config.cjs`, // 11ty – config has a lot of dependencies
		`.linthtmlrc.cjs`, // linthtml
	],
	ignore: [
		`source/data/**/*.cjs` // 11ty
	],
	ignoreDependencies: [
		`linthtml-config-htmlacademy` // linthtml
	],
}

export default config

I would like to suggest adding an Eleventy plugin. Eleventy is a very cool static site generator.

@what1s1ove what1s1ove added the feature request Feature request label Dec 17, 2023
@what1s1ove
Copy link
Contributor Author

what1s1ove commented Dec 17, 2023

I am not sure if it's necessary to create an issue for my other suggestions, because I'm not sure if you'll be happy with many issues from me 😁

I'll write them here, and later, if you think it's necessary, I'll create separate ones.

  1. Add support for linthtml as well
  2. Before using your package, I used a Makefile as a file to store all my application scripts (not the scripts section in package.json). There are many reasons for this (comment support, variables, working with all platforms (Deno, Bun, etc.), and so on). I migrated the scripts to package.json along with your package since I have fairly small projects. However, as a future plan, you might want to consider expanding support for script files.
  3. I understand you here, but I still think it would be cool to have knip.config.js as a possible config file name, as most other configuration files have this prefix or plan to have it (usually with a migration to ESM).

@webpro
Copy link
Collaborator

webpro commented Dec 17, 2023

I am not sure if it's necessary to create an issue for my other suggestions, because I'm not sure if you'll be happy with many issues from me 😁

I'm interested in any type of feedback or input. Signals matter :)

I'll write them here, and later, if you think it's necessary, I'll create separate ones.

I think I speak not only for myself as a maintainer if I say that separate tickets for separate issues are almost always a good idea :)

@what1s1ove what1s1ove changed the title Add 11ty Add support for 11ty Dec 17, 2023
@what1s1ove
Copy link
Contributor Author

what1s1ove commented Dec 17, 2023

I am not sure if it's necessary to create an issue for my other suggestions, because I'm not sure if you'll be happy with many issues from me 😁

I'm interested in any type of feedback or input. Signals matter :)

I'll write them here, and later, if you think it's necessary, I'll create separate ones.

I think I speak not only for myself as a maintainer if I say that separate tickets for separate issues are almost always a good idea :)

Cool! Thank you! I've moved them to separate issues/comments.

@webpro
Copy link
Collaborator

webpro commented Dec 17, 2023

Thank you! Really appreciate the input.

Any chance you would be up for a PR and contribute to Knip? Sounds like creating a Knip plugin is similar to the Remix plugin. No worries if not!

@what1s1ove
Copy link
Contributor Author

Thank you! Really appreciate the input.

Any chance you would be up for a PR and contribute to Knip? Sounds like creating a Knip plugin is similar to the Remix plugin. No worries if not!

Of course, I'll try to do it in the middle of the week 🙏

@what1s1ove
Copy link
Contributor Author

what1s1ove commented Dec 19, 2023

Hey @webpro !

Could you take a look at the PR #404, please?

@what1s1ove
Copy link
Contributor Author

Hey @webpro
Since PR #404 is merged, I think it can be closed.

Btw, when can I try this? I see that it is already available on website - https://knip.dev/reference/plugins/eleventy/, but I still cannot try it in npm package 🥲

@what1s1ove
Copy link
Contributor Author

Thank you @webpro !
#404

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

No branches or pull requests

2 participants