diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 6792748..55d95cb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ /.psc* /.purs* /.psa* -/.vscode/ \ No newline at end of file +/.vscode/ +.direnv diff --git a/README.md b/README.md index cea742d..78c0e0e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ # react-basic-emotion [Emotion](https://emotion.sh/) support for [react-basic](https://github.com/lumihq/purescript-react-basic)! + +[![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) + + Fixed Precision on Pursuit + + + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c499e29 --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1654007547, + "narHash": "sha256-G812EeXZeGeGjkAvbTleGwcKFCGxdLOQb9aViOWASPc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5643714dea562f0161529ab23058562afeff46d0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ca752d9 --- /dev/null +++ b/flake.nix @@ -0,0 +1,34 @@ +{ + description = "Provide an environment for working in this repo"; + + # to handle mac and linux + inputs.flake-utils.url = "github:numtide/flake-utils"; + + # we want to use a consistent nixpkgs across developers. + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + outputs = all@{ self, nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + }; + packages = + let + # everything we want available in our development environment that isn't managed by + # npm, spago + # we do not differentiate between libraries needed for building and tools at the moment. + sharedPackages = with pkgs; [ + nodejs-16_x + ]; + in + sharedPackages; + in { + # produce our actual shell + devShell = pkgs.mkShell rec { + # make our packages available + buildInputs = packages; + }; + } + ); +} diff --git a/package.json b/package.json index d2a405c..a89a8c8 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "bower": "^1.8.12", + "npm-check-updates": "^13.0.3", "npm-run-all": "^4.1.5", "pulp": "^15.0.0", "purescript": "^0.14.0", diff --git a/tools/publish-shell.nix b/tools/publish-shell.nix new file mode 100644 index 0000000..38ec253 --- /dev/null +++ b/tools/publish-shell.nix @@ -0,0 +1,32 @@ +# Universal shell for PureScript repos +{ pkgs ? import (builtins.fetchGit { + # https://github.com/NixOS/nixpkgs/releases/tag/21.11 + url = "https://github.com/nixos/nixpkgs/"; + ref = "refs/tags/21.11"; + rev = "a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31"; + }) {} +}: +let + easy-ps-src = builtins.fetchGit { + url = "https://github.com/justinwoo/easy-purescript-nix.git"; + ref = "master"; + rev = "0ad5775c1e80cdd952527db2da969982e39ff592"; + }; + easy-ps = import easy-ps-src { inherit pkgs; }; +in +pkgs.mkShell { + nativeBuildInputs = [ + easy-ps.purs-0_15_0 + easy-ps.spago + easy-ps.pulp-16_0_0-0 + easy-ps.psc-package + easy-ps.purs-tidy + pkgs.nodejs-16_x + pkgs.nodePackages.bower + ]; + LC_ALL = "C.UTF-8"; # https://github.com/purescript/spago/issues/507 + # https://github.com/purescript/spago#install-autocompletions-for-bash + shellHook = '' + source <(spago --bash-completion-script `which spago`) + ''; +}