Skip to content

Commit 8849beb

Browse files
authored
Merge pull request #4 from purescript-web/compiler/0.12
Extract from purescript-dom and update
2 parents 21b1b38 + 83441a0 commit 8849beb

14 files changed

+189
-244
lines changed

.eslintrc.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 5
4+
},
5+
"extends": "eslint:recommended",
6+
"env": {
7+
"commonjs": true,
8+
"browser": true
9+
},
10+
"rules": {
11+
"strict": [2, "global"],
12+
"block-scoped-var": 2,
13+
"consistent-return": 2,
14+
"eqeqeq": [2, "smart"],
15+
"guard-for-in": 2,
16+
"no-caller": 2,
17+
"no-extend-native": 2,
18+
"no-loop-func": 2,
19+
"no-new": 2,
20+
"no-param-reassign": 2,
21+
"no-return-assign": 2,
22+
"no-unused-expressions": 2,
23+
"no-use-before-define": 2,
24+
"radix": [2, "always"],
25+
"indent": [2, 2],
26+
"quotes": [2, "double"],
27+
"semi": [2, "always"]
28+
}
29+
}

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
/.*
2+
!/.gitignore
3+
!/.eslintrc.json
4+
!/.travis.yml
5+
package-lock.json
16
/bower_components/
27
/node_modules/
3-
/.pulp-cache/
48
/output/
5-
.psc-ide-port

.jscsrc

-17
This file was deleted.

.jshintrc

-26
This file was deleted.

.travis.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
language: node_js
22
dist: trusty
33
sudo: required
4-
node_js: node
4+
node_js: stable
5+
env:
6+
- PATH=$HOME/purescript:$PATH
57
install:
8+
- 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')
9+
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
10+
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
11+
- chmod a+x $HOME/purescript
12+
- npm install -g bower
613
- npm install
714
script:
8-
- npm run build
15+
- bower install
16+
- npm run -s build
17+
after_success:
18+
- >-
19+
test $TRAVIS_TAG &&
20+
echo $GITHUB_TOKEN | pulp login &&
21+
echo y | pulp publish --no-push

LICENSE

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
Copyright (c) 2016 Ian D. Bollinger
1+
MIT License
22

3-
Permission is hereby granted, free of charge, to any person obtaining
4-
a copy of this software and associated documentation files (the
5-
"Software"), to deal in the Software without restriction, including
6-
without limitation the rights to use, copy, modify, merge, publish,
7-
distribute, sublicense, and/or sell copies of the Software, and to
8-
permit persons to whom the Software is furnished to do so, subject to
9-
the following conditions:
3+
Copyright (c) 2017
104

11-
The above copyright notice and this permission notice shall be included
12-
in all copies or substantial portions of the Software.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1311

14-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+1-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1 @@
1-
# purescript-web-storage
2-
3-
[![Latest release](http://img.shields.io/bower/v/purescript-web-storage.svg)](https://github.com/ianbollinger/purescript-web-storage/releases)
4-
[![Build status](https://travis-ci.org/ianbollinger/purescript-web-storage.svg?branch=master)](https://travis-ci.org/ianbollinger/purescript-web-storage)
5-
[![Dependency status](https://www.versioneye.com/user/projects/5795b3bd9cf8860033642326/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5795b3bd9cf8860033642326)
6-
7-
PureScript bindings for the
8-
[web storage API](https://html.spec.whatwg.org/multipage/webstorage.html).
9-
10-
## Documentation
11-
12-
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-web-storage).
13-
14-
## Installation
15-
16-
```
17-
bower install purescript-web-storage
18-
```
19-
20-
## License
21-
22-
`purescript-web-storage` is licensed under the [MIT license](LICENSE).
1+
# purescript-web-storage

bower.json

+8-22
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,21 @@
11
{
22
"name": "purescript-web-storage",
3-
"description": "PureScript bindings for the web storage API",
3+
"homepage": "https://github.com/purescript-web/purescript-web-storage",
44
"license": "MIT",
5+
"repository": {
6+
"type": "git",
7+
"url": "git://github.com/purescript-web/purescript-web-storage.git"
8+
},
59
"ignore": [
610
"**/.*",
711
"bower_components",
812
"node_modules",
913
"output",
14+
"bower.json",
1015
"package.json"
1116
],
12-
"keywords": [
13-
"purescript"
14-
],
15-
"authors": [
16-
"Ian D. Bollinger <[email protected]> (https://github.com/ianbollinger)"
17-
],
18-
"homepage": "https://github.com/ianbollinger/purescript-web-storage",
19-
"repository": {
20-
"type": "git",
21-
"url": "https://github.com/ianbollinger/purescript-web-storage"
22-
},
2317
"dependencies": {
24-
"purescript-eff": "^1.0.0",
25-
"purescript-nullable": "^1.0.1",
26-
"purescript-prelude": "^1.0.1",
27-
"purescript-exceptions": "^1.0.0",
28-
"purescript-maybe": "^1.0.0"
29-
},
30-
"devDependencies": {
31-
"purescript-aff": "^1.0.0",
32-
"purescript-psci-support": "^1.0.0",
33-
"purescript-test-unit": "^7.0.0"
18+
"purescript-web-events": "^1.0.0",
19+
"purescript-nullable": "^4.0.0"
3420
}
3521
}

package.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{
22
"private": true,
33
"scripts": {
4-
"postinstall": "bower install",
5-
"build": "jshint src && jscs src && pulp build --strict"
4+
"clean": "rimraf output && rimraf .pulp-cache",
5+
"build": "eslint src && pulp build -- --censor-lib --strict"
66
},
77
"devDependencies": {
8-
"bower": "^1.7.9",
9-
"jscs": "^3.0.7",
10-
"jshint": "^2.9.2",
11-
"pulp": "^9.0.1",
12-
"purescript": "^0.9.2",
13-
"purescript-psa": "^0.3.9"
8+
"eslint": "^4.19.1",
9+
"pulp": "^12.2.0",
10+
"purescript-psa": "^0.6.0",
11+
"rimraf": "^2.6.2"
1412
}
1513
}

src/Web/Storage.purs

-112
This file was deleted.

src/Web/Storage/Event/StorageEvent.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"use strict";
2+
3+
exports._key = function (storage) {
4+
return storage.key;
5+
};
6+
7+
exports._oldValue = function (storage) {
8+
return storage.oldValue;
9+
};
10+
11+
exports._newValue = function (storage) {
12+
return storage.newValue;
13+
};
14+
15+
exports.url = function (storage) {
16+
return storage.url;
17+
};
18+
19+
exports._storageArea = function (storage) {
20+
return storage.storageArea;
21+
};

0 commit comments

Comments
 (0)