New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@acutejs/core

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acutejs/core

Acute is a lightweight but opinionated framework that allows you to build web apps using web components.

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

Acute

Acute is a lightweight but opinionated framework that allows you to build web apps using web components.

It abstracts away some of the more tedious and repetitive parts of authoring custom elements, such as attribute-property binding, event handling and templating.

A simple component

Acute components are defined as objects. This pattern works nicely with modules:

HelloWorld.js

import { html } from '@acutejs/plugin-lit-html';

export default {
  props: {
    greeting: {
      default: 'Hello',
      type: String,
    },
    name: {
      default: 'world',
      type: String,
    }
  },
  render({ greeting, name }) {
    return html`
      <p>
        ${ greeting }, ${ name }
      </p>
    `;
  },
};

The createApp function

The createApp is used to register components with Acute.

app.js

import { createApp } from '@acutejs/core';
import litHtml from '@acutejs/plugin-lit-html';
import HelloWorld from './HelloWorld.js';

createApp({
  components: {
    HelloWorld,
  },
  plugins: [
    litHtml,
  ]
});

Your HTML file

Bootstrapping your app is as simple as including your base components.

index.html

<!DOCTYPE html>
<html>
  <head>
    <script async src="bundle.js"></script>
  </head>
  <body>
    <hello-world name="Acute"></hello-world>
  </body>
</html>

FAQs

Package last updated on 12 Jan 2020

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