Skip to main content
Unlike traditional frameworks, Squeditor prevents codebase bloat perfectly by forcing per-project compilation for UIKit3 functionality. It specifically pulls precisely only the capabilities declared actively while discarding everything else.

The Global Target

The squeditor/uikit-manifest.json file controls the blueprint schema. It accurately maps the exact internal source code requirements necessary for each component dynamically directly from the node_modules/ bundle.
uikit-manifest.json
{
  "_core": {
    "js": ["node_modules/uikit/dist/js/uikit-core.js"],
    "css": ["node_modules/uikit/dist/css/uikit-core.css"]
  },
  "accordion": {
    "js": ["node_modules/uikit/dist/js/components/accordion.js"],
    "css": ["node_modules/uikit/dist/css/components/accordion.css"]
  },
  "scrollspy": {
    "js": ["node_modules/uikit/dist/js/components/scrollspy.js"],
    "css": []
  }
}
The _core key acts as the universal engine root containing fundamental event handlers required globally. Every compile sequence safely includes _core intrinsically.

The Local Output Registry

Every distinct project must inform the build-components.js compiler what exact components it demands. The squeditor.config.js registry orchestrates this elegantly via the components[] array.
squeditor.config.js

module.exports = {
  framework: '../squeditor',

  // Select exact UI capabilities
  components: [
    'sticky',
    'accordion',
    'offcanvas',
    'scrollspy'
  ],

  // Directs output configuration explicitly
  output: {
    css: 'dist/assets/css',
    js: 'dist/assets/js',
  }
}
When you execute npm run build:css, Squeditor compiles output files corresponding directly to the elements declared in your template config. No unutilized framework code is bundled into the final build.

Output Generation

Two specific output bundles are reliably created in the target dist/ folder:
  • uikit-components.css
  • uikit-components.js
Simply attach them to your base.php structure.
base.php
<!-- Inside base.php <head> -->
<link rel="stylesheet" href="/assets/css/uikit-components.css">

<!-- Inside base.php end <body> -->
<script src="/assets/js/uikit-components.js"></script>