This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +41
-55
lines changed
Expand file tree Collapse file tree 8 files changed +41
-55
lines changed Original file line number Diff line number Diff line change 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 ],
25+ "quotes" : [2 , " double" ],
26+ "semi" : [2 , " always" ]
27+ }
28+ }
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ npm-debug.log
22/. *
33! /.gitignore
44! /.travis.yml
5- ! /.jscsrc
6- ! /.jshintrc
5+ ! /.eslintrc.json
76/bower_components /
87/node_modules /
98/output /
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1818 " package.json"
1919 ],
2020 "dependencies" : {
21- "purescript-prelude" : " ^2.4 .0" ,
22- "purescript-dom" : " ^3.5.1 " ,
23- "purescript-css" : " ^2.1 .0"
21+ "purescript-prelude" : " ^3.0 .0" ,
22+ "purescript-dom" : " ^4.2.0 " ,
23+ "purescript-css" : " ^3.0 .0"
2424 }
2525}
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import Prelude
55import Control.Monad.Eff (Eff )
66
77import Data.Maybe (fromMaybe )
8- import Data.Nullable (toMaybe )
98
109import DOM (DOM )
1110import CSS (Selector , fromString )
@@ -27,9 +26,7 @@ onLoad action
2726 =<< window
2827
2928stringFromAttr :: forall eff . String -> Element -> Eff (dom :: DOM | eff ) String
30- stringFromAttr attr el = do
31- val <- getAttribute attr el
32- pure $ fromMaybe " " $ toMaybe val
29+ stringFromAttr attr el = fromMaybe " " <$> getAttribute attr el
3330
3431testElement :: forall eff . Element -> Eff (dom :: DOM | eff ) Unit
3532testElement el = void $ C .fromElement el $ stringFromAttr " data-copy-text" el
@@ -41,6 +38,6 @@ main :: forall eff. Eff (dom :: DOM | eff) Unit
4138main = onLoad do
4239 win <- window
4340 doc <- documentToNonElementParentNode <<< htmlDocumentToDocument <$> document win
44- element <- toMaybe <$> getElementById (ElementId " test-element" ) doc
41+ element <- getElementById (ElementId " test-element" ) doc
4542 fromMaybe (pure unit) $ testElement <$> element
4643 testSelector $ fromString " .test-selector"
Original file line number Diff line number Diff line change 22 "private" : true ,
33 "scripts" : {
44 "clean" : " rimraf output && rimraf .pulp-cache" ,
5- "build" : " jshint src && jscs src && pulp build --censor-lib --strict" ,
6- "test" : " pulp build -I example/src --censor-lib --strict" ,
5+ "build" : " eslint src && pulp build -- --censor-lib --strict" ,
6+ "test" : " pulp build -I example/src -- -- censor-lib --strict" ,
77 "build-example" : " pulp browserify -I example/src --to example/example.js"
88 },
99 "devDependencies" : {
10- "jscs" : " ^3.0.7" ,
11- "jshint" : " ^2.9.4" ,
12- "pulp" : " ^9.0.1" ,
13- "purescript" : " ^0.10.7" ,
14- "purescript-psa" : " ^0.3.9" ,
10+ "eslint" : " ^3.19.0" ,
11+ "pulp" : " ^11.0.0" ,
12+ "purescript" : " ^0.11.4" ,
13+ "purescript-psa" : " ^0.5.1" ,
1514 "rimraf" : " ^2.6.1"
1615 },
1716 "dependencies" : {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import DOM (DOM)
1212import CSS (Selector , selector )
1313import DOM.Node.Types (Element )
1414
15- foreign import data Clipboard :: *
15+ foreign import data Clipboard :: Type
1616
1717foreign import fromElement
1818 :: forall eff
You can’t perform that action at this time.
0 commit comments