Sitelet https://github.com/purescript-contrib/purescript-css/pull/77/files
Skip to content
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
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
language: node_js
dist: trusty
sudo: required
node_js: 6
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:
- bower install --production
- npm run -s build
- bower install
- npm -s test
- npm test
after_success:
- >-
test $TRAVIS_TAG &&
Expand Down
18 changes: 9 additions & 9 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
"tests"
],
"dependencies": {
"purescript-generics": "^4.0.0",
"purescript-nonempty": "^4.0.0",
"purescript-profunctor": "^3.0.0",
"purescript-strings": "^3.0.0",
"purescript-these": "^3.0.0",
"purescript-transformers": "^3.2.0",
"purescript-colors": "3.x - 4.x",
"purescript-console": "^3.0.0"
"purescript-generics-rep": "^6.0.0",
"purescript-nonempty": "^5.0.0",
"purescript-profunctor": "^4.0.0",
"purescript-strings": "^4.0.0",
"purescript-these": "^4.0.0",
"purescript-transformers": "^4.1.0",
"purescript-colors": "^5.0.0",
"purescript-console": "^4.1.0"
},
"devDependencies": {
"purescript-exceptions": "^3.0.0"
"purescript-exceptions": "^4.0.0"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"test": "pulp test"
},
"devDependencies": {
"pulp": "^11.0.2",
"purescript-psa": "^0.5.1",
"purescript": "^0.11.6",

@safareli safareli Jun 4, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess version could be just bumped to ^0.12.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, at least for me purescript package doesn't work, I use slamdata/node-purescript#0.12

"rimraf": "^2.6.1"
"pulp": "^12.2.0",
"purescript-psa": "^0.6.0",
"purescript": "slamdata/node-purescript#0.12",
"rimraf": "^2.6.2"
}
}
10 changes: 5 additions & 5 deletions src/CSS/Animation.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import CSS.Stylesheet (CSS, key)
import CSS.Time (Time)
import CSS.Transition (TimingFunction)
import Data.Foldable (for_)
import Data.Generic (class Generic)
import Data.Generic.Rep (class Generic)
import Data.Tuple.Nested (tuple7)

newtype AnimationDirection = AnimationDirection Value

derive instance eqAnimationDirection :: Eq AnimationDirection
derive instance ordAnimationDirection :: Ord AnimationDirection
derive instance genericAnimationDirection :: Generic AnimationDirection
derive instance genericAnimationDirection :: Generic AnimationDirection _

instance valAnimationDirection :: Val AnimationDirection where
value (AnimationDirection v) = v
Expand All @@ -35,7 +35,7 @@ newtype IterationCount = IterationCount Value

derive instance eqIterationCount :: Eq IterationCount
derive instance ordIterationCount :: Ord IterationCount
derive instance genericIterationCount :: Generic IterationCount
derive instance genericIterationCount :: Generic IterationCount _

instance valIterationCount :: Val IterationCount where
value (IterationCount v) = v
Expand All @@ -50,7 +50,7 @@ newtype FillMode = FillMode Value

derive instance eqFillMode :: Eq FillMode
derive instance ordFillMode :: Ord FillMode
derive instance genericFillMode :: Generic FillMode
derive instance genericFillMode :: Generic FillMode _

instance valFillMode :: Val FillMode where
value (FillMode v) = v
Expand All @@ -77,7 +77,7 @@ newtype AnimationName = AnimationName Value

derive instance eqAnimationName :: Eq AnimationName
derive instance ordAnimationName :: Ord AnimationName
derive instance genericAnimationName :: Generic AnimationName
derive instance genericAnimationName :: Generic AnimationName _

instance valAnimationName :: Val AnimationName where
value (AnimationName v) = v
Expand Down
22 changes: 11 additions & 11 deletions src/CSS/Background.purs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ where

import Prelude

import Data.Generic (class Generic)
import Data.Generic.Rep (class Generic)
import Data.Tuple (Tuple(..))

import CSS.Box (BoxType)
Expand Down Expand Up @@ -135,7 +135,7 @@ newtype BackgroundPosition = BackgroundPosition Value

derive instance eqBackgroundPosition :: Eq BackgroundPosition
derive instance ordBackgroundPosition :: Ord BackgroundPosition
derive instance genericBackgroundPosition :: Generic BackgroundPosition
derive instance genericBackgroundPosition :: Generic BackgroundPosition _

instance isStringBackgroundPosition :: IsString BackgroundPosition where
fromString = BackgroundPosition <<< fromString
Expand Down Expand Up @@ -167,7 +167,7 @@ newtype BackgroundSize = BackgroundSize Value

derive instance eqBackgroundSize :: Eq BackgroundSize
derive instance ordBackgroundSize :: Ord BackgroundSize
derive instance genericBackgroundSize :: Generic BackgroundSize
derive instance genericBackgroundSize :: Generic BackgroundSize _

instance isStringBackgroundSize :: IsString BackgroundSize where
fromString = BackgroundSize <<< fromString
Expand Down Expand Up @@ -205,7 +205,7 @@ newtype BackgroundRepeat = BackgroundRepeat Value

derive instance eqBackgroundRepeat :: Eq BackgroundRepeat
derive instance ordBackgroundRepeat :: Ord BackgroundRepeat
derive instance genericBackgroundRepeat :: Generic BackgroundRepeat
derive instance genericBackgroundRepeat :: Generic BackgroundRepeat _

instance isStringBackgroundRepeat :: IsString BackgroundRepeat where
fromString = BackgroundRepeat <<< fromString
Expand Down Expand Up @@ -255,7 +255,7 @@ newtype BackgroundImage = BackgroundImage Value

derive instance eqBackgroundImage :: Eq BackgroundImage
derive instance ordBackgroundImage :: Ord BackgroundImage
derive instance genericBackgroundImage :: Generic BackgroundImage
derive instance genericBackgroundImage :: Generic BackgroundImage _

instance isStringBackgroundImage :: IsString BackgroundImage where
fromString = BackgroundImage <<< fromString
Expand Down Expand Up @@ -287,7 +287,7 @@ newtype BackgroundOrigin = BackgroundOrigin Value

derive instance eqBackgroundOrigin :: Eq BackgroundOrigin
derive instance ordBackgroundOrigin :: Ord BackgroundOrigin
derive instance genericBackgroundOrigin :: Generic BackgroundOrigin
derive instance genericBackgroundOrigin :: Generic BackgroundOrigin _

instance isStringBackgroundOrigin :: IsString BackgroundOrigin where
fromString = BackgroundOrigin <<< fromString
Expand Down Expand Up @@ -316,7 +316,7 @@ newtype BackgroundClip = BackgroundClip Value

derive instance eqBackgroundClip :: Eq BackgroundClip
derive instance ordBackgroundClip :: Ord BackgroundClip
derive instance genericBackgroundClip :: Generic BackgroundClip
derive instance genericBackgroundClip :: Generic BackgroundClip _

instance isStringBackgroundClip :: IsString BackgroundClip where
fromString = BackgroundClip <<< fromString
Expand Down Expand Up @@ -345,7 +345,7 @@ newtype BackgroundAttachment = BackgroundAttachment Value

derive instance eqBackgroundAttachment :: Eq BackgroundAttachment
derive instance ordBackgroundAttachment :: Ord BackgroundAttachment
derive instance genericBackgroundAttachment :: Generic BackgroundAttachment
derive instance genericBackgroundAttachment :: Generic BackgroundAttachment _

instance isStringBackgroundAttachment :: IsString BackgroundAttachment where
fromString = BackgroundAttachment <<< fromString
Expand Down Expand Up @@ -377,7 +377,7 @@ newtype Side = Side Value

derive instance eqSide :: Eq Side
derive instance ordSide :: Ord Side
derive instance genericSide :: Generic Side
derive instance genericSide :: Generic Side _

instance isStringSide :: IsString Side where
fromString = Side <<< fromString
Expand Down Expand Up @@ -418,7 +418,7 @@ newtype Direction = Direction Value

derive instance eqDirection :: Eq Direction
derive instance ordDirection :: Ord Direction
derive instance genericDirection :: Generic Direction
derive instance genericDirection :: Generic Direction _

instance valDirection :: Val Direction where
value (Direction v) = v
Expand All @@ -436,7 +436,7 @@ newtype Location = Location Value

derive instance eqLocation :: Eq Location
derive instance ordLocation :: Ord Location
derive instance genericLocation :: Generic Location
derive instance genericLocation :: Generic Location _

instance valLocation :: Val Location where
value (Location v) = v
Expand Down
4 changes: 2 additions & 2 deletions src/CSS/Border.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module CSS.Border where

import Prelude

import Data.Generic (class Generic)
import Data.Generic.Rep (class Generic)
import Data.Tuple.Nested (tuple3, tuple4)

import CSS.Color (Color)
Expand All @@ -15,7 +15,7 @@ newtype Stroke = Stroke Value

derive instance eqStroke :: Eq Stroke
derive instance ordStroke :: Ord Stroke
derive instance genericStroke :: Generic Stroke
derive instance genericStroke :: Generic Stroke _

instance valStroke :: Val Stroke where
value (Stroke v) = v
Expand Down
4 changes: 2 additions & 2 deletions src/CSS/Box.purs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ where

import Prelude

import Data.Generic (class Generic)
import Data.Generic.Rep (class Generic)

import CSS.Border (Stroke)
import CSS.Color (Color)
Expand All @@ -25,7 +25,7 @@ newtype BoxType = BoxType Value

derive instance eqBoxType :: Eq BoxType
derive instance ordBoxType :: Ord BoxType
derive instance genericBoxType :: Generic BoxType
derive instance genericBoxType :: Generic BoxType _

instance isStringBoxType :: IsString BoxType where
fromString = BoxType <<< fromString
Expand Down
4 changes: 1 addition & 3 deletions src/CSS/Common.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
module CSS.Common where

import Prelude

import Data.Monoid (class Monoid)
import Data.Tuple (Tuple(..))

import CSS.Property (Prefixed(..), Value)
Expand Down Expand Up @@ -47,7 +45,7 @@ instance normalValue :: Normal Value where normal = fromString "normal"
instance noneValue :: None Value where none = fromString "none"
instance visibleValue :: Visible Value where visible = fromString "visible"
instance hiddenValue :: Hidden Value where hidden = fromString "hidden"
instance otherValue :: Other Value where other = id
instance otherValue :: Other Value where other = identity
instance initialValue :: Initial Value where initial = fromString "initial"
instance unsetValue :: Unset Value where unset = fromString "unset"
instance topValue :: Top Value where top = fromString "top"
Expand Down
16 changes: 9 additions & 7 deletions src/CSS/Display.purs
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
module CSS.Display where

import Prelude

import CSS.Common (class Inherit, class None)
import CSS.Property (class Val, Value)
import CSS.String (fromString)
import CSS.Stylesheet (CSS, key)
import Data.Generic (class Generic, gShow)
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow)

newtype Position = Position Value

derive instance eqPosition :: Eq Position
derive instance ordPosition :: Ord Position
derive instance genericPosition :: Generic Position
derive instance genericPosition :: Generic Position _

instance valPosition :: Val Position where
value (Position v) = v
Expand All @@ -35,7 +37,7 @@ newtype Display = Display Value

derive instance eqDisplay :: Eq Display
derive instance ordDisplay :: Ord Display
derive instance genericDisplay :: Generic Display
derive instance genericDisplay :: Generic Display _

instance valDisplay :: Val Display where
value (Display v) = v
Expand Down Expand Up @@ -109,10 +111,10 @@ display = key $ fromString "display"
data Float = FloatLeft | FloatRight | FloatNone

derive instance eqFloat :: Eq Float
derive instance genericFloat :: Generic Float
derive instance genericFloat :: Generic Float _

