Built-In
JS and CSS files can be optimized further using these settings:
compile
bundle[-es6]
lint
es5
transform
beautify
minify
es5-minify
minify-svg
custom name
You can define or undefine your own optimizations in squared.json
:
HTML
@pi-r/posthtml |
5 |
|
@pi-r/prettier |
6 |
|
@pi-r/html-validate |
3 |
|
@pi-r/html-minifier-terser |
7 |
|
@pi-r/html-minifier |
7 |
|
@pi-r/svgo |
9 |
CSS
@pi-r/postcss |
5 |
|
@pi-r/clean-css |
6 |
|
@pi-r/csso |
7 |
|
@pi-r/stylelint |
3 |
|
@pi-r/sass |
1 |
JS
@pi-r/babel |
4 |
|
@pi-r/eslint |
3 |
|
@pi-r/prettier |
6 |
|
@pi-r/rollup |
2 |
|
@pi-r/terser |
7 |
|
@pi-r/uglify-js |
8 |
These plugins can be configured using a plain object in settings.transform
. Import maps [1] are available for plugins which resolve imports through the file system. Other non-builtin transpilers can similarly be integrated by defining a custom function.
NPM custom package
Local file using module.exports (e.g. “.cjs”)
Local plain file with single function (e.g. “.js”)
Inline function
Tip
More advanced plugins can be written when installed through NPM.