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

@teambit/generator

Package Overview
Dependencies
Maintainers
17
Versions
1637
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teambit/generator

Create extension enable generating new components by a default template or extensions registered to this extension.

  • 0.0.26
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
increased by109.98%
Maintainers
17
Weekly downloads
 
Created
Source

Create extension enable generating new components by a default template or extensions registered to this extension.

Configuration

Add to your config the following:

"create": {
  "template": "your-extension"
}

How to extend

First, add this extension as a dependency to your extension. Then, in the provider, register to this extension and provide a function that returns the template files. Here is an example:

create.register({ name: 'extensions/gulp-ts' }, (name) => {
  return {
    files: [
      { path: `${name}.js`, content: `export default function ${name}() { console.log('hello'); }` },
      { path: `${name}.spec.js`, content: `export default function ${name}() { console.log('hello from spec'); }` }
    ],
    main: `${name}.js`
  };
});

FAQs

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

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