Development Dependencies
Linear Admin relies on several open-source projects to function correctly. The following catalog outlines the primary dependencies and their roles within the project.
Parcel
Linear Admin uses Parcel as its bundler. Parcel is responsible for bundling all the required files and dependencies of the project into a single, optimized file that can be served to the browser.
ParcelJS is different from other bundlers like webpack because it does not require any configuration or setup to get started. It uses a zero-config approach where it automatically detects and bundles the required files for a project based on the file types and dependencies in the project.
Following Parcel scripts are configured in package.json
:
"scripts": {
"start": "parcel src/html/pages/*.html",
"build": "parcel build src/html/pages/*.html --public-url ./"
},
- The
start
script is used for development and thebuild
script is used for production. - The
.parcelrc
file can be found at the root of the project and it contains the configuration for ParcelJS.
PostHTML
Linear Admin utilizes PostHTML to process HTML files, particularly when serving partial HTML files using posthtml-modules plugin. PostHTML is a powerful tool that allows developers to transform HTML code using JavaScript plugins. PostHTML is configured using the .posthtmlrc
which you can find at the project root.
Example usage:
<module href="./src/html/partials/_sidebar.html"></module>
Prettier
Linear Admin uses Prettier to format the code. To make any changes to Prettier’s configuration, the .prettierrc
file can be located at the root of the project.