Skip to content

Commit 89f254c

Browse files
committed
Update some tooling in the repo
1 parent cec272f commit 89f254c

7 files changed

+121
-1
lines changed

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
/.psc*
1010
/.purs*
1111
/.psa*
12-
/.vscode/
12+
/.vscode/
13+
.direnv

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# react-basic-emotion
22

33
[Emotion](https://emotion.sh/) support for [react-basic](https://github.com/lumihq/purescript-react-basic)!
4+
5+
[![Build Status](https://github.com/lumihq/purescript-react-basic-emotion/actions/workflows/ci.yml/badge.svg)](https://github.com/lumihq/purescript-react-basic-emotion/actions/workflows/ci.yml)
6+
<a href="https://pursuit.purescript.org/packages/purescript-react-basic-emotion">
7+
<img src="https://pursuit.purescript.org/packages/purescript-react-basic-emotion/badge"
8+
alt="Fixed Precision on Pursuit">
9+
</img>
10+
</a>
11+

flake.lock

+43
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
description = "Provide an environment for working in this repo";
3+
4+
# to handle mac and linux
5+
inputs.flake-utils.url = "github:numtide/flake-utils";
6+
7+
# we want to use a consistent nixpkgs across developers.
8+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
9+
10+
outputs = all@{ self, nixpkgs, flake-utils, ... }:
11+
flake-utils.lib.eachDefaultSystem (system:
12+
let
13+
pkgs = import nixpkgs {
14+
inherit system;
15+
};
16+
packages =
17+
let
18+
# everything we want available in our development environment that isn't managed by
19+
# npm, spago
20+
# we do not differentiate between libraries needed for building and tools at the moment.
21+
sharedPackages = with pkgs; [
22+
nodejs-16_x
23+
];
24+
in
25+
sharedPackages;
26+
in {
27+
# produce our actual shell
28+
devShell = pkgs.mkShell rec {
29+
# make our packages available
30+
buildInputs = packages;
31+
};
32+
}
33+
);
34+
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"devDependencies": {
2626
"bower": "^1.8.12",
27+
"npm-check-updates": "^13.0.3",
2728
"npm-run-all": "^4.1.5",
2829
"pulp": "^15.0.0",
2930
"purescript": "^0.14.0",

tools/publish-shell.nix

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Universal shell for PureScript repos
2+
{ pkgs ? import (builtins.fetchGit {
3+
# https://github.com/NixOS/nixpkgs/releases/tag/21.11
4+
url = "https://github.com/nixos/nixpkgs/";
5+
ref = "refs/tags/21.11";
6+
rev = "a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31";
7+
}) {}
8+
}:
9+
let
10+
easy-ps-src = builtins.fetchGit {
11+
url = "https://github.com/justinwoo/easy-purescript-nix.git";
12+
ref = "master";
13+
rev = "0ad5775c1e80cdd952527db2da969982e39ff592";
14+
};
15+
easy-ps = import easy-ps-src { inherit pkgs; };
16+
in
17+
pkgs.mkShell {
18+
nativeBuildInputs = [
19+
easy-ps.purs-0_15_0
20+
easy-ps.spago
21+
easy-ps.pulp-16_0_0-0
22+
easy-ps.psc-package
23+
easy-ps.purs-tidy
24+
pkgs.nodejs-16_x
25+
pkgs.nodePackages.bower
26+
];
27+
LC_ALL = "C.UTF-8"; # https://github.com/purescript/spago/issues/507
28+
# https://github.com/purescript/spago#install-autocompletions-for-bash
29+
shellHook = ''
30+
source <(spago --bash-completion-script `which spago`)
31+
'';
32+
}

0 commit comments

Comments
 (0)