diff --git a/README.md b/README.md index 0e60be4..6cfe5dc 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,16 @@ [![Semantic Release][semantic-release-image]][semantic-release-url] [![Code Style: Prettier][code-style-image]][code-style-url] -# `@rain-cafe/ribbon` +# `@ribbon-studios/ribbon` ### Preview -![Example](https://github.com/rain-cafe/ribbon/assets/9692284/5ee5e4b3-c676-4ee5-9ec4-ae7f52fd4640) +![Example](https://github.com/ribbon-studios/ribbon/assets/9692284/5ee5e4b3-c676-4ee5-9ec4-ae7f52fd4640) ### Usage ```tsx -import { Ribbon } from '@rain-cafe/ribbon'; +import { Ribbon } from '@ribbon-studios/ribbon'; export function MyApp() { return ( @@ -39,16 +39,16 @@ export function MyApp() { [_**Want to Contribute?**_](/CONTRIBUTING.md) -[npm-version-image]: https://img.shields.io/npm/v/@rain-cafe/ribbon.svg -[npm-downloads-image]: https://img.shields.io/npm/dm/@rain-cafe/ribbon.svg -[npm-url]: https://npmjs.org/package/@rain-cafe/ribbon -[github-actions-image]: https://img.shields.io/github/actions/workflow/status/rain-cafe/ribbon/ci.yml?event=push -[github-actions-url]: https://github.com/rain-cafe/ribbon/actions/workflows/ci.yml?query=branch%3Amain -[coveralls-image]: https://img.shields.io/coveralls/rain-cafe/ribbon.svg -[coveralls-url]: https://coveralls.io/github/rain-cafe/ribbon?branch=main +[npm-version-image]: https://img.shields.io/npm/v/@ribbon-studios/ribbon.svg +[npm-downloads-image]: https://img.shields.io/npm/dm/@ribbon-studios/ribbon.svg +[npm-url]: https://npmjs.org/package/@ribbon-studios/ribbon +[github-actions-image]: https://img.shields.io/github/actions/workflow/status/ribbon-studios/ribbon/ci.yml?event=push +[github-actions-url]: https://github.com/ribbon-studios/ribbon/actions/workflows/ci.yml?query=branch%3Amain +[coveralls-image]: https://img.shields.io/coveralls/ribbon-studios/ribbon.svg +[coveralls-url]: https://coveralls.io/github/ribbon-studios/ribbon?branch=main [code-style-image]: https://img.shields.io/badge/code%20style-prettier-ff69b4.svg [code-style-url]: https://prettier.io -[maintainability-image]: https://img.shields.io/codeclimate/maintainability/rain-cafe/ribbon -[maintainability-url]: https://codeclimate.com/github/rain-cafe/ribbon/maintainability +[maintainability-image]: https://img.shields.io/codeclimate/maintainability/ribbon-studios/ribbon +[maintainability-url]: https://codeclimate.com/github/ribbon-studios/ribbon/maintainability [semantic-release-url]: https://github.com/semantic-release/semantic-release [semantic-release-image]: https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079 diff --git a/demo/App.tsx b/demo/App.tsx index 81190bb..bc09307 100644 --- a/demo/App.tsx +++ b/demo/App.tsx @@ -1,4 +1,4 @@ -import { useReadOnlyCachedState } from '@rain-cafe/react-utils'; +import { useReadOnlyCachedState } from '@ribbon-studios/react-utils'; import { Ribbon } from '../src'; import { useState } from 'react'; diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f01c2b9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1712608508, + "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ba03640 --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "Ribbon"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = { nixpkgs, ... }: let + forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; + in { + # Devshell for bootstrapping; acessible via 'nix develop' or 'nix-shell' (legacy) + devShells = forAllSystems (systems: + let pkgs = nixpkgs.legacyPackages.${systems}; + in import ./shell.nix { inherit pkgs; } + ); + }; +} diff --git a/nixpkgs.nix b/nixpkgs.nix new file mode 100644 index 0000000..e6e07cb --- /dev/null +++ b/nixpkgs.nix @@ -0,0 +1,8 @@ +# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file +# Useful to avoid using channels when using legacy nix commands +let lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked; +in +import (fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz"; + sha256 = lock.narHash; +}) diff --git a/package.json b/package.json index d75fe60..687ad4f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@rain-cafe/ribbon", + "name": "@ribbon-studios/ribbon", "description": "A simple react ribbon~", "version": "1.0.0", "source": "src/index.ts", @@ -45,6 +45,10 @@ "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/ribbon-studios/ribbon.git" + }, "engines": { "browsers": "last 2 years, > 1%, not dead" } diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..50064c7 --- /dev/null +++ b/shell.nix @@ -0,0 +1,16 @@ +# Shell for bootstrapping flake-enabled nix and home-manager +# Enter it through 'nix develop' or (legacy) 'nix-shell' + +{ pkgs ? (import ./nixpkgs.nix) { } }: { + default = pkgs.mkShell { + # Enable experimental features without having to specify the argument + NIX_CONFIG = "experimental-features = nix-command flakes"; + buildInputs = with pkgs; [ + gnumake + nixpkgs-fmt + nixd + bun + nodejs_20 + ]; + }; +}