-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a local development flake and contributing instructions
- Loading branch information
Showing
7 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use flake | ||
|
||
source_env_if_exists .envrc.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules | |
*.js | ||
!shopify.js | ||
!gitpkg.config.js | ||
dist/ | ||
dist/ | ||
.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Development environment | ||
|
||
We use nix to manage the development environment for this package. Run `direnv allow` to load the devshell, with node and other utilities ready to go. | ||
|
||
Then, run `pnpm install` to install the dependencies. | ||
|
||
See the readme for instructions on re-scraping the schemas from Shopify's docs. | ||
|
||
# Releasing | ||
|
||
Releases are managed automatically by Github Actions. To create a new release, follow these steps: | ||
|
||
1. Run `npm version minor|major|patch`. This will change the version in the package.json and create a new git commit changing it. | ||
2. Push this commit to the `main` branch. CI will run the tests, then run the release workflow, which publishes to NPM, create a Github release, and creates a git tag for the version. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
description = "shopify-webhook-schemas development environment"; | ||
|
||
inputs = { | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
}; | ||
|
||
outputs = { self, flake-utils, nixpkgs }: | ||
(flake-utils.lib.eachSystem [ | ||
"x86_64-linux" | ||
"x86_64-darwin" | ||
"aarch64-darwin" | ||
] | ||
(system: nixpkgs.lib.fix (flake: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
in | ||
rec { | ||
|
||
packages = | ||
rec { | ||
bash = pkgs.bash; | ||
nodejs = pkgs.nodejs_22; | ||
corepack = pkgs.corepack; | ||
}; | ||
|
||
devShell = pkgs.mkShell { | ||
packages = builtins.attrValues packages; | ||
}; | ||
} | ||
))); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters