New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ebo

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ebo

A simple and small tool for quickly creating application components from templates by script.

  • 1.5.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ebo

A simple and small tool for quickly creating application components from templates by script.


To get started, you must install the module

npm install ebo --saveDev or npm install ebo --global


Create a questionnaire configuration file

./.ebo/questions.js

"use strict";

const questions = [
    {
        "type": "list",
        "name": "scenario",
        "message": "Scenario:",
        "choices": ["Component", "Markup"]
    },
    {
        "type": "list",
        "name": "hierarchy",
        "message": "Atomic hierarchy:",
        "choices": ["Organism", "Group"],
        "when": (e) => {
            return e["scenario"] === "Component"
        }
    },
    {
        "type": "list",
        "name": "type",
        "message": "Markup type: ",
        "choices": ["Page", "Popup"],
        "when": (e) => {
            return e["scenario"] === "Markup"
        }
    },
    {
        "type": "input",
        "name": "name",
        "message": "Name with spaces:"
    }
];

module.exports = questions;

More information: https://www.npmjs.com/package/inquirer


Create a deployment script

./.ebo/scripts.json

[
  {
    "condition": "answers.scenario.given === 'Component'",
    "action": "new",
    "src": "./.ebo/component.js.twig",
    "dest": "./example/component/{{answers.hierarchy.lower}}/{{answers.name.camel}}.js"
  },
  {
    "condition": "answers.scenario.given === 'Markup'",
    "action": "new",
    "src": "./.ebo/markup.html.twig",
    "dest": "./example/markup/{{answers.type.lower}}/{{answers.name.camel}}.html"
  },
  {
    "condition": "answers.scenario.given === 'Component'",
    "action": "inject",
    "expression": "//@ebo inject {{answers.hierarchy.lower}}",
    "place": "before",
    "src": "const {{answers.hierarchy.lower}}{{answers.name.firstCamel}} = require('./component/{{answers.hierarchy.lower}}/{{answers.name.camel}}');\n",
    "dest": "./example/main.js"
  }
]

Create templates

./.ebo/component.js.twig

"use strict";

console.log("{{answers.hierarchy.lower}}", "{{answers.name.camel}}");

More information: https://www.npmjs.com/package/twig


Run ebo

ebo

Keywords

FAQs

Package last updated on 11 Sep 2019

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