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

@framerjs/component-importer

Package Overview
Dependencies
Maintainers
36
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@framerjs/component-importer

Example utility that helps importing React components into Framer with basic support for TypeScript.

  • 0.0.16
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
36
Weekly downloads
 
Created
Source

ComponentImporter

Example utility that helps importing React components into Framer with basic support for TypeScript.

Getting Started

To install run yarn add @framerjs/component-importer.

Command Line

Run component-importer --help for documentation on how to use the component-importer from the command-line.

Example: writing a simple CLI

The component importer exposes a few functions, the most useful one is the compile functions which takes a CompileOptions as input and returns an EmitResult[].

import { compile } from "@framerjs/component-importer"

async function main() {
    const outFiles = await compile({
        rootFiles: ["my-package/src/index.tsx"],
        packageName: "my-package",
        tsConfigPath: "my-package/tsconfig.json",
    })

    for (const outFile of outFiles) {
        const file = path.join(args.out, outFile.fileName)
        const dir = path.dirname(file)
        console.log("Generating ", file)
        fse.ensureDirSync(dir)
        fse.writeFileSync(file, outFile.outputSource)
    }
}

main()

FAQs

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