diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 1a45f8b..0000000 --- a/.eslintrc +++ /dev/null @@ -1,39 +0,0 @@ -{ - "env": { - "node": true, - }, - "rules": { - "valid-jsdoc": [2, { - "prefer": { "return": "returns" }, - "requireReturn": true, - "requireParamDescription": true, - "requireReturnDescription": false - }], - "camelcase": 1, - "no-multi-spaces": 0, - "comma-spacing": 1, - "comma-style": [2, "first"], - "consistent-return": 0, - "eol-last": 1, - "indent": [1, 4], - "no-use-before-define": [2, "nofunc"], - "no-process-exit": 0, - "no-trailing-spaces": 1, - "no-underscore-dangle": 0, - "no-unused-vars": 1, - "space-infix-ops": 1, - "quotes": [1, "single"], - "semi": [1, "always"], - "semi-spacing": 1, - "strict": [2, "global"], - "yoda": [1, "never"] - }, - "globals": { - "describe": true, - "it": true, - "before": true, - "beforeEach": true, - "after": true, - "afterEach": true - } -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..063845e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: purescript-contrib/setup-purescript@main + + - uses: actions/setup-node@v1 + with: + node-version: "10" + + - name: Install dependencies + run: | + npm install -g bower + npm install + bower install --production + + - name: Build source + run: npm run-script build + + - name: Run tests + run: | + bower install + npm run-script test --if-present diff --git a/.gitignore b/.gitignore index 6a969a8..7bd330e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ /.* !/.gitignore -!/.travis.yml +!/.github/ /bower_components/ /node_modules/ /tmp/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5b14646..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -dist: trusty -sudo: required -node_js: stable -env: - - PATH=$HOME/purescript:$PATH -install: - - TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p') - - wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - - chmod a+x $HOME/purescript - - npm install -g bower - - npm install - - bower install --production -script: - - npm run -s build - - bower install - - npm run -s test -after_success: -- >- - test $TRAVIS_TAG && - echo $GITHUB_TOKEN | pulp login && - echo y | pulp publish --no-push diff --git a/README.md b/README.md index 5e2a837..7073dae 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,24 @@ # purescript-node-fs-aff [![Latest release](http://img.shields.io/github/release/purescript-node/purescript-node-fs-aff.svg)](https://github.com/purescript-node/purescript-node-fs-aff/releases) -[![Build Status](https://travis-ci.org/purescript-node/purescript-node-fs-aff.svg?branch=master)](https://travis-ci.org/purescript-node/purescript-node-fs-aff) +[![Build status](https://github.com/purescript-node/purescript-node-fs-aff/workflows/CI/badge.svg?branch=master)](https://github.com/purescript-node/purescript-node-fs-aff/actions?query=workflow%3ACI+branch%3Amaster) +[![Pursuit](https://pursuit.purescript.org/packages/purescript-node-fs-aff/badge)](https://pursuit.purescript.org/packages/purescript-node-fs-aff) -[Node.FS][Node.FS] Wrappers for [purescript-aff][aff] +[Node.FS][node.fs] wrappers for [purescript-aff][aff]. -The `Aff` monad lets you write async code with ease, and `node-fs-aff` -lets you easily access the filesystem within `Aff`. +The `Aff` monad lets you write async code with ease, and `node-fs-aff` lets you easily access the filesystem within `Aff`. + +## Installation + +``` +spago install node-fs-aff +``` ## Example Consider asynchronously listing only non-hidden directories: -``` purescript +```purescript main = launchAff do files <- FS.readdir "." files' <- flip filterM files \file -> do @@ -29,6 +35,5 @@ That was easy. Run `npm run example` to see it work. Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-node-fs-aff). - -[Node.FS]: http://github.com/purescript-node/purescript-node-fs +[node.fs]: http://github.com/purescript-node/purescript-node-fs [aff]: https://github.com/slamdata/purescript-aff diff --git a/package.json b/package.json index 5a4bff0..d3602c1 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "test": "pulp test" }, "devDependencies": { - "pulp": "^12.2.0", - "purescript-psa": "^0.6.0", - "rimraf": "^2.6.2" + "pulp": "^15.0.0", + "purescript-psa": "^0.8.0", + "rimraf": "^3.0.2" } }