instance showFloat :: Show Float where
show = gShow
show = genericShow

instance valFloat :: Val (Float) where
value (FloatLeft) = fromString "left"
Expand Down Expand Up @@ -141,10 +143,10 @@ data ClearFloat
| ClearFloatInlineEnd

derive instance eqClearFloat :: Eq ClearFloat
derive instance genericClearFloat :: Generic ClearFloat
derive instance genericClearFloat :: Generic ClearFloat _

instance showClearFloat :: Show ClearFloat where
show = gShow
show = genericShow

instance valClearFloat :: Val (ClearFloat) where
value (ClearFloatLeft) = fromString "left"
Expand Down
14 changes: 7 additions & 7 deletions src/CSS/Flexbox.purs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module CSS.Flexbox where

import Prelude

import Data.Generic (class Generic)
import Data.Generic.Rep (class Generic)

import CSS.Common (class Center, class Inherit, class Other, class Baseline, class Auto)
import CSS.Property (class Val, Value, value, (!))
Expand Down Expand Up @@ -48,7 +48,7 @@ newtype AlignContentValue = AlignContentValue Value

derive instance eqAlignContentValue :: Eq AlignContentValue
derive instance ordAlignContentValue :: Ord AlignContentValue
derive instance genericAlignContentValue :: Generic AlignContentValue
derive instance genericAlignContentValue :: Generic AlignContentValue _

instance isStringAlignContentValue :: IsString AlignContentValue where
fromString = AlignContentValue <<< fromString
Expand Down Expand Up @@ -89,7 +89,7 @@ newtype AlignItemsValue = AlignItemsValue Value

derive instance eqAlignItemsValue :: Eq AlignItemsValue
derive instance ordAlignItemsValue :: Ord AlignItemsValue
derive instance genericAlignItemsValue :: Generic AlignItemsValue
derive instance genericAlignItemsValue :: Generic AlignItemsValue _

instance isStringAlignItemsValue :: IsString AlignItemsValue where
fromString = AlignItemsValue <<< fromString
Expand Down Expand Up @@ -127,7 +127,7 @@ newtype AlignSelfValue = AlignSelfValue Value

derive instance eqAlignSelfValue :: Eq AlignSelfValue
derive instance ordAlignSelfValue :: Ord AlignSelfValue
derive instance genericAlignSelfValue :: Generic AlignSelfValue
derive instance genericAlignSelfValue :: Generic AlignSelfValue _

instance isStringAlignSelfValue :: IsString AlignSelfValue where
fromString = AlignSelfValue <<< fromString
Expand Down Expand Up @@ -180,7 +180,7 @@ newtype FlexDirection = FlexDirection Value

derive instance eqFlexDirection :: Eq FlexDirection
derive instance ordFlexDirection :: Ord FlexDirection
derive instance genericFlexDirection :: Generic FlexDirection
derive instance genericFlexDirection :: Generic FlexDirection _

instance valFlexDirection :: Val FlexDirection where
value (FlexDirection v) = v
Expand Down Expand Up @@ -222,7 +222,7 @@ newtype FlexWrap = FlexWrap Value

derive instance eqFlexWrap :: Eq FlexWrap
derive instance ordFlexWrap :: Ord FlexWrap
derive instance genericFlexWrap :: Generic FlexWrap
derive instance genericFlexWrap :: Generic FlexWrap _

instance valFlexWrap :: Val FlexWrap where
value (FlexWrap v) = v
Expand All @@ -248,7 +248,7 @@ newtype JustifyContentValue = JustifyContentValue Value

derive instance eqJustifyContentValue :: Eq JustifyContentValue
derive instance ordJustifyContentValue :: Ord JustifyContentValue
derive instance genericJustifyContentValue :: Generic JustifyContentValue
derive instance genericJustifyContentValue :: Generic JustifyContentValue _

instance isStringJustifyContentValue :: IsString JustifyContentValue where
fromString = JustifyContentValue <<< fromString
Expand Down
Loading