Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish variables update #25

Closed
wants to merge 11 commits into from
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in this repo.
* @arjunkdot

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
# *.js @js-owner #This is an inline comment.

# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.
# *.go [email protected]
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI
on:
push:
branches:
- "**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "pnpm"

- run: pnpm install --frozen-lockfile
- run: pnpm run test && pnpm run typecheck && pnpm run lint && pnpm run build
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
workflow_run:
workflows: [CI]
branches: [main]
types: [completed]

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "pnpm"

- run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.DS_Store
node_modules
dist
coverage
.DS_Store
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pnpm typecheck
pnpm lint
pnpm test
15 changes: 4 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
#### 1.0.1 (2023-10-29)
# hexashades

##### Fixed
## 1.1.0

* Type support.
##### Fixed
### Minor Changes

* A bug causing miscalculatons in the tint generation.
#### 1.0.0 (2023-10-02)

##### New Features

* error handling for invalid inputs ([d61577e6](https://github.com/arjunkdot/hexashades/commit/d61577e6acc84ac54cc4f04bc2b6de92505236c8))
* core plugins functionalities ([694aa0f5](https://github.com/arjunkdot/hexashades/commit/694aa0f5396832de4327debd2cf9c2200c6a3543))
- e6d1ede: tooling and config changed
43 changes: 43 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Code of Conduct

## Our Pledge

We, the maintainers and contributors of the Hexashades project, pledge to make participation in this project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

We are committed to providing a welcoming and inclusive environment for all, and expect everyone participating in the project to respect and support this goal.

## Our Standards

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

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 email address, without permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

As maintainers of this project, I am responsible for clarifying the standards of acceptable behavior and for taking appropriate and fair corrective action in response to any instances of unacceptable behavior.

I have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that I deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing the project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer at arjunkdot[at]gmail[dot]com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
85 changes: 85 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Contributing to Hexashades

First off, thank you for considering contributing to Hexashades! I welcome contributions from everyone, whether you're fixing a typo or submitting a major feature. To make the contribution process smooth and consistent, I ask that you follow these guidelines.

## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [How to Contribute](#how-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Submitting a Pull Request](#submitting-a-pull-request)
- [Development Setup](#development-setup)
- [Commit Message Guidelines](#commit-message-guidelines)
- [License](#license)

## Code of Conduct

By participating in this project, you agree to follow the [Code of Conduct](CODE_OF_CONDUCT.md). Please read it to ensure a positive experience for everyone.

## How to Contribute

### Reporting Bugs

If you find a bug in the project, please help by reporting it:

1. Check the issue tracker to see if the bug has already been reported.
2. If not, open a new issue with a detailed description of the problem, including steps to reproduce it, your environment (OS, Node.js version, etc.), and any relevant logs or error messages.

### Suggesting Enhancements

If you have an idea for a new feature or improvement:

1. Check if the feature has already been suggested.
2. If not, open a new issue with a clear description of the enhancement and why it would be useful. I love hearing your ideas!

### Submitting a Pull Request

I appreciate your contributions! To submit a pull request (PR), follow these steps:

1. Fork the repository and create a new branch for your changes.
2. Write clear, concise commit messages that explain your changes.
3. Ensure that your code adheres to the project's coding style and passes any existing tests.
4. If applicable, write tests for your changes and make sure they pass.
5. Open a pull request against the main branch.

I will review your PR and provide feedback. Be prepared to make revisions if necessary.

## Development Setup

To set up the project for local development, follow these steps:

1. Clone the repository:

```bash
git clone https://github.com/arjunkdot/hexashades.git
```

2. Install the dependencies:

```bash
npm install
```

or

```bash
pnpm install
```

Make sure to follow any additional setup instructions in the README.md if applicable.

## Commit Message Guidelines

I follow a simple convention for commit messages:

- Use the present tense: "Add feature" not "Added feature."
- Use a short, descriptive message (50 characters or less).
- If the change is related to an issue, reference the issue number using #.

## Example

Please refer to [Conventional Commits](https://www.conventionalcommits.org/) for more details.

License
By contributing to this project, you agree that your contributions will be licensed under the [MIT License](LICENSE).
9 changes: 0 additions & 9 deletions LICENSE

This file was deleted.

25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Hexashades

![NPM Version](https://img.shields.io/npm/v/hexashades?logo=npm&color=%23CB0001)
![NPM Bundle Size](https://img.shields.io/bundlephobia/min/hexashades)
![License](https://img.shields.io/github/license/arjunkdot/hexashades)

Hexashades helps you generate a range of shades and tints for any specified RGB Hex color code.
<h1 align="center">Hexashades</h1>

<p align="center">
<img src="https://img.shields.io/npm/v/hexashades?logo=npm&color=%23CB0001" alt="NPM Version" />
<img src="https://img.shields.io/bundlephobia/min/hexashades" alt="NPM Bundle Size" />
<img src="https://img.shields.io/github/license/arjunkdot/hexashades" alt="License" />
</p>
<br />
<p align="center">
Hexashades helps you generate a range of shades and tints for any specified RGB Hex color code.
</p>
<br />

> Currently, it only supports RGB Hex codes. More input formats will be allowed in the future.

Expand All @@ -30,12 +35,13 @@ import { Colors } from "hexashades";
const color = new Colors();

// Generate tints & shades.
const tintsAndShades = color.createColors('663399', 10, false);
const tintsAndShades = color.createColors("663399", 10, false);
```

## API

### createColors(color, percentage, prefix)

Returns an array of tints & shades for the given color with a given percentage of increments.

Throws an error if no/invalid inputs are given.
Expand All @@ -46,6 +52,5 @@ Throws an error if no/invalid inputs are given.
- `@return {Array<string>}` - array with hex codes

## License
MIT © arjunkdot


MIT © arjunkdot
12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";

/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ["**/*.{ts}"] },
{ files: ["**/*.js"], languageOptions: { sourceType: "script" } },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
module.exports = {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},
};
Loading
Loading