Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edge-supercharged

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-supercharged

Supercharged components for Edge template engine

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by8.45%
Maintainers
1
Weekly downloads
 
Created
Source

Table of contents

  • Edge Supercharged

Edge Supercharged

Supercharge your components and use them as edge tags

gh-workflow-image typescript-image npm-image license-image synk-image

Edge supercharged enables you to use your components as edge tags. It began by scanning all the templates stored inside the ./components directory of your view root and make them available as tags.

Usage

Install the package from npm registry as follows

npm i edge-supercharged

# yarn
yarn add edge-supercharged

And use it as follows

const edge = require('edge.js').default
const { Supercharged } = require('edge-supercharged')

const supercharged = new Supercharged()
edge.use(supercharged.wire, {
  recurring: process.env.NODE_ENV === 'development'
})

During development, you must set the recurring option to true, so that edge reapplies the plugin on each render call. This will allow edge-supercharged to re-discover the components from the filesystem.

Creating components

The components must live inside the ./components directory relative to the views directory and then you can reference your components as tags.

Instead of using the component as follows

@component('button', { type: 'submit' })
  <span> Submit form </span>
@end

You can use it as follows:

@button({ type: 'submit' })
  <span> Submit form </span>
@end
Learn more ➞

Keywords

FAQs

Package last updated on 01 Jun 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc