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
Specificy less-plugin-clean-css dependency #312
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you not notice that there is "@wikimedia/less-plugin-clean-css": "^1.5.2"
also listed in the devDependencies
section?
Line 26 in 137c8b5
"@wikimedia/less-plugin-clean-css": "^1.5.2", |
It is an organization-scoped dependency with no apparent modifications other than the organization scoping.
I could not figure out why the organization-scoped dependency would not work. But I did not spend too much time investigating either. If you have found the non-organization-scoped dependency to work well, you should probably replace the dependencies.
With all that said, I am slowly revamping the whole website to use jekyll and GitHub Pages more efficiently ( read natively ). Which means that the lessc
dependency might go away completely.
No, I didn't notice that! Curiouse... The |
So even Did you try it out, to see if it runs your end? |
package.json
Outdated
@@ -23,10 +23,9 @@ | |||
"license": "(OFL-1.1 AND MIT)", | |||
"dependencies": {}, | |||
"devDependencies": { | |||
"@wikimedia/less-plugin-clean-css": "^1.5.2", | |||
"less-plugin-clean-css": "^1.5.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package dependencies are inserted in lexical order by the npm
CLI. That means that the next time a new package is added to the set, this line will be re-ordered to under the less
dependency making an unrelated change at that point. Hence, it is better to keep it at line 29 in this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this should probably also have an accompanying change in package-lock.json
Badges are links to hosted SVG files. Since https://github.com/wikimedia/less-plugin-clean-css is a fork of https://github.com/less/less-plugin-clean-css, they probably inherited the badge from the source project and did not bother to change it. The only visible change they made was to scope the package to the organization, bump the version and publish it to the NPM registry PS : badges on readmes should not be considered to be sources of truth.
It would not because Investigating deeper, I found that the 2 packages lock different major versions of
PS : the
I have not put in too much effort into this since I am more invested in testing the ruby version dependency that I mentioned in https://github.com/ForkAwesome/Fork-Awesome/pull/309/files#r677254767. I will, however, test this one too with a couple of ruby versions and report back. |
I spent time investigating this issue. I have detailed my findings in #311 (comment). The solution that I came up with is : diff --git a/package.json b/package.json
index 933df7318..9720e7afc 100644
--- a/package.json
+++ b/package.json
@@ -23,9 +23,9 @@
"license": "(OFL-1.1 AND MIT)",
"dependencies": {},
"devDependencies": {
- "@wikimedia/less-plugin-clean-css": "^1.5.2",
"all-contributors-cli": "^6.16.0",
"less": "^3.11.3",
+ "less-plugin-clean-css": "less/less-plugin-clean-css#master",
"svgo": "^1.3.2"
},
"engines": { Apply this patch and see if it still works for you. |
Going to merge this! Half way to finishing #311 ! |
which should have gone together with ForkAwesome#312 reference : ForkAwesome#312
Add
less-plugin-clean-css
topackage.json
.After a bit of digging in #311, I found out that specifying this package allows the site to build without error! Perhaps this functionality was earlier part of
lessc
, and then split off as a plugin? I'm not fully sure why it works, but it works 😅