-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
IMO npm has more drawbacks from security side than benefits (in short: if you install grunt via npm you get hundreds of packages where you dont know what most of them really do. Furthermore, there seem to be CVEs found in another dependency weekly…)
I just thought about which jobs grunt currently has and how they can be replaced:
- Compress all static files (
*.ttf,*.js,*.css,*.ico,*.svg) with gzip → this can be also easily done in Python with a small modifiedcollecstaticmanagement command. - Run autoprefixer on all CSS-files → That was/is quite convenient for browser-prefixed CSS-attributes, but do we really need this any more?
- Generate sprites → Just drop it and use no sprites? With HTTP >= 2 sprites should have a smaller (or no?) impact on performance. This would be also a good chance to switch to SVG icons everywhere.
- jshint → just add static analysis for JS in the CI?
- For less.js (that converts all less-files to CSS-files) there are IMO more options
- just let developers use the version of their linux-distribution (drawback: it could be outdated)
- use a reimplementation like https://github.com/lesscpy/lesscpy (that is written in pure Python)
- migrate to SASS: https://sass.github.io/libsass-python/index.html is available via pypi
- migrate to pure CSS: This still misses some less features like mixins or loops, but most browsers support features like CSS variables nowadays.
- minifcation (in contrast to uglification you can still review the result…)
- LESS or SASS can compress the CSS. Otherwise there are tools like https://github.com/ndparker/rcssmin
- JavaScript can be minified with https://github.com/ndparker/rjsmin
- SVG can be minified with https://github.com/scour-project/scour
Reactions are currently unavailable