open-index/open-npm huggingface dataset:
npm package: @ruby-native/react
Description: React components for Ruby Native
Latest version: 0.7.0

# @ruby-native/react

React components for [Ruby Native](https://rubynative.com). Use these in an Inertia.js + React app to emit the signal elements that Ruby Native's iOS and Android apps read to render native tabs, navigation bars, forms, and more.

## Install

```sh
npm install @ruby-native/react
```

## Usage

```jsx
import { NativeTabs, NativeNavbar, NativeButton, NativeForm } from "@ruby-native/react"

export default function Show({ product }) {
  return (
    <>
      <NativeNavbar title={product.name}>
        <NativeButton icon="bag" href="/cart" />
      </NativeNavbar>

      <NativeForm />

      {/* your page content */}
    </>
  )
}
```

Each component renders a hidden `data-native-*` signal element that the Ruby Native runtime picks up and turns into the corresponding native UI.

## Components

- `NativeTabs` - show the native tab bar
- `NativePush` - request push notification permission
- `NativeForm` - mark the current page as a form so back navigation skips it
- `NativeNavbar` - native navigation bar with title and buttons
- `NativeButton` - native nav bar button (icon, title, href, or click target)
- `NativeMenuItem` - item inside a native menu
- `NativeSubmitButton` - native "Save" button that submits a form
- `NativeOverscroll` - per-page overscroll colors

## Docs

Full guides at [rubynative.com/docs](https://rubynative.com/docs).

## License

MIT
npm package: @ruby-native/vue
Description: Vue components for Ruby Native
Latest version: 0.7.0

# @ruby-native/vue

Vue components for [Ruby Native](https://rubynative.com). Use these in an Inertia.js + Vue app to emit the signal elements that Ruby Native's iOS and Android apps read to render native tabs, navigation bars, forms, and more.

## Install

```sh
npm install @ruby-native/vue
```

## Usage

```vue
<script setup>
import { NativeTabs, NativeNavbar, NativeButton, NativeForm } from "@ruby-native/vue"
</script>

<template>
  <NativeNavbar :title="product.name">
    <NativeButton icon="bag" href="/cart" />
  </NativeNavbar>

  <NativeForm />

  <!-- your page content -->
</template>
```

Each component renders a hidden `data-native-*` signal element that the Ruby Native runtime picks up and turns into the corresponding native UI.

## Components

- `NativeTabs` - show the native tab bar
- `NativePush` - request push notification permission
- `NativeForm` - mark the current page as a form so back navigation skips it
- `NativeNavbar` - native navigation bar with title and buttons
- `NativeButton` - native nav bar button (icon, title, href, or click target)
- `NativeMenuItem` - item inside a native menu
- `NativeSubmitButton` - native "Save" button that submits a form
- `NativeOverscroll` - per-page overscroll colors

## Docs

Full guides at [rubynative.com/docs](https://rubynative.com/docs).

## License

MIT
npm package: @ruby-on-svelte/adapter
Description: Let's you use Ruby in Svelte
Author: Vallereya
Latest version: 1.0.1

# @ruby-on-svelte/adapter
Let's you use Ruby in Svelte!

## ⚡ Usage
Install with `npm i @ruby-on-svelte/adapter`.

```js
// svelte.config.js
import { RubyOnSvelte } from '@ruby-on-svelte/adapter';
...
const config = {
	preprocess: [
        ...
        RubyOnSvelte()
    ],
...
};
```

## ⚙️ Options
```sh
<script lang="ruby">
    # Pound sign for comments since it treats it was Ruby.

    # Example One
    $count = 0

    def increment
        $count += 1
    end

    # Example Two
    $name = "Ruby on Svelte"

    # Does actually print to browser console/terminal.
    puts "Hello, #{$name}!"
</script>
```
```html
<main>
    <p> Hello {$name}! </p>
    <button on:click={increment}> Count: {$count} </button>
</main>
```

## 📦 Requiring other Ruby files
- Unfortunately `require_relative` doesn't work right now.
- But `require` does:
    - If you **DO NOT** use `loadPaths` you should have the full path listed:
        `require 'src/lib/modules/ruby/hello'`
    - If you **DO** use `loadPaths` you can shorten that to this:
        `require 'hello'`
- To use the bare `require` statements, add the directories you want on Opal's load path when wiring the adapter within `svelte.config.js`:
```js
import { RubyOnSvelte } from './@ruby-on-svelte/adapter/index.js';
...
const config = {
    preprocess: [
        RubyOnSvelte({
            loadPaths: [
                'src/lib/modules/ruby'  // <- you can add root `./` if you want but its not needed.
            ]
        })
    ]
    ...
};
```

- Within you svelte file you'll have to assign the method(s) to a svelte store if using a Ruby global var, because the Ruby gets compiled before Vite/Svelte ever sees the JavaScript. So you can't use standard `import` statements to pull in `.rb` sources. So you have to use Ruby's `require`. If that global like `$name` is defined in a required file, add a `# @store $name` in the svelte component so the adapter knows to use it as a Svelte store.
```ruby
<script lang="ruby">
    require 'hello'
    # @store $name  // <- just add this before/after and should be `#` a pound sign needs to be added.
</script>
```
npm package: @ruby-s/use-rtc
Description: React hook to connect to WebRTC
Author: juyeong-s
Latest version: 1.2.1

# RTC

## Installation

1. `$ npm i @ruby-s/use-rtc`
2. Add `import useRTC from "@ruby-s/use-rtc"`

## How to use

### preinstalled-package

`$ npm install socket.io-client`

### Parameters

Only one object parameter is required.

```ts
{
  socket,
  participants,
  setParticipants,
}
```

`socket`

- type: `Socket` -> It depends on socket.io-client.

`participants`

- type: `Map<string, MediaStream>`

`setParticipants`

- type: `React.Dispatch<React.SetStateAction<Map<string, MediaStream>>>`

## Example

```ts
import { io } from "socket.io-client";

const socket = io("SERVER_URL");
const [participants, setParticipants] = useState<Map<string, MediaStream>>(new Map());

useRTC({ socket, participants, setParticipants });
```

Beware that if you create io inside a component, the socket object may be recreated every time it is rendered.

**participants**

participants is a Map.
The `key` is a string type `socketId`, and the `value` is a `MediaStream` type.

## Things to note

I have not been able to deploy Signaling Server because I have no financial income.
You should implement a simple signaling server.
The following are socket event name constants of Signaling Server.
Please make sure to name it below!

`server`  
| Event Name | EMIT or ON | description |
| --- | --- | --- |
| "send-hello" | ON | Get client connection |
| "receive-hello" | EMIT | Informing other clients of a particular client's position |
| "send-offer" | ON | Get an offer |
| "receive-offer" | EMIT | Send an offer to a specific client |
| "send-answer" | ON | Get an answer |
| "receive-answer" | EMIT | Send an answer to a specific client |
| "send-ice" | ON | Get an ice candidate |
| "receive-ice" | EMIT | Send an ice candidate to a specific client |
| "send-bye" | ON | Receive client exit event |
| "receive-bye" | EMIT | Notifying other clients of a specific client's exit |

## Example Code (Signaling socket server)

```ts
// .ts
import { Server } from "socket.io";

function SignalingSocketServer(io: Server) {
  io.on("connection", (socket) => {
    socket.on("send-hello", () => {
      const senderId = socket.id;
      socket.broadcast.emit("receive-hello", senderId); // broadcast
    });

    socket.on("send-offer", (offer, receiverId) => {
      const senderId = socket.id;
      socket.to(receiverId).emit("receive-offer", offer, senderId);
    });

    socket.on("send-answer", (answer, receiverId) => {
      const senderId = socket.id;
      socket.to(receiverId).emit("receive-answer", answer, senderId);
    });

    socket.on("send-ice", (ice, receiverId) => {
      const senderId = socket.id;
      socket.to(receiverId).emit("receive-ice", ice, senderId);
    });

    socket.on("send-bye", () => {
      const senderId = socket.id;
      socket.broadcast.emit("receive-bye", senderId);
    });
  });
}

export default SignalingSocketServer;
```

# useSocket

### Parameters

**`useSocket(path: string, namespace: string);`**

`path`: Base Path  
`namespace`: socket's namespace
npm package: @ruby2js/active-functions
Description: Zero-dependency, simple functions to assist the Ruby2JS active_functions filter
Author: Jared White
Latest version: 0.2.0

# @ruby2js/active-functions

[![npm][npm]][npm-url]
[![node][node]][node-url]

A growing collection of minimalist ES functions suitable for use in Ruby2JS, inspired by ActiveSupport.

## Documentation

* Visit **[ruby2js.com](https://www.ruby2js.com/docs/filters/active-functions)** for more information.

## Testing

Run `yarn test`.

## Contributing

1. Fork it (https://github.com/ruby2js/ruby2js/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## License

MIT

[npm]: https://img.shields.io/npm/v/@ruby2js/active-functions.svg
[npm-url]: https://npmjs.com/package/@ruby2js/active-functions
[node]: https://img.shields.io/node/v/@ruby2js/active-functions.svg
[node-url]: https://nodejs.org
npm package: @ruby2js/esbuild-plugin
Description: ruby2js plugin for esbuild
Latest version: 1.0.0

# @ruby2js/esbuild-plugin

[![npm][npm]][npm-url]
[![node][node]][node-url]

An [esbuild](https://esbuild.github.io) plugin to compile [Ruby2JS](https://www.ruby2js.com) (`.js.rb`) files to JavaScript.

## Installation

```bash
npm install --save-dev @ruby2js/esbuild-plugin
# or
yarn add -D @ruby2js/esbuild-plugin
```

You will also need Ruby installed and the Ruby2JS gem present in your project's Gemfile.

## Documentation

esbuild doesn't have a configuration format per se, so you'll need to create a JavaScript file which uses esbuild's Build API if you don't have one already.

Here's an example of a simple one you might use in a Rails app:

```js
// esbuild.config.js
const path = require("path")

const watch = process.argv.includes("--watch")
const minify = process.argv.includes("--minify")

require("esbuild").build({
  entryPoints: ["application.js"],
  bundle: true,
  outdir: path.join(process.cwd(), "app/assets/builds"),
  absWorkingDir: path.join(process.cwd(), "app/javascript"),
  publicPath: "/assets",
  watch,
  minify,
  plugins: [],
}).catch(() => process.exit(1))
```

However your esbuild configuration is set up, you'll need to add the `ruby2js` plugin to your plugins array:

```js
const ruby2js = require("@ruby2js/esbuild-plugin")

// later in the build config:
  plugins: [
    ruby2js()
  ]
```

Then simply run the config script (aka `yarn node esbuild.config.js`) to compile your Ruby2JS files to a JavaScript output bundle.

The Ruby2JS build process will look for a `config/ruby2js.rb` file to set configuration options. Alternatively, you can use a "magic comment" such as `# ruby2js: preset` at the top of `.rb.js` files to use the standard preset configuration.

See [Ruby2JS Options](https://www.ruby2js.com/docs/options) docs for a list of available options.

## Testing

```
git clone https://github.com/ruby2js/ruby2js.git
cd ruby2js/packages/esbuild-plugin
yarn install
yarn test
```

## Contributing

1. Fork it (https://github.com/ruby2js/ruby2js/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## License

MIT

[npm]: https://img.shields.io/npm/v/@ruby2js/esbuild-plugin.svg
[npm-url]: https://npmjs.com/package/@ruby2js/esbuild-plugin
[node]: https://img.shields.io/node/v/@ruby2js/esbuild-plugin.svg
[node-url]: https://nodejs.org
npm package: @ruby2js/register
Description: The require hook will bind itself to node's require and automatically compile files on the fly.
Author: Sam Ruby
Latest version: 0.0.2

One of the ways you can use Ruby2JS is through the require hook. The require
hook will bind itself to node's `require` and automatically compile files on
the fly. This is equivalent to Babel's
[@babel/register](https://babeljs.io/docs/en/babel-register).

## Install

```sh
npm install @ruby2js/register --save-dev
```

## Usage

```js
require("@ruby2js/register");
```

All subsequent files required by node with the extensions `.rb`
will be transformed by Ruby2JS.

**NOTE:** all requires to `node_modules` will be ignored.

## Specifying options

```javascript
require("@ruby2js/register")({
  // Ruby2JS options
  options: {
    eslevel: 2021,
    autoexports: 'default',
    filters: ['cjs', 'functions']
  },

  // Array of ignore conditions, either a regex or a function. (Optional)
  // File paths that match any condition are not compiled.
  ignore: [
    // When a file path matches this regex then it is **not** compiled
    /regex/,

    // The file's path is also passed to any ignore functions. It will
    // **not** be compiled if `true` is returned.
    function(filepath) {
      return filepath !== "/path/to/ruby-file.rb";
    },
  ],

  // Array of accept conditions, either a regex or a function. (Optional)
  // File paths that match all conditions are compiled.
  only: [
    // File paths that **don't** match this regex are not compiled
    /my_ruby_folder/,

    // File paths that **do not** return true are not compiled
    function(filepath) {
      return filepath === "/path/to/ruby-file.rb";
    },
  ],

  // Setting this will remove the currently hooked extensions of `.rb`
  // so you'll have to it them back if you want it to be used
  // again.
  extensions: [".rb"],
});
```

### Notes:

 * No caching is provided at this time.

 * This code uses the same [require hook](https://github.com/ariporad/pirates#readme)
   that Babel uses, so the same caveats and limitations apply.  In particular,
   `@ruby2js/register` does _not_ support compiling native Node.js ES modules
   on the fly, since currently there is no stable API for intercepting ES
   modules loading.
npm package: @ruby2js/rollup-plugin
Description: ruby2js plugin for rollup
Author: Sam Ruby
Latest version: 0.0.2

# @ruby2js/rollup-plugin

Integration between Rollup and Ruby2JS

## Installation

```bash
npm install --save-dev @ruby2js/rollup-plugin
# or
yarn add -D @ruby2js/rollup-plugin
```

## Usage (basic)

```javascript
// rollup.config.js
import ruby2js from '@ruby2js/rollup-plugin';

export default {
  input: 'index.js.rb',

  output: {
    file: 'bundle.js',
    format: 'iife'
  },

  plugins: [
    ruby2js({
      eslevel: 2021,
      filters: ['esm', 'functions']
    })
  ]
}
```

## Usage (lit-element)

```javascript
// rollup.config.js
import { nodeResolve } from '@rollup/plugin-node-resolve';
import ruby2js from '@ruby2js/rollup-plugin';

export default {
  input: 'index.js.rb',

  output: {
    file: 'bundle.js',
    format: 'iife'
  },

  plugins: [
    nodeResolve(),

    ruby2js({
      eslevel: 2021,
      filters: ['lit-element', 'esm', 'functions']
    })
  ]
}
```

## Usage (react)

```javascript
// rollup.config.js
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import replace from '@rollup/plugin-replace';
import ruby2js from '@ruby2js/rollup-plugin';

const env = process.env.NODE_ENV || 'development';

export default {
  input: 'index.js.rb',

  output: {
    file: 'bundle.js',
    format: 'iife'
  },

  plugins: [
    nodeResolve(),

    commonjs(),

    replace({
      preventAssignment: true,
      values: {
        'process.env.NODE_ENV': JSON.stringify(env)
      }
    }),

    ruby2js({
      eslevel: 2021,
      filters: ['react', 'esm', 'functions']
    })
  ]
}
```

## Usage (stimulus)

```javascript
import { nodeResolve } from '@rollup/plugin-node-resolve';
import ruby2js from '@ruby2js/rollup-plugin';

export default {
  input: 'index.js.rb',

  output: {
    file: 'bundle.js',
    format: 'iife'
  },

  context: 'window',

  plugins: [
    nodeResolve(),

    ruby2js({
      eslevel: 2021,
      filters: ['stimulus', 'esm', 'functions']
    })
  ]
}
```
npm package: @ruby2js/ruby2js
Description: Ruby to Javascript transpiler
Latest version: 5.1.2

# @ruby2js/ruby2js

[![npm][npm]][npm-url]
[![node][node]][node-url]

Ruby2JS is an extensible Ruby to modern JavaScript transpiler.

## Example usage

```javascript
import { Ruby2JS } from '@ruby2js/ruby2js';

console.log(
  Ruby2JS.convert(
    '"2A".to_i(16)',
    {filters: ['functions']}
  ).toString()
)
```

An example of all supported options:

```javascript
{
  autoexports: true,
  autoimports: {"[:LitElement]": "lit-element"},
  comparison: "identity",
  defs: {A: ["x", "@y"]},
  eslevel: 2021,
  exclude: ["each"],
  filters: ["functions"],
  include: ["class"],
  include_all: true,
  include_only: ["max"],
  import_from_skypack: true,
  or: "nullish",
  require_recurse: true,
  strict: true,
  template_literal_tags: ["color"],
  underscored_private: true,
  width: 40
}
```

## Documentation

* Visit **[ruby2js.com](https://www.ruby2js.com/)** for detailed instructions and examples.
* Read the main monorepo [CHANGELOG](https://github.com/ruby2js/ruby2js/blob/master/CHANGELOG.md)
  for information on what's new in this package.

## Testing

```
git clone https://github.com/ruby2js/ruby2js.git
cd ruby2js/packages/ruby2js
bundle install
yarn install
yarn build
yarn test
```

## Contributing

1. Fork it (https://github.com/ruby2js/ruby2js/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## License

MIT

[npm]: https://img.shields.io/npm/v/@ruby2js/ruby2js.svg
[npm-url]: https://npmjs.com/package/@ruby2js/ruby2js
[node]: https://img.shields.io/node/v/@ruby2js/ruby2js.svg
[node-url]: https://nodejs.org
npm package: @ruby2js/snowpack-plugin
Description: ruby2js plugin for Snowpack
Author: Sam Ruby
Latest version: 0.0.4

# @ruby2js/snowpack-plugin

[![npm][npm]][npm-url]
[![node][node]][node-url]

Snowpack plugiplugin to compile [Ruby2JS](https://www.ruby2js.com) (`.js.rb`) files to JavaScript.

## Documentation

* Visit **[ruby2js.com](https://www.ruby2js.com/docs/snowpack)** for detailed setup instructions and examples.

## Testing

_To be continued…_

## Contributing

1. Fork it (https://github.com/ruby2js/ruby2js/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## License

MIT

[npm]: https://img.shields.io/npm/v/@ruby2js/snowpack-plugin.svg
[npm-url]: https://npmjs.com/package/@ruby2js/snowpack-plugin
[node]: https://img.shields.io/node/v/@ruby2js/snowpack-plugin.svg
[node-url]: https://nodejs.org
npm package: @ruby2js/vite-plugin
Description: ruby2js plugin for vite
Author: Sam Ruby
Latest version: 0.0.3

# @ruby2js/vite-plugin

Integration between Vite and Ruby2JS

## Description

Since Vite supports both rollup and vite plugins, this plugin can be used
interchangeably with the [Ruby2JS Rollup
plugin](https://www.npmjs.com/package/@ruby2js/rollup-plugin) with if there
the use of a refresh plugin is not needed.

What this plugin does is integrate Ruby2JS with the refresh process.  In order
to do this, the refresh plugin you would normally use needs to be passed as an
option to the Ruby2JS plugin rather than included as a separate plugin.  An
example of this usage follows below.

## Installation

```bash
npm install --save-dev @ruby2js/vite-plugin
# or
yarn add -D @ruby2js/vite-plugin
```

## Usage

The following is a example of a `vite.config.js` file configured for use with
the React refresh plugin.  Note the addition of `.rb` and `.js.rb` extensions
to `resolve.extensions` and the passing of the `reactRefresh` plugin as a
`refresh` option to the `@ruby2js/vite-plugin`.

```javascript
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import ruby2js from '@ruby2js/vite-plugin';

export default defineConfig({
  resolve: {
    extensions: ['.rb', '.js.rb'].concat(
      ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json']
    )
  },

  plugins: [
    ruby2js({
      refresh: reactRefresh(),
      eslevel: 2021,
      autoexports: 'default',
      filters: ['react', 'esm', 'functions']
    })
  ]
})
```
npm package: @ruby2js/webpack-loader
Description: Uses Ruby2JS to convert .js.rb files into .js files for Webpack
Latest version: 2.0.2

# @ruby2js/webpack-loader

[![npm][npm]][npm-url]
[![node][node]][node-url]

Webpack loader to compile [Ruby2JS](https://www.ruby2js.com) (`.js.rb`) files to JavaScript.

**Fun fact:** this loader itself is written in Ruby and compiles via Ruby2JS + Babel. 😁

## Installation

```bash
npm install --save-dev @ruby2js/webpack-loader
# or
yarn add -D @ruby2js/webpack-loader
```

## Documentation

* Visit **[ruby2js.com](https://www.ruby2js.com/)** for detailed instructions and examples.
Users of Ruby on Rails may wish to start with the [Rails
introduction](https://www.ruby2js.com/examples/rails/) which describes how to
use the rake tasks provided to get up and running quickly.

## Configuration

There are multiple ways to configure webpack (e.g., `webpack.config.js`,
command line options, or using the
[node interface](https://webpack.js.org/api/node/).  Ruby2JS options can be
placed inline within this configuration, or separately in a `rb2js.config.rb`
file or provided via a `RUBY2JS_OPTIONS` environment variable.  Examples of
each are provided below:

### `webpack.config.js`

```javascript
module.exports = {
  entry: "./main.js.rb",

  output: {
    path: __dirname,
    filename: "main.[contenthash].js"
  },

  resolve: {
    extensions: [".rb.js", ".rb"]
  },

  module: {
    rules: [
      {
        test: /\.js\.rb$/,
        use: [
          {
            loader: '@ruby2js/webpack-loader',
            options: {
              eslevel: 2021,
              filters: ['functions']
            }
          },
        ]
      },
    ]
  }
}
```

### `rb2js.config.rb`

```ruby
require "ruby2js/filter/functions"

module Ruby2JS
  class Loader
    def self.options
      {eslevel: 2021}
    end
  end
end
```

### `RUBY2JS_OPTIONS` environment variable

```
export RUBY2JS_OPTIONS='{"eslevel": 2021, "filters": ["functions"]}'
```

## Testing

```
git clone https://github.com/ruby2js/ruby2js.git
cd ruby2js/packages/webpack-loader
yarn install
yarn prepare-release
yarn test
```

## Contributing

1. Fork it (https://github.com/ruby2js/ruby2js/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## License

MIT

[npm]: https://img.shields.io/npm/v/@ruby2js/webpack-loader.svg
[npm-url]: https://npmjs.com/package/@ruby2js/webpack-loader
[node]: https://img.shields.io/node/v/@ruby2js/webpack-loader.svg
[node-url]: https://nodejs.org
npm package: @rubybb/ts-fix
Description: This tool is to automate the application of TypeScript codefixes across your TypeScript repositories.
Author: Isabel Duan
Latest version: 0.1.0


This tool is to automate the application of TypeScript codefixes across your TypeScript repositories. 


# Download
If cloning from GitHub, after cloning, run
```
npm run build
npm link
```
`ts-fix` can then be used in the command line


# Example Usage
`ts-fix -t path/to/tsconfig.json -f nameOfCodefix`
`ts-fix -e 4114 --write`


# Flags 

```
Options:
      --help          Show help                                              [boolean]
      --version       Show version number                                    [boolean]
  -t, --tsconfig      Path to project's tsconfig
                                                 [string] [default: "./tsconfig.json"]
  -e, --errorCode     The error code(s)                         [number] [default: []]
  -f, --fixName       The name(s) of codefixe(s) to apply       [string] [default: []]
  -w, --write         Tool will only emit or overwrite files if --write is included.
                                                            [boolean] [default: false]
  -o, --outputFolder  Path of output directory                                [string]
      --verbose       Write status to console during runtime        
                                                             [boolean] [default: true]
```

`-t path/to/tsconfig.json` or `--tsconfig path/to/tsconfig.json` 
Specifies the project to use the tool on. If no arguement given, the tool will use the tsconfig in the current working directory. 

`-e <number>` or  `--errorCode <number>`
Specifies the errors to fix. Several error codes can be specified during the same command. 
The easiest way to find error codes in your repository is to hover over the error in your IDE.

`-f <name>` or `--fixName <name>`
Specifies the types of codefixes to use. Several names can be specified. 

If both error numbers and fix names are given, then in order to be applied, a fix must be generated by a specified error and have a name that was specified.

`--write` 
Boolean for if the tool should overwrite previous code files with the codefixed code or emit any files with codefixed code. If `--write` not included, then the tool will print to console which files would have changed.

`--verbose`
Boolean for print to console diagnostics that happen during runtime. Set `--no-verbose` to turn these messages off.
npm package: @rubyfans/egg-console
Description: Rails-like console for eggjs
Author: Xuhao
Latest version: 1.0.3

# egg-console

Rails-like console for eggjs

## 安装

    npm i @rubyfans/egg-console --save-dev

## 在package.json添加命令

Node 10+ 支持 top-level await，需添加`--experimental-repl-await`选项。

```diff
  "scripts": {
    /* node >= 10 */
+   "console": "node --experimental-repl-await node_modules/@rubyfans/egg-console/lib/index.js",
    /* node < 10 */
+   "console": "node node_modules/@rubyfans/egg-console/lib/index.js",
    ....
}
```

## 使用

支持`app`，`ctx` 变量, Node 10+ 开启`--experimental-repl-await`后可以直接使用`await`。

```shell
$ npm run console

> web-api@1.0.0 console /Users/Xuhao/Workspace/web-api
> node --experimental-repl-await node_modules/@rubyfans/egg-console/lib/index.js

> app.name
web-api

> ctx.request
{ method: 'GET',
  url: '/',
  header: { 'x-forwarded-for': '127.0.0.1' } }

> await ctx.model.Article.findOne()
{ _id: 5a818d65a3af86eb70560952,
  sourceId: 59e9643f2c09353cfd51aadb,
  updatedAt: 2018-02-27T02:41:26.710Z,
  __v: 0,
  createdAt: 2018-02-12T12:49:41.975Z,
  collectingCount: 0,
  helpfulCount: 0,
  viewCount: 40 }
> 
```