Skip to content

Commit

Permalink
feat/add readme and initial stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocko1204 committed Nov 5, 2022
1 parent e2e35f2 commit c0c4257
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@rocko1204/rocko-sfdx
=====================

sfdx cli to build awesome package tool

[![Version](https://img.shields.io/npm/v/@rocko1204/rocko-sfdx.svg)](https://npmjs.org/package/@rocko1204/rocko-sfdx)
[![CircleCI](https://circleci.com/gh/github/rocko-sfdx/tree/master.svg?style=shield)](https://circleci.com/gh/github/rocko-sfdx/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/github/rocko-sfdx?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/rocko-sfdx/branch/master)
[![Greenkeeper](https://badges.greenkeeper.io/github/rocko-sfdx.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/github/github/rocko-sfdx/badge.svg)](https://snyk.io/test/github/github/rocko-sfdx)
[![Downloads/week](https://img.shields.io/npm/dw/@rocko1204/rocko-sfdx.svg)](https://npmjs.org/package/@rocko1204/rocko-sfdx)
[![License](https://img.shields.io/npm/l/@rocko1204/rocko-sfdx.svg)](https://github.com/github/rocko-sfdx/blob/master/package.json)

<!-- toc -->
<!-- install -->
<!-- usage -->
<!-- commands -->
<!-- debugging-your-plugin -->
# Debugging your plugin
We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the `.vscode` directory of this plugin is a `launch.json` config file, which allows you to attach a debugger to the node process when running your commands.

To debug the `hello:org` command:
1. Start the inspector

If you linked your plugin to the sfdx cli, call your command with the `dev-suspend` switch:
```sh-session
$ sfdx hello:org -u [email protected] --dev-suspend
```

Alternatively, to call your command using the `bin/run` script, set the `NODE_OPTIONS` environment variable to `--inspect-brk` when starting the debugger:
```sh-session
$ NODE_OPTIONS=--inspect-brk bin/run hello:org -u [email protected]
```

2. Set some breakpoints in your command code
3. Click on the Debug icon in the Activity Bar on the side of VS Code to open up the Debug view.
4. In the upper left hand corner of VS Code, verify that the "Attach to Remote" launch configuration has been chosen.
5. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program.
6. Hit the green play button at the top middle of VS Code (this play button will be to the right of the play button that you clicked in step #5).
<br><img src=".images/vscodeScreenshot.png" width="480" height="278"><br>
Congrats, you are debugging!
5 changes: 5 additions & 0 deletions bin/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node

const oclif = require('@oclif/core');

oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'));
3 changes: 3 additions & 0 deletions bin/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\run" %*
15 changes: 15 additions & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"include": ["./**/*.ts"],
"compilerOptions": {
"skipLibCheck": true,
"noEmit": true,
"module": "commonjs",
"target": "es2020",
"lib": ["es2020"],
"sourceMap": true,
"declaration": true,
"moduleResolution": "node",
"alwaysStrict": true,
"noUnusedLocals": true
}
}
15 changes: 15 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"outDir": "lib",
"rootDir": "src",
"module": "commonjs",
"target": "es2020",
"lib": ["es2020"],
"sourceMap": true,
"declaration": true,
"moduleResolution": "node",
"alwaysStrict": true,
"noUnusedLocals": true
},
"include": ["./src/**/*.ts"]
}

0 comments on commit c0c4257

Please sign in to comment.