yarn-lock-convert
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

npm version

yarn-lock-convert

This program uses yarn's official parser to read the yarn.lock file and then produce a promise that returns a json/object.

Install

YARN

yarn add yarn-lock-convert

or

NPM

npm install yarn-lock-convert

Usage

Typescript:

import * as yarnconverter from 'yarn-lock-convert';
//if you want an object
yarnconverter.toObject().then((yarnObject)=>console.log(yarnObject));
//if you want a JSON file
yarnconverter.toJson().then((yarnJsonString)=>console.log(yarnJsonString));
//if you want another directory
yarnconverter.toJson("/home/www/someproject").then((yarnJsonString)=>console.log(yarnJsonString));

Javascript:

const yarnconverter = require("yarn-lock-convert");
//if you want an object
yarnconverter.toObject().then((yarnObject)=>console.log(yarnObject));
//if you want a JSON file
yarnconverter.toJson().then((yarnJsonString)=>console.log(yarnJsonString));
//if you want another directory
yarnconverter.toJson("/home/www/someproject").then((yarnJsonString)=>console.log(yarnJsonString));

Credits

zimbatm - forked this project from theirs, and modified to my needs.

Readme

Keywords

Package Sidebar

Install

npm i yarn-lock-convert

Weekly Downloads

8

Version

1.0.2

License

ISC

Last publish

Collaborators

  • vasilevich