Skip to content

Extract from purescript-dom and update #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parserOptions": {
"ecmaVersion": 5
},
"extends": "eslint:recommended",
"env": {
"commonjs": true,
"browser": true
},
"rules": {
"strict": [2, "global"],
"block-scoped-var": 2,
"consistent-return": 2,
"eqeqeq": [2, "smart"],
"guard-for-in": 2,
"no-caller": 2,
"no-extend-native": 2,
"no-loop-func": 2,
"no-new": 2,
"no-param-reassign": 2,
"no-return-assign": 2,
"no-unused-expressions": 2,
"no-use-before-define": 2,
"radix": [2, "always"],
"indent": [2, 2],
"quotes": [2, "double"],
"semi": [2, "always"]
}
}
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/.*
!/.gitignore
!/.eslintrc.json
!/.travis.yml
package-lock.json
/bower_components/
/node_modules/
/.pulp-cache/
/output/
.psc-ide-port
17 changes: 0 additions & 17 deletions .jscsrc

This file was deleted.

26 changes: 0 additions & 26 deletions .jshintrc

This file was deleted.

17 changes: 15 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
language: node_js
dist: trusty
sudo: required
node_js: node
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
script:
- npm run build
- bower install
- npm run -s build
after_success:
- >-
test $TRAVIS_TAG &&
echo $GITHUB_TOKEN | pulp login &&
echo y | pulp publish --no-push
35 changes: 18 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
Copyright (c) 2016 Ian D. Bollinger
MIT License

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

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
# purescript-web-storage

[![Latest release](http://img.shields.io/bower/v/purescript-web-storage.svg)](https://github.com/ianbollinger/purescript-web-storage/releases)
[![Build status](https://travis-ci.org/ianbollinger/purescript-web-storage.svg?branch=master)](https://travis-ci.org/ianbollinger/purescript-web-storage)
[![Dependency status](https://www.versioneye.com/user/projects/5795b3bd9cf8860033642326/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5795b3bd9cf8860033642326)

PureScript bindings for the
[web storage API](https://html.spec.whatwg.org/multipage/webstorage.html).

## Documentation

Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-web-storage).

## Installation

```
bower install purescript-web-storage
```

## License

`purescript-web-storage` is licensed under the [MIT license](LICENSE).
# purescript-web-storage
30 changes: 8 additions & 22 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
{
"name": "purescript-web-storage",
"description": "PureScript bindings for the web storage API",
"homepage": "https://github.com/purescript-web/purescript-web-storage",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/purescript-web/purescript-web-storage.git"
},
"ignore": [
"**/.*",
"bower_components",
"node_modules",
"output",
"bower.json",
"package.json"
],
"keywords": [
"purescript"
],
"authors": [
"Ian D. Bollinger <[email protected]> (https://github.com/ianbollinger)"
],
"homepage": "https://github.com/ianbollinger/purescript-web-storage",
"repository": {
"type": "git",
"url": "https://github.com/ianbollinger/purescript-web-storage"
},
"dependencies": {
"purescript-eff": "^1.0.0",
"purescript-nullable": "^1.0.1",
"purescript-prelude": "^1.0.1",
"purescript-exceptions": "^1.0.0",
"purescript-maybe": "^1.0.0"
},
"devDependencies": {
"purescript-aff": "^1.0.0",
"purescript-psci-support": "^1.0.0",
"purescript-test-unit": "^7.0.0"
"purescript-web-events": "^1.0.0",
"purescript-nullable": "^4.0.0"
}
}
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"private": true,
"scripts": {
"postinstall": "bower install",
"build": "jshint src && jscs src && pulp build --strict"
"clean": "rimraf output && rimraf .pulp-cache",
"build": "eslint src && pulp build -- --censor-lib --strict"
},
"devDependencies": {
"bower": "^1.7.9",
"jscs": "^3.0.7",
"jshint": "^2.9.2",
"pulp": "^9.0.1",
"purescript": "^0.9.2",
"purescript-psa": "^0.3.9"
"eslint": "^4.19.1",
"pulp": "^12.2.0",
"purescript-psa": "^0.6.0",
"rimraf": "^2.6.2"
}
}
112 changes: 0 additions & 112 deletions src/Web/Storage.purs

This file was deleted.

21 changes: 21 additions & 0 deletions src/Web/Storage/Event/StorageEvent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use strict";

exports._key = function (storage) {
return storage.key;
};

exports._oldValue = function (storage) {
return storage.oldValue;
};

exports._newValue = function (storage) {
return storage.newValue;
};

exports.url = function (storage) {
return storage.url;
};

exports._storageArea = function (storage) {
return storage.storageArea;
};
Loading