hjsmin 0.1.0 → 0.1.1
raw patch · 4 files changed
+18/−4 lines, 4 filesdep ~language-javascriptPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: language-javascript
API changes (from Hackage documentation)
Files
- README.markdown +2/−0
- Text/Jasmine/Pretty.hs +2/−2
- hjsmin.cabal +2/−2
- runtests.hs +12/−0
README.markdown view
@@ -28,6 +28,8 @@ Changes ------- +0.1.1 - Fixed problem with missing space after 'new' keyword, in issue #8.+ 0.1.0 - Major update to work with language-javascript 0.5.1. All changes should be internal. Update of build process to make use of Cabal testing support, and Travis CI.
Text/Jasmine/Pretty.hs view
@@ -93,8 +93,8 @@ -rn (JSMemberDot xs _d y) = (rJS xs) <> (text ".") <> (renderJS y)-rn (JSMemberSquare xs _lb x _rb) = (rJS xs) <> (text "[") <> (renderJS x) <> (text "]")+rn (JSMemberDot xs _d y) = (rJS $ fixLiterals $ fixNew xs) <> (text ".") <> (renderJS y)+rn (JSMemberSquare xs _lb x _rb) = (rJS $ fixLiterals $ fixNew xs) <> (text "[") <> (renderJS x) <> (text "]") rn (JSUnary l _s ) = text l rn (JSArrayLiteral _lb xs _rb) = (text "[") <> (rJS xs) <> (text "]")
hjsmin.cabal view
@@ -1,5 +1,5 @@ name: hjsmin-version: 0.1.0+version: 0.1.1 license: BSD3 license-file: LICENSE author: Alan Zimmerman <alan.zimm@gmail.com>@@ -44,7 +44,7 @@ , blaze-builder >= 0.2 && < 1 , text >= 0.8 && < 1 , containers >= 0.2 && < 0.5- , language-javascript >= 0.5.1 && < 0.6+ , language-javascript >= 0.5.4 && < 0.6 source-repository head type: git
runtests.hs view
@@ -40,6 +40,7 @@ , testCase "If2" caseIf2 , testCase "If3" caseIf3 , testCase "BootstrapDropdown" caseBootstrapDropdown+ , testCase "Issue8" caseIssue8 ] testSuiteMin :: Test@@ -66,6 +67,8 @@ , testCase "MinIf2" caseMinIf2 , testCase "MinIf3" caseMinIf3 , testCase "MinBootstrapDropdown" caseMinBootstrapDropdown+ , testCase "MinIssue8" caseMinIssue8+ ] testSuiteFiles :: Test@@ -304,6 +307,15 @@ caseMinBootstrapDropdown = -- Note: jsmin preserves the \n, rather than the semi. A matter of taste, it is the same number of chars. testMinify "clearMenus();!isActive&&$parent.toggleClass('open')" srcBootstrapDropdown+++srcIssue8 = "(function(){new nicEditor({fullPanel:true}).panelInstance('h4')})();"+caseIssue8 =+ "Right (JSSourceElementsTop [JSExpression [JSExpressionParen (JSExpression [JSFunctionExpression [] [] (JSBlock ([JSExpression [JSMemberDot [JSLiteral \"new\",JSIdentifier \"nicEditor\",JSArguments [JSObjectLiteral [JSPropertyNameandValue (JSIdentifier \"fullPanel\") [JSLiteral \"true\"]]]] (JSIdentifier \"panelInstance\"),JSArguments [JSStringLiteral '\\'' \"h4\"]]]))]),JSArguments []],JSLiteral \";\",JSLiteral \"\"])"+ @=? (showStrippedMaybe $ parseProgram srcIssue8)+caseMinIssue8 =+ -- Note: jsmin preserves the \n, rather than the semi. A matter of taste, it is the same number of chars.+ testMinify "(function(){new nicEditor({fullPanel:true}).panelInstance('h4')})()" srcIssue8 -- --------------------------------------------------------------------- -- utilities