Repository
Current version released
2 years ago
Cargo Parcel – Plugins
Cargo Parcel provides the possibility to extend the functionality with plugins. At the moment the following plugins are available:
- TwindPlugin - Integration of css-in-js solution with support for various presets. Details about Twind
Twind Plugin
Installation
Add dependencies to the import_map.json of your Cargo project.
{
"imports": {
"parcel_plugins/": "https://deno.land/x/cargo_parcel_plugins/",
"@twind/core": "https://esm.sh/@twind/core@1.0.1",
"@twind/preset-autoprefix": "https://esm.sh/@twind/preset-autoprefix@1.0.1",
"@twind/preset-tailwind": "https://esm.sh/@twind/preset-tailwind@1.0.1"
}
}
Create the twind configuration under /config/twind.ts
import { defineConfig } from "@twind/core";
import presetAutoprefix from "@twind/preset-autoprefix";
import presetTailwind from "@twind/preset-tailwind";
export default defineConfig({
presets: [presetAutoprefix(), presetTailwind()],
});
Add the TwindPlugin
to the Cargo Parcel configuration in /config/parcel.ts
...
import { TwindPlugin } from "parcel_plugins/twind/mod.ts";
...
export default {
// ...
plugins: [
TwindPlugin(),
],
// ...
};
Config Plugin
TODO
I18n Plugin
TODO