Skip to content

Commit

Permalink
Hyper v3.0 (#14)
Browse files Browse the repository at this point in the history
* Updated docs 📋
Updated project docs to match the new intended behavior

* Tweaked unit-tests 🧪

* Parity with docs 📋
Updated codebase to better align with the new intended behavior in docs

* s-Changes to templates 📦
Made some small changes to the project template's structure

* sFixes 🏗️
Some small fixes regarding the "skip option" & rsProjType prompt

* Overhauled 'List' cmd 📜

* sChanges to the docs
Changed 'ls' to 'list' to match the new behavior & added template sizes

* Changes to task handling 🧰

* Enhancements to Contributing.md

* Minor Tweaks to CLI
Matched the CLI version & made some small tweaks!

* Very small tweaks
Pretty self explanatory :>

* Further small tweaks
General tweaks & code removal of non-progress features

* Prep for RC-1 ✨
Minor tweaks & enhancements for release candidate 1

* sTweaks to Static-Web 📦

* Bump ver

* Removed old feature
  • Loading branch information
iTzSharkSV authored Feb 24, 2022
1 parent cb99e18 commit a16b456
Show file tree
Hide file tree
Showing 41 changed files with 626 additions and 516 deletions.
29 changes: 14 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
version: 2.1

orbs:
node: circleci/[email protected]
node: circleci/[email protected]

jobs:
build-and-test:
docker:
- image: cimg/node:16.10
build-n-test:
docker:
- image: cimg/node:16.10

steps:
- checkout
- node/install-packages:
pkg-manager: yarn
- run:
name: Run tests
command: yarn test
steps:
- checkout
- node/install-packages:
pkg-manager: yarn
- run:
name: Run tests
command: yarn test

workflows:
sample:
jobs:
- build-and-test

sample:
jobs:
- build-n-test
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
github: [iTzSharkSV]
patreon: SharkSV
ko_fi: SharkSV
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A clear and concise description of what the problem is. Ex. I'm always frustrate
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
A clear and concise description of any alternative solutions or features you've considered. (if any)

**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here. (if any)
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Bug fix
- New feature
- Updated docs
- Breaking change (fix or feature that would cause existing functionality to change)
- Is a breaking change
```

## Qualification checks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org
- run: yarn install
- run: yarn build
- run: npm i
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,33 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Berry]
## [3.0.0]

### Headline

- Major overhaul to the project templates.
- Major refactoring of the codebase.

### Changed

- Updated docs to better suit the new intended behavior.
- Moved unit-tests to mjs for a better stability/format.
- Replaced the `--default` flag option with `--skip`
- Also replaced `--clear` with the `--keep` option.

## [2.4.1]

- Fixed a critical bug

## [2.4.0]

### Headline

- A CI/CD pipeline
- A Dockerfile
- Major tweaks to the codebase

## [2.3.0]

### Headline

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ COPY . .
RUN npm install
RUN npm run build

CMD node ./Bin/Hyper
CMD npm test
88 changes: 72 additions & 16 deletions Docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,81 @@
# Contributing
# Contributing to this project

## Guidelines
Welcome, and thank you for your interest in contributing to Hyper!

These guidelines will ensure the pull request process is easy and traceable for the contributor and maintainer.
There are many ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved.

- When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
- Keep changes concise and encapsulated. If you have multiple features/fixes to implement, make sure to keep each implementation isolated in to one pull request. Large pull requests will be declined.
- If you're unsure of how to fix a bug or implement a feature create an issue instead. The maintainers will monitor new issues and decide how tp proceed.
- All new features and bug fixes require a unit tests that adequately test the feature.
## Questions & Feedback

## Pull Request Process
Have a question? The active community will be eager to assist you. Your well-worded question will serve as a resource to others searching for help.

### Setting up your environment
Your comments and feedback are welcome, and the development team is available via a handful of different channels.

1. Fork this repository.
2. Setting up dev environment. Check [ReadMe](../README.md) for more info.
## Reporting Issues

### Publishing your change
Have you identified a reproducible problem in the project? Have a feature request? We want to hear about it! Here's how you can make reporting your issue as effective as possible.

1. Increase the version number in package.json and create new entry at the beginning of [CHANGELOG](../CHANGELOG.md). Entries in the changelog file should be quick bullet points of the items changed, not just commit messages. The versioning scheme we use is [SemVer](http://semver.org/).
2. Submit the pull request. A maintainer will review the changes contact you with any followup actions.
### Identify where to Report

#### Contact [Shorky](mailto:[email protected]) with any questions
Can you recreate the issue even after disabling all your personal extensions? If you find the issue is caused by an extension you have installed, please file an issue on the extension's repo directly.

### Look for an Existing Issue

Before you create a new issue, please do a search in [open issues](https://github.com/iTzSharkSV/Hyper/issues) to see if the issue or feature request has already been filed.

Be sure to scan through the most popular feature requests.

If you find your issue already exists, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment:

- 👍 - upvote
- 👎 - downvote

If you cannot find an existing issue that describes your bug or feature, create a new issue using the guidelines below.

### Writing Good Bug Reports and Feature Requests

File a single issue per problem and feature request. Do not enumerate multiple bugs or feature requests in the same issue.

Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes.

The more information you can provide, the more likely someone will be successful at reproducing the issue and finding a fix.

Please include the following with each issue:

- Version of Product

- Your operating system

- List of extensions/packages that you have installed

- Reproducible steps (1... 2... 3...) that cause the issue

- What you expected to see, versus what you actually saw

- Images, animations, or a link to a video showing the issue occurring

- A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally

### Final Checklist

Please remember to do the following:

- [ ] Search the issue repository to ensure your report is a new issue

- [ ] Recreate the issue after disabling all extensions

- [ ] Simplify your code around the issue to better isolate the problem

Don't feel bad if the developers can't reproduce the issue right away. They will simply ask for more information!

### Follow Your Issue

Once submitted, your report will go into the issue tracking workflow. Be sure to understand what will happen next, so you know what to expect, and how to continue to assist throughout the process.

## Contributing Fixes

If you are interested in writing code to fix issues,
please submit a pull request.

# Thank You!

Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to contribute.
32 changes: 16 additions & 16 deletions Lib/Args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,49 @@ const {
bgYellow
} = Clrs;

// prettier-ignore
const helpTxt = `
${bgGreen(` USAGE `)}\n
${gray('$')} ${green('hyper')} ${cyan('<commands>')} ${yellow('[options]')}
${bgCyan(` COMMANDS `)}\n
${cyan('help')} ${dim('Print help info')}
${cyan('init')} ${dim('Initialize a new project')}
${cyan('ls')} ${dim('List available templates')}
${cyan('list')} ${dim('List available templates')}
${bgYellow(` OPTIONS `)}\n
${yellow('-c, --clear')} ${dim('Clear terminal')} ${gray('(default)')}
${yellow('-v, --version')} ${dim('Print Cli version')}
${yellow('-y, --default')} ${dim('Roll with default selection')}
${yellow('-k, --keep')} ${dim('Keep terminal output ')} ${gray('(off by Default)')}
${yellow('-y, --skip')} ${dim('Generate without prompt')}
${yellow('-i, --install')} ${dim('Install dependencies')}
${yellow('-r, --rainbow')} ${dim('I wonder🏳️‍🌈')}
${yellow('-v, --version')} ${dim('Print Cli version')} ${gray('(following semver)')}
`;

const Args = meow(helpTxt, {
flags: {
clear: {
keep: {
type: 'boolean',
default: true,
alias: 'c',
description: 'Clear terminal'
},
version: {
type: 'boolean',
default: false,
alias: 'v',
description: 'Print Cli version'
alias: 'k',
description: 'Keep terminal output'
},
default: {
skip: {
type: 'boolean',
default: false,
alias: 'y',
description: 'Roll with default selection'
description: 'Generate without prompt'
},
install: {
type: 'boolean',
default: false,
alias: 'i',
description: 'Install dependencies'
},
version: {
type: 'boolean',
default: false,
alias: 'v',
description: 'Print Cli version'
},
rainbow: {
type: 'boolean',
default: false,
Expand Down
42 changes: 20 additions & 22 deletions Lib/Inquire.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
import { DistinctQuestion, Separator, prompt, Answers } from 'inquirer';
import Args from './Args';

export enum pTemplate {
Jumpstart = 'Jumpstart',
Static = 'Static',
Rust = 'Rust',
Node = 'Node'
}

enum pManager {
Npm = 'Npm',
Yarn = 'Yarn'
}
import { DistinctQuestion, Separator, Answers, prompt } from 'inquirer';

async function Inquire(): Promise<DistinctQuestion> {
const { install, rainbow } = Args.flags;
Expand All @@ -24,16 +12,20 @@ async function Inquire(): Promise<DistinctQuestion> {
filter: (answer: string) => answer.trim()
};

enum pTemplate {
Jumpstart = 'Jumpstart',
Static = 'Static',
Rust = 'Rust',
Node = 'Node'
}

const projectTemplate: DistinctQuestion = {
type: 'list',
name: 'projTemplate',
message: 'Project Template?',
default: pTemplate.Node,
choices: [
{
name: 'Jumpstart',
value: pTemplate.Jumpstart
},
{ name: 'Jumpstart', value: pTemplate.Jumpstart },
new Separator(),
{ name: 'A Node.js project', value: pTemplate.Node },
{ name: 'Static site biolerplate', value: pTemplate.Static },
Expand All @@ -56,17 +48,23 @@ async function Inquire(): Promise<DistinctQuestion> {
when: (answers: Answers) => answers.gitInit === true
};

enum pManager {
Npm = 'Npm',
Yarn = 'Yarn',
Cargo = 'Cargo'
}

const packageManager: DistinctQuestion = {
type: 'list',
name: 'pkgManager',
message: 'Package Manager?',
default: pManager.Npm,
choices: [
{ name: 'Npm', value: pManager.Npm },
{ name: 'Yarn', value: pManager.Yarn }
{ name: 'Yarn', value: pManager.Yarn },
{ name: 'Cargo', value: pManager.Cargo }
],
when: (answers: Answers) =>
install && answers.projTemplate === pTemplate.Node
when: () => install
};

const areYou = {
Expand All @@ -80,7 +78,7 @@ async function Inquire(): Promise<DistinctQuestion> {
const Confirm = {
type: 'expand',
name: 'confirm',
message: 'Confirm selection: (generating proj in currentDir)',
message: 'Generating proj in currentDir...',
choices: [
{
key: 'y',
Expand All @@ -93,7 +91,7 @@ async function Inquire(): Promise<DistinctQuestion> {
value: 'change'
},
{
key: 'a',
key: 'o',
name: 'Overwrite conflicting files (if any)',
value: 'overwrite'
},
Expand Down
17 changes: 0 additions & 17 deletions Lib/Tasks/Commit.ts

This file was deleted.

Loading

0 comments on commit a16b456

Please sign in to comment.