Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/ISSUE_TEMPLATE/----bug-report---.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: "\U0001F41B [Bug report]: "
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/---feature-request---.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: "✨ [Feature request]: "
name: '✨ [Feature request]: '
about: Suggest an idea for this project
title: "✨ [Feature request]: "
title: '✨ [Feature request]: '
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
7 changes: 2 additions & 5 deletions .github/ISSUE_TEMPLATE/new-play.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
---
name: New Play
about: Add a New Play Request
title: "[Add a Play]: "
title: '[Add a Play]: '
labels: play-request
assignees: ''

---

Thank You!
Thank You!

## What's the Play about?


## What ReactJS concept will be used to create this play?


## Are you willing to take it up for implementation?
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

> First thing, PLEASE READ THIS: [ReactPlay Code Review Checklist](https://github.com/reactplay/react-play/wiki/ReactPlay-Code-Review-Checklist)

# Description
Expand All @@ -18,7 +17,7 @@ Please delete options that are not relevant.

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

# Checklist:

Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,7 @@ dist

# Packagelock files
yarn.lock
package-lock.json
package-lock.json

#misc
yalc.sig
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
32 changes: 16 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via [issue](https://github.com/reactplay/react-play/issues),
[email](mailto:ioreactplay@gmail.com), or any other method with the owners of this repository before making a change.
[email](mailto:ioreactplay@gmail.com), or any other method with the owners of this repository before making a change.

Please note we have a [Code of Conduct](https://github.com/reactplay/react-play/blob/main/CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.

## Code of Conduct
Expand All @@ -32,21 +32,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities
Expand Down Expand Up @@ -89,4 +89,4 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[version]: http://contributor-covenant.org/version/1/4/
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,79 @@
# Create React Play

## Welcome to `reactplay.io` ecosystem
## Welcome to `reactplay.io` ecosystem

A package to generate boilerplate files for creating a play withing your local system. Another idea of this package to create a backbone structure for running all sort of maintenance and house keeping task.

[![Node.js Package](https://github.com/reactplay/create-react-play/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/reactplay/create-react-play/actions/workflows/npm-publish.yml)

## Command Line Options

Here are few options

- -h/help: Show all available arguments and flags
- -c/create: Creates a play boilerplate within local directory structure
- -u/update: Update an exsiting play
- -p/prepare: Prepre an environment for build/run
- -plays: set the path folder for your plays ( default is src/plays)
- -i: Create default images for missing plays, create thumbnail and adapt image extension. (usage -i="a value")

## How it works

### Example: Create a play

1. Fork [reactplay](https://github.com/reactplay/react-play)
2. Clone your branch
3. Install packages using
```bash
yarn
#or
npm install
#or
pnpm install
```
4. run reactplay application using
4. run reactplay application using
```bash
yarn start
#or
npm start
#or
pnpm start
```
5. Hit "Create" button on web portal
6. Provide necessary information
7. Submit your play request
8. It will generate an unique id for you
9. <b>Navigate to root directory of your local reactplay repo and run
9. <b>Navigate to root directory of your local reactplay repo and run

```bash
npx create-react-play -c <the_unique_id>
```
This will create necessary resources and link them together.
</b>
<br />
<b>
or
```bash
npx create-react-play -c <the_unique_id> -plays="plays"
```
if you want to create it in a specific folder ( here in the "./plays" folder at the application root)
</b>

**Note:** If the play folder `<reactplay_directory>/plays/<your_play_name>` remain empty after running above command that means you might be in some older version of the package. Use `@latest` in that case

```bash
npx create-react-play@latest -c <the_unique_id>
```

**Note:** If the play folder `<reactplay_directory>/plays/<your_play_name>` remain empty after running above command that means you might be in some older version of the package. Use `@latest` in that case
```bash
npx create-react-play@latest -c <the_unique_id>
```

10. Now you will find your play under
```
<reactplay_directory>/plays/<your_play_name>
```
11. Now its all with you, create an awesome play and flaunt it infront of the globe
12. Create a pull request when you are done
12. Create a pull request when you are done

### Example: Prepare environemnt

```bash
npx create-react-play@latest -p
```
34 changes: 12 additions & 22 deletions bin/global.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
#!/usr/bin/env node

import { invoke_process } from "../lib/index.js";
import { CONSOLE_COLORS } from "../util/const.js";
import fs from "fs";
import { invoke_process } from '../lib/index.js';
import { CONSOLE_COLORS } from '../util/const.js';
import fs from 'fs';
// import * as meta from "";

// Displays the text in the console
let meta = JSON.parse(fs.readFileSync("package.json", "utf-8"));
console.log("");
let meta = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
console.log('');
console.log(
CONSOLE_COLORS.FgGreen,
"┌─────────────────────────────────────────────────────────────────────────┐"
);
console.log(
" | |"
);
console.log(
" | Welcome to |"
'┌─────────────────────────────────────────────────────────────────────────┐'
);
console.log(' | |');
console.log(' | Welcome to |');
console.log(
` | Create React Play (v ${meta.version}) |`
);
console.log(
" | |"
);
console.log(
" | For help hit : create-react-play -h/help |"
);
console.log(
" └─────────────────────────────────────────────────────────────────────────┘"
);
console.log(' | |');
console.log(' | For help hit : create-react-play -h/help |');
console.log(' └─────────────────────────────────────────────────────────────────────────┘');

console.log(CONSOLE_COLORS.Reset, "");
console.log(CONSOLE_COLORS.Reset, '');
invoke_process();
33 changes: 15 additions & 18 deletions hooks/basic_hooks.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
import { exec } from "child_process";
import { Log } from "../log/index.js";
import { exec } from 'child_process';
import { Log } from '../log/index.js';

export const basic_get_package_manager = () => {
Log.log("Checking package manager");
return "yarn";
Log.log('Checking package manager');
return 'yarn';
};

export const basic_check_shell_connectivity = () => {
Log.log("Checking shell connectivity");
Log.log('Checking shell connectivity');
Log.log(process.cwd());
exec(
`sh ${process.cwd()}\\react-play-dev-kit\\scripts\\sample.sh`,
(error, stdout, stderr) => {
if (error) {
Log.log(`error: ${error.message}`);
return;
}
if (stderr) {
Log.log(`stderr: ${stderr}`);
return;
}
Log.log(`stdout: ${stdout}`);
exec(`sh ${process.cwd()}\\react-play-dev-kit\\scripts\\sample.sh`, (error, stdout, stderr) => {
if (error) {
Log.log(`error: ${error.message}`);
return;
}
);
if (stderr) {
Log.log(`stderr: ${stderr}`);
return;
}
Log.log(`stdout: ${stdout}`);
});
};
4 changes: 2 additions & 2 deletions hooks/data_hooks.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { loadPlay } from "../lib/services/datasource/index.js";
import { Log } from "../log/index.js";
import { loadPlay } from '../lib/services/datasource/index.js';
import { Log } from '../log/index.js';

export const data_read_table = (table_name) => {
Log.log(`Reading ${table_name} table`);
Expand Down
Loading