Skip to content

Commit

Permalink
BREAKING CHANGES: v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradumnasaraf authored Feb 23, 2023
2 parents 0d87e53 + 8a8aa79 commit 2b7792e
Show file tree
Hide file tree
Showing 25 changed files with 1,987 additions and 230 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## [2.0.0](https://github.com/Pradumnasaraf/LinkFree-CLI/compare/v1.4.2...v2.0.0) (2023-02-23)

### Breaking Changes

* The CLI now uses a diffent function/folder handling structure. This means the newer version features will not work with the older version of the CLI. Please update to the latest version of the CLI to use the new features.

### Features

* Added support to update the JSON function https://github.com/Pradumnasaraf/LinkFree-CLI/pull/24
* Add support to add milestones, socials, and tags https://github.com/Pradumnasaraf/LinkFree-CLI/pull/26
* Add support to create remove and update keys by https://github.com/Pradumnasaraf/LinkFree-CLI/pull/27
* Add support to add events https://github.com/Pradumnasaraf/LinkFree-CLI/pull/30
* Add supported to for optional key to Events and Milestone https://github.com/Pradumnasaraf/LinkFree-CLI/pull/32 https://github.com/Pradumnasaraf/LinkFree-CLI/pull/33
* Support for reporting a bug from CLI https://github.com/Pradumnasaraf/LinkFree-CLI/pull/35

### Fix
* Removes empty keys from json when value is not there https://github.com/Pradumnasaraf/LinkFree-CLI/pull/34


## [1.4.2](https://github.com/Pradumnasaraf/LinkFree-CLI/compare/v1.4.1...v1.4.2) (2023-02-15)


Expand Down
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
<img align="right" src="https://user-images.githubusercontent.com/51878265/186825286-499db16b-5b95-488d-b6d5-09d44521b890.png" height="70px"> <h2>LinkFree CLI </h2>
<img align="right" src="https://user-images.githubusercontent.com/51878265/186825286-499db16b-5b95-488d-b6d5-09d44521b890.png" height="35px"> <h2>LinkFree CLI </h2>

**LinkFree CLI** is a command line tool that helps you to create your **[LinkFree](https://github.com/EddieHubCommunity/LinkFree)** profile through CLI.
<div align="center">


**LinkFree CLI** is a command line tool that helps us to create and update your **[LinkFree](https://github.com/EddieHubCommunity/LinkFree)** profile through CLI. We can also give testimonials and events through it.

<br>
<div align="center">

[![NPM Package](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/publish.yml/badge.svg)](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/publish.yml)
[![Releases](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/releases.yml/badge.svg)](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/releases.yml)
[![.github/workflows/greetings.yml](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/greetings.yml/badge.svg)](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/greetings.yml)
[![Npm package total downloads](https://badgen.net/npm/dt/linkfree-cli)](https://npmjs.com/package/linkfree-cli)

</div>

## Demo
![LinkFree CLI demo GIF](https://user-images.githubusercontent.com/51878265/220831787-93c6b920-2961-4729-8a2c-0ac576658d83.gif)

![LinkFree CLI](https://user-images.githubusercontent.com/51878265/200193639-0e2d6d23-5f85-48e8-9563-8879b4efb18a.gif)
### ⭐️ Features

## Using the CLI (Commands)
- Creating a LinkFree profile.
- Updating a LinkFree profile.
- Giving a testimonial to a LinkFree profile.
- Adding events (conferences, meetups, etc).

> **Note** First fork the [LinkFree](https://github.com/EddieHubCommunity/LinkFree) repo before using it.

- **To install it globally.**
### 👨‍💻 Using the CLI tool

```bash
npm install -g linkfree-cli
Make sure you have cloned the [LinkFree](https://github.com/EddieHubCommunity/LinkFree) repo and in the root directory of the repo and installed the dependencies.

linkfree-Cli
```

It will then prompt you to questions.

- **To execute the package directly, without installing it.**
- To trigger the CLI, run the following command in the bash terminal.

```bash
npx linkfree-cli
```

It will then prompt you to questions.
### 📝 License

This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) for details.

## Contributions
### 🛡 Security

Feel free to contribute to the repo. Just make sure you Open an [Issue](https://github.com/Pradumnasaraf/LinkFree-CLI/issues) first before raising the Pull Request
If you discover a security vulnerability within this project, please check the [SECURITY](SECURITY.md) for more information.
86 changes: 82 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkfree-cli",
"version": "1.4.2",
"version": "2.0.0",
"description": "Create LinkFree profile.json file though CLI",
"main": "src/index.js",
"bin": "src/index.js",
Expand All @@ -25,7 +25,8 @@
"axios": "^0.27.2",
"chalk": "^4.1.2",
"enquirer": "^2.3.6",
"json-format": "^1.0.1"
"json-format": "^1.0.1",
"open": "^8.4.2"
},
"devDependencies": {
"prettier": "^2.7.1"
Expand All @@ -37,4 +38,4 @@
"bugs": {
"url": "https://github.com/Pradumnasaraf/LinkFRee-CLI.git/issues"
}
}
}
95 changes: 95 additions & 0 deletions src/addevent/addEvent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
const enquirer = require("enquirer");
const fs = require("fs");
const chalk = require("chalk");
const createEventFile = require("./helper/createEventFile");

const addEvent = async () => {
let answers = await enquirer.prompt([
{
type: "input",
name: "githubUsername",
message: "What is your GitHub username? (case sensitive)",
},
]);
let eventWriter = answers.githubUsername;

if (eventWriter === "") {
console.log(chalk.bgRed.bold(` Please enter a valid GitHub username. `));
addEvent();
} else if (!fs.existsSync(`./data/${eventWriter}.json`)) {
console.log(
chalk.bgYellow.bold(
` You don't have a LinkFree JSON file!. Create an account first! `
)
);
process.exit(0);
} else {
let answers = await enquirer.prompt([
{
type: "select",
name: "userStatus",
message:
"Are you the event organizer or a participant? (This is optional.)",
choices: ["Organizer", "Participant", "None - Skip this question"],
},
{
type: "input",
name: "speakerDetails",
message:
"Give your topic of your talk at the event. (This is optional. Press enter to skip.)",
},
{
type: "confirm",
name: "isVirtual",
message: "Is the event virtual?",
},
{
type: "confirm",
name: "isInPerson",
message: "Is the event in person?",
},
{
type: "input",
name: "name",
message: "What is the name of the event?",
},
{
type: "input",
name: "description",
message: "Give a description of the event",
},
{
type: "input",
name: "url",
message: "Give associated URL for the event",
},
{
type: "input",
name: "start",
message:
"Give event start date and time (Supported format: 2023-08-09T00:00:00.000+00:00)",
},
{
type: "input",
name: "end",
message:
"Give event end date and time (Supported format: 2023-08-09T00:00:00.000+00:00)",
},
{
type: "input",
name: "cfpClose",
message:
"Give CFP end date and time (Supported format: 2023-08-09T00:00:00.000+00:00) - (This is optional. Press enter to skip.)",
},
{
type: "input",
name: "color",
message: "Give a color theme",
},
]);

createEventFile(eventWriter, answers);
}
};

module.exports = addEvent;
Loading

0 comments on commit 2b7792e

Please sign in to comment.