Socket
Book a DemoInstallSign in
Socket

@eulores/rollup-plugin-imba

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eulores/rollup-plugin-imba

Compile Imba source code with Rollup

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

rollup-plugin-imba

Use the Imba compiler (v2) to build *.imba files from source using Rollup.

Install

# npm:
npm install --save-dev @eulores/rollup-plugin-imba
# yarn:
yarn --dev add @eulores/rollup-plugin-imba

Quick start

Create a sample directory and download the plugin

mkdir sample
cd sample
yarn init
yarn --dev add rollup
yarn --dev add @rollup/plugin-node-resolve
yarn --dev add @eulores/rollup-plugin-imba

rollup.config.js

Create or edit rollup.config.js to add the rollup-plugin-imba plugin

import resolve from '@rollup/plugin-node-resolve';
import imbaPlugin from '@eulores/rollup-plugin-imba';

export default {
  input: 'src/sample.imba',
  plugins: [
    resolve({"extensions": ['.js', '.imba']}),
    imbaPlugin()
  ],
  output: {
    file: 'build/bundle.js',
    format: 'esm'
  }
};

package.json

Verify the required development dependencies in package.json

{
  "devDependencies": {
    "@eulores/rollup-plugin-imba": "^0.0.4",
    "@rollup/plugin-node-resolve": "^9.0.0"
  }
}

Create some source files

./build/index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Imba project</title>
</head>
<body>
    <script src="/build/bundle.js"></script>
</body>
</html>

./src/sample.imba

// use TABS to indent the code. Check how you save the source in your editor!
tag app-root
    def render
        <self>
            <h1> "It works!"

imba.mount <app-root>

Start developing your application.

npx rollup -c

Keywords

imba

FAQs

Package last updated on 17 Aug 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