Built-In

JS and CSS files can be optimized further using these settings:

  1. compile

  2. bundle[-es6]

  3. lint

  4. es5

  5. transform

  6. beautify

  7. minify

  8. es5-minify

  9. minify-svg

  10. custom name

You can define or undefine your own optimizations in squared.json:

HTML

posthtml

@pi-r/posthtml

5

prettier

@pi-r/prettier

6

html-validate

@pi-r/html-validate

3

html-minifier-terser

@pi-r/html-minifier-terser

7

html-minifier

@pi-r/html-minifier

7

svgo

@pi-r/svgo

9

CSS

postcss

@pi-r/postcss

5

clean-css

@pi-r/clean-css

6

csso

@pi-r/csso

7

stylelint

@pi-r/stylelint

3

sass

@pi-r/sass

1

JS

@babel/core

@pi-r/babel

4

eslint

@pi-r/eslint

3

prettier

@pi-r/prettier

6

rollup

@pi-r/rollup

2

terser

@pi-r/terser

7

uglify-js

@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.