git.iko.soy/rowtype-yoga/purescript-unique
on master help sign in
Updates for PureScript 0.11
commit33214faf821843aad95a019ad0a4a28d2b305189 authormechairoi <ttsujikawa@gmail.com> dateWed 26 Apr 2017, 13:50 (9 years ago) parentf303712
9 files changed+55−73
.eslintrc.json+28 .gitignore+7−8 .jscsrc−13 .jshintrc−19 .travis.yml+7−13 bower.json+4−7 package.json+6−10 src/Data/Unique.purs+2−2 test/Main.purs+1−1
.eslintrc.jsonnew file+28
@@ -0,0 +1,28 @@
1+{
2+ "parserOptions": {
3+ "ecmaVersion": 5
4+ },
5+ "extends": "eslint:recommended",
6+ "env": {
7+ "commonjs": true
8+ },
9+ "rules": {
10+ "strict": [2, "global"],
11+ "block-scoped-var": 2,
12+ "consistent-return": 2,
13+ "eqeqeq": [2, "smart"],
14+ "guard-for-in": 2,
15+ "no-caller": 2,
16+ "no-extend-native": 2,
17+ "no-loop-func": 2,
18+ "no-new": 2,
19+ "no-param-reassign": 2,
20+ "no-return-assign": 2,
21+ "no-unused-expressions": 2,
22+ "no-use-before-define": 2,
23+ "radix": [2, "always"],
24+ "indent": [2, 2, { "SwitchCase": 1 }],
25+ "quotes": [2, "double"],
26+ "semi": [2, "always"]
27+ }
28+}
.gitignore+7−8
@@ -1,8 +1,7 @@
1−/bower_components
2−/node_modules
3−/.psci_modules
4−/output
5−/.psci
6−/npm-debug.log*
7−/.pulp-cache
8−/.pursuit.json
1+/.*
2+!/.gitignore
3+!/.eslintrc.json
4+!/.travis.yml
5+/bower_components/
6+/node_modules/
7+/output/
.jscsrcdeleted−13
@@ -1,13 +0,0 @@
1−{
2− "preset": "grunt",
3− "disallowSpacesInFunctionExpression": null,
4− "disallowSpacesInAnonymousFunctionExpression": null,
5− "requireSpacesInAnonymousFunctionExpression": {
6− "beforeOpeningRoundBrace": true,
7− "beforeOpeningCurlyBrace": true
8− },
9− "disallowSpacesInsideObjectBrackets": null,
10− "requireSpacesInsideObjectBrackets": "all",
11− "validateQuoteMarks": "\"",
12− "requireCurlyBraces": null
13−}
.jshintrcdeleted−19
@@ -1,19 +0,0 @@
1−{
2− "bitwise": true,
3− "eqeqeq": true,
4− "forin": true,
5− "freeze": true,
6− "funcscope": true,
7− "futurehostile": true,
8− "globalstrict": true,
9− "latedef": true,
10− "maxparams": 1,
11− "noarg": true,
12− "nocomma": true,
13− "nonew": true,
14− "notypeof": true,
15− "singleGroups": true,
16− "undef": true,
17− "unused": true,
18− "eqnull": true
19−}
.travis.yml+7−13
@@ -1,7 +1,7 @@
11language: node_js
2−sudo: false
3−node_js:
4− - 5
2+dist: trusty
3+sudo: required
4+node_js: stable
55env:
66 - PATH=$HOME/purescript:$PATH
77install:
@@ -12,13 +12,7 @@ install:
1212 - npm install -g bower
1313 - npm install
1414script:
15− - npm run build
16− - npm run test
17−after_success:
18−- >-
19− test $TRAVIS_TAG &&
20− psc-publish > .pursuit.json &&
21− curl -X POST http://pursuit.purescript.org/packages \
22− -d @.pursuit.json \
23− -H 'Accept: application/json' \
24− -H "Authorization: token ${GITHUB_TOKEN}"
15+ - bower install --production
16+ - npm run -s build
17+ - bower install
18+ - npm -s test
bower.json+4−7
@@ -2,9 +2,6 @@
22 "name": "purescript-unique",
33 "homepage": "https://github.com/mechairoi/purescript-unique",
44 "description": "Data.Unique for PureScript",
5− "keywords": [
6− "purescript"
7− ],
85 "license": "MIT",
96 "repository": {
107 "type": "git",
@@ -20,11 +17,11 @@
2017 "package.json"
2118 ],
2219 "dependencies": {
23− "purescript-prelude": "^2.1.0",
24− "purescript-eff": "^2.0.0"
20+ "purescript-prelude": "^3.0.0",
21+ "purescript-eff": "^3.1.0"
2522 },
2623 "devDependencies": {
27− "purescript-console": "^2.0.0",
28− "purescript-assert": "^2.0.0"
24+ "purescript-console": "^3.0.0",
25+ "purescript-assert": "^3.0.0"
2926 }
3027}
package.json+6−10
@@ -1,18 +1,14 @@
11{
2− "name": "purescript-unique",
3− "description": "Data.Unique for PureScript",
42 "private": true,
5− "license": "MIT",
63 "devDependencies": {
7− "jscs": "^2.9.0",
8− "jshint": "^2.9.1",
9− "pulp": "^9.0.1",
10− "rimraf": "^2.5.1"
4+ "eslint": "^3.19.0",
5+ "pulp": "^11.0.0",
6+ "purescript-psa": "^0.5.1",
7+ "rimraf": "^2.6.1"
118 },
129 "scripts": {
13− "postinstall": "bower install",
14− "build": "jshint src && jscs src && pulp build && rimraf docs && pulp docs",
15− "docs": "pulp docs",
10+ "clean": "rimraf output && rimraf .pulp-cache",
11+ "build": "eslint src && pulp build -- --censor-lib --strict",
1612 "test": "pulp test"
1713 }
1814}
src/Data/Unique.purs+2−2
@@ -4,10 +4,10 @@ module Data.Unique
44 , UNIQ()
55 ) where
66
7−import Control.Monad.Eff (Eff)
7+import Control.Monad.Eff (Eff, kind Effect)
88import Prelude (class Ord, class Eq, class Show, compare, (==))
99
10−foreign import data UNIQ :: !
10+foreign import data UNIQ :: Effect
1111
1212newtype Unique = Unique String
1313
test/Main.purs+1−1
@@ -1,6 +1,6 @@
11module Test.Main where
22
3−import Prelude ((==), ($), (/=), bind, Unit)
3+import Prelude ((==), ($), (/=), discard, bind, Unit)
44import Data.Unique (newUnique, UNIQ)
55import Test.Assert (assert, ASSERT)
66import Control.Monad.Eff (Eff)