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

vue-jscodeshift-adapter

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-jscodeshift-adapter

Run jscodeshift on Vue single file components

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42K
decreased by-0.42%
Maintainers
1
Weekly downloads
 
Created
Source

vue-jscodeshift-adapter

Run jscodeshift on Vue single file components

Install

npm install vue-jscodeshift-adapter -D

Usage

These steps assume you're familiar with jscodeshift.

1. Wrap your transform function

This module wraps your transform function, enabling it to run on Vue single file components (sfc).

my-transform.js:

const adapt = require('vue-jscodeshift-adapter');

function myTransform(fileInfo, api, options) {
  // fileInfo.source is the content of your sfc's <script>
  const source = fileInfo.source;

  return transformedSource;
}

module.exports = adapt(myTransform);

2. Run jscodeshift

$ jscodeshift <path> -t my-transform.js --extensions vue

See jscodeshift readme for more info.

License

MIT

Keywords

FAQs

Package last updated on 25 Feb 2018

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