1.0.9 • Published 3 years ago

rona v1.0.9

Weekly downloads
134
License
MIT
Repository
github
Last release
3 years ago

rona

Build Status npm Open Source Love Open Source Love

convert require syntax to ES6 import syntax

Supported conversions

const something = require("example"); // => import something from "example";

const Ben = require("person").name; // => import { name as Ben } from "person";

const { something } = require("things"); // => import { something } from "things";

const { something, anotherThing } = require("things"); // => import { something, anotherThing } from "things";

const something = require("things")(); // => import something from "things";

require("things"); // => import "things";

require("../things"); // => import "../things";

const something = require("things").something(); // => import { something } from "things";

const { thing, thingy: anotherThing } = require("module"); // => import { thing, thingy as anotherThing} from "module"

const {
  thing,
  anotherThing,
  widget: renamedWidget,
  shape: anotherShape,
  color,
} = require("module"); // => import { thing, anotherThing, widget as renamedWidget, shape as anotherShape, color } from "module";

Installation

npm install -g rona
yarn global add rona

Usage

::

Usage: rona [options]

rona is a tool that converts your project require syntax to ES6 import syntax as it should be

Options:

  --version,  -V            output the version number
  --path,     -p            provide a path to run rona
  -h,         --help        output usage information

Example:
  rona --path ./src

Contribution

License

MIT

Author

Igwaneza Bruce

knowbeeinc@gmail.com

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago