Socket
Socket
Sign inDemoInstall

@dylan/balm

Package Overview
Dependencies
141
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dylan/balm

Balm for Dylan's Beard.


Version published
Weekly downloads
47
increased by6.82%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Balm

Balm is a component file format that allows the inlining of blocks (template, style, script, and a server side javascript handle). These blocks are extracted, bundled, import paths modified, styles and markup optionally scoped, and written to the hidden balm folder for use in esbuild bundling. This is balm for Dylan's beard.

Features

  • Collocation
  • Scoped styles
  • Dynamically built bundles in balm blocks
  • Memory cached compiled templates
  • HMR for css, js, template, and server side javascript handles
  • Bundling via esbuild

Install

npm install @dylan/balm

Usage

const dylan = require('dylan');
const { resolve } = require('path');
const root = resolve('app');
const engine = {
  name: '@dylan/balm',
  opts: {
    root,
    origin: 'https://statics.website.com',
    watch: process.env.NODE_ENV === 'development',
    bundle: process.env.NODE_ENV === 'development',
    browserslist: [
      'last 2 versions',
      '> 2%'
    ],
    components: {
      renderer: 'clonedAndMergedLocalsComponent',
      shortcut: [
        {
          dir: root + '/components',
          alias: (name) => name
        },
        {
          dir: root + '/subdomains/hub/components',
          alias: (name) => `hub.${name}`
        }
      ]
    },
    esbuild: {
      entryPoints: [
        'app/assets/styles/app.css',
        'app/assets/scripts/app.js',
        'app/assets/statics.css'
      ]
    }
  }
};

const app = dylan({ engine });

Keywords

FAQs

Last updated on 17 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc