stylus-source 0.23.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -5
- data/VERSION +1 -1
- data/vendor/lib/functions/index.js +11 -12
- data/vendor/lib/functions/index.styl +45 -0
- data/vendor/lib/parser.js +13 -0
- data/vendor/lib/stylus.js +1 -1
- data/vendor/lib/visitor/evaluator.js +8 -0
- data/vendor/node_modules/cssom/Jakefile.js +35 -0
- data/vendor/node_modules/cssom/lib/CSSImportRule.js +10 -9
- data/vendor/node_modules/cssom/lib/CSSKeyframeRule.js +2 -0
- data/vendor/node_modules/cssom/lib/CSSKeyframesRule.js +2 -1
- data/vendor/node_modules/cssom/lib/CSSMediaRule.js +2 -1
- data/vendor/node_modules/cssom/lib/CSSRule.js +1 -0
- data/vendor/node_modules/cssom/lib/CSSStyleDeclaration.js +7 -5
- data/vendor/node_modules/cssom/lib/CSSStyleRule.js +11 -9
- data/vendor/node_modules/cssom/lib/CSSStyleSheet.js +4 -4
- data/vendor/node_modules/cssom/lib/MediaList.js +3 -3
- data/vendor/node_modules/cssom/lib/StyleSheet.js +3 -1
- data/vendor/node_modules/cssom/lib/clone.js +5 -5
- data/vendor/node_modules/cssom/lib/index.js +14 -12
- data/vendor/node_modules/cssom/lib/parse.js +48 -43
- data/vendor/node_modules/cssom/package.json +5 -4
- data/vendor/node_modules/debug/History.md +35 -0
- data/vendor/node_modules/debug/Makefile +5 -0
- data/vendor/node_modules/debug/Readme.md +128 -0
- data/vendor/node_modules/debug/debug.js +111 -0
- data/vendor/node_modules/debug/example/app.js +19 -0
- data/vendor/node_modules/debug/example/browser.html +24 -0
- data/vendor/node_modules/debug/example/wildcards.js +10 -0
- data/vendor/node_modules/debug/example/worker.js +22 -0
- data/vendor/node_modules/debug/index.js +2 -0
- data/vendor/node_modules/debug/lib/debug.js +129 -0
- data/vendor/node_modules/debug/package.json +11 -0
- data/vendor/node_modules/growl/History.md +21 -0
- data/vendor/node_modules/growl/Readme.md +29 -20
- data/vendor/node_modules/growl/lib/growl.js +113 -36
- data/vendor/node_modules/growl/package.json +1 -1
- data/vendor/node_modules/growl/test.js +12 -13
- data/vendor/node_modules/mkdirp/README.markdown +35 -2
- data/vendor/node_modules/mkdirp/examples/pow.js +1 -1
- data/vendor/node_modules/mkdirp/index.js +72 -13
- data/vendor/node_modules/mkdirp/package.json +2 -2
- data/vendor/node_modules/mkdirp/test/chmod.js +38 -0
- data/vendor/node_modules/mkdirp/test/clobber.js +37 -0
- data/vendor/node_modules/mkdirp/test/perm.js +32 -0
- data/vendor/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/vendor/node_modules/mkdirp/test/sync.js +27 -0
- data/vendor/node_modules/mkdirp/test/umask.js +28 -0
- data/vendor/node_modules/mkdirp/test/umask_sync.js +27 -0
- data/vendor/package.json +6 -5
- data/vendor/testing/test.css +39 -0
- data/vendor/testing/test.html +21 -0
- data/vendor/testing/test.js +5 -3
- data/vendor/testing/test.styl +42 -2
- metadata +23 -542
- data/vendor/History.md +0 -672
- data/vendor/Makefile +0 -20
- data/vendor/Readme.md +0 -155
- data/vendor/docs/bifs.md +0 -598
- data/vendor/docs/comments.md +0 -35
- data/vendor/docs/compare.md +0 -81
- data/vendor/docs/conditionals.md +0 -107
- data/vendor/docs/css-style.md +0 -77
- data/vendor/docs/error-reporting.md +0 -50
- data/vendor/docs/escape.md +0 -28
- data/vendor/docs/executable.md +0 -163
- data/vendor/docs/extend.md +0 -123
- data/vendor/docs/firebug.md +0 -59
- data/vendor/docs/font-face.md +0 -26
- data/vendor/docs/functions.md +0 -197
- data/vendor/docs/functions.url.md +0 -32
- data/vendor/docs/gedit.md +0 -24
- data/vendor/docs/import.md +0 -75
- data/vendor/docs/interpolation.md +0 -55
- data/vendor/docs/introspection.md +0 -38
- data/vendor/docs/iteration.md +0 -102
- data/vendor/docs/js.md +0 -157
- data/vendor/docs/keyframes.md +0 -122
- data/vendor/docs/kwargs.md +0 -34
- data/vendor/docs/literal.md +0 -16
- data/vendor/docs/media.md +0 -18
- data/vendor/docs/middleware.md +0 -72
- data/vendor/docs/mixins.md +0 -138
- data/vendor/docs/operators.md +0 -470
- data/vendor/docs/selectors.md +0 -133
- data/vendor/docs/textmate.md +0 -4
- data/vendor/docs/vargs.md +0 -84
- data/vendor/docs/variables.md +0 -85
- data/vendor/editors/Stylus.tmbundle/Commands/Compile and Display CSS.tmCommand +0 -33
- data/vendor/editors/Stylus.tmbundle/Preferences/Comments.tmPreferences +0 -36
- data/vendor/editors/Stylus.tmbundle/Syntaxes/Stylus.tmLanguage +0 -228
- data/vendor/editors/Stylus.tmbundle/info.plist +0 -10
- data/vendor/editors/gedit/styl.lang +0 -475
- data/vendor/examples/arithmetic.js +0 -12
- data/vendor/examples/arithmetic.styl +0 -29
- data/vendor/examples/basic.js +0 -12
- data/vendor/examples/basic.styl +0 -8
- data/vendor/examples/builtins.js +0 -12
- data/vendor/examples/builtins.styl +0 -56
- data/vendor/examples/comments.js +0 -11
- data/vendor/examples/comments.styl +0 -15
- data/vendor/examples/compress.js +0 -12
- data/vendor/examples/conversions.js +0 -12
- data/vendor/examples/conversions.styl +0 -34
- data/vendor/examples/functions.js +0 -12
- data/vendor/examples/functions.styl +0 -30
- data/vendor/examples/gradients.js +0 -13
- data/vendor/examples/gradients.styl +0 -8
- data/vendor/examples/images/gopher.jpg +0 -0
- data/vendor/examples/images/gradient.svg +0 -9
- data/vendor/examples/images/jesus.gif +0 -0
- data/vendor/examples/images/sprite.gif +0 -0
- data/vendor/examples/images.js +0 -20
- data/vendor/examples/images.styl +0 -15
- data/vendor/examples/implicit-functions.js +0 -12
- data/vendor/examples/implicit-functions.styl +0 -23
- data/vendor/examples/import.js +0 -12
- data/vendor/examples/import.styl +0 -11
- data/vendor/examples/js-functions.js +0 -55
- data/vendor/examples/js-functions.styl +0 -23
- data/vendor/examples/literal.js +0 -12
- data/vendor/examples/literal.styl +0 -8
- data/vendor/examples/middleware.js +0 -23
- data/vendor/examples/mixins/box.styl +0 -14
- data/vendor/examples/mixins/gradients.styl +0 -92
- data/vendor/examples/nesting.js +0 -12
- data/vendor/examples/nesting.styl +0 -14
- data/vendor/examples/variables.js +0 -12
- data/vendor/examples/variables.styl +0 -24
- data/vendor/node_modules/cssom/Jakefile +0 -37
- data/vendor/node_modules/cssom/MIT-LICENSE.txt +0 -20
- data/vendor/node_modules/cssom/README.mdown +0 -34
- data/vendor/node_modules/cssom/Rakefile +0 -23
- data/vendor/node_modules/cssom/animation.html +0 -27
- data/vendor/node_modules/cssom/bench.html +0 -47
- data/vendor/node_modules/cssom/comments.js +0 -63
- data/vendor/node_modules/cssom/docs/bar.css +0 -3
- data/vendor/node_modules/cssom/docs/col_table.html +0 -15
- data/vendor/node_modules/cssom/docs/cols.html +0 -14
- data/vendor/node_modules/cssom/docs/cols_inline-blocks.html +0 -33
- data/vendor/node_modules/cssom/docs/demo.css +0 -0
- data/vendor/node_modules/cssom/docs/diff.html +0 -132
- data/vendor/node_modules/cssom/docs/foo.css +0 -4
- data/vendor/node_modules/cssom/docs/parse.html +0 -282
- data/vendor/node_modules/cssom/docs/parse.html_ +0 -268
- data/vendor/node_modules/cssom/docs/parse2.html +0 -518
- data/vendor/node_modules/cssom/docs/parser.html +0 -31
- data/vendor/node_modules/cssom/index.html +0 -100
- data/vendor/node_modules/cssom/lib/CSSOM.js +0 -3
- data/vendor/node_modules/cssom/lib/Parser.js +0 -362
- data/vendor/node_modules/cssom/media.html +0 -17
- data/vendor/node_modules/cssom/plugins/toHTML.js +0 -32
- data/vendor/node_modules/cssom/server/index.html +0 -22
- data/vendor/node_modules/cssom/server/index.js +0 -21
- data/vendor/node_modules/cssom/shorthands.html +0 -21
- data/vendor/node_modules/cssom/strings.html +0 -10
- data/vendor/node_modules/cssom/test/CSSImportRule.test.js +0 -52
- data/vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js +0 -42
- data/vendor/node_modules/cssom/test/CSSStyleRule.test.js +0 -12
- data/vendor/node_modules/cssom/test/CSSStyleSheet.test.js +0 -16
- data/vendor/node_modules/cssom/test/MediaList.test.js +0 -21
- data/vendor/node_modules/cssom/test/_helper.js +0 -122
- data/vendor/node_modules/cssom/test/clone.test.js +0 -38
- data/vendor/node_modules/cssom/test/fixtures/dummy.css +0 -3
- data/vendor/node_modules/cssom/test/helper.js +0 -122
- data/vendor/node_modules/cssom/test/index.html +0 -45
- data/vendor/node_modules/cssom/test/parse.test.js +0 -718
- data/vendor/node_modules/cssom/test/vendor/qunit.css +0 -189
- data/vendor/node_modules/cssom/test/vendor/qunit.js +0 -1415
- data/vendor/test/cases/arithmetic.color.css +0 -44
- data/vendor/test/cases/arithmetic.color.styl +0 -48
- data/vendor/test/cases/arithmetic.css +0 -23
- data/vendor/test/cases/arithmetic.styl +0 -30
- data/vendor/test/cases/arithmetic.unary.css +0 -16
- data/vendor/test/cases/arithmetic.unary.styl +0 -16
- data/vendor/test/cases/atscope.css +0 -21
- data/vendor/test/cases/atscope.styl +0 -23
- data/vendor/test/cases/bifs.add-property.css +0 -21
- data/vendor/test/cases/bifs.add-property.styl +0 -48
- data/vendor/test/cases/bifs.components.css +0 -9
- data/vendor/test/cases/bifs.components.styl +0 -9
- data/vendor/test/cases/bifs.dark.css +0 -5
- data/vendor/test/cases/bifs.dark.styl +0 -4
- data/vendor/test/cases/bifs.darken.css +0 -8
- data/vendor/test/cases/bifs.darken.styl +0 -9
- data/vendor/test/cases/bifs.fade.css +0 -6
- data/vendor/test/cases/bifs.fade.styl +0 -6
- data/vendor/test/cases/bifs.image-size.css +0 -9
- data/vendor/test/cases/bifs.image-size.styl +0 -16
- data/vendor/test/cases/bifs.join.css +0 -18
- data/vendor/test/cases/bifs.join.styl +0 -21
- data/vendor/test/cases/bifs.keys.css +0 -4
- data/vendor/test/cases/bifs.keys.styl +0 -6
- data/vendor/test/cases/bifs.last.css +0 -5
- data/vendor/test/cases/bifs.last.styl +0 -6
- data/vendor/test/cases/bifs.length.css +0 -10
- data/vendor/test/cases/bifs.length.styl +0 -18
- data/vendor/test/cases/bifs.light.css +0 -5
- data/vendor/test/cases/bifs.light.styl +0 -4
- data/vendor/test/cases/bifs.lighten.css +0 -14
- data/vendor/test/cases/bifs.lighten.styl +0 -14
- data/vendor/test/cases/bifs.lookup.css +0 -3
- data/vendor/test/cases/bifs.lookup.styl +0 -8
- data/vendor/test/cases/bifs.match.css +0 -4
- data/vendor/test/cases/bifs.match.styl +0 -9
- data/vendor/test/cases/bifs.opposite-position.css +0 -8
- data/vendor/test/cases/bifs.opposite-position.styl +0 -9
- data/vendor/test/cases/bifs.push.css +0 -25
- data/vendor/test/cases/bifs.push.styl +0 -48
- data/vendor/test/cases/bifs.rgba.css +0 -5
- data/vendor/test/cases/bifs.rgba.styl +0 -4
- data/vendor/test/cases/bifs.s.css +0 -11
- data/vendor/test/cases/bifs.s.styl +0 -12
- data/vendor/test/cases/bifs.type.css +0 -11
- data/vendor/test/cases/bifs.type.styl +0 -12
- data/vendor/test/cases/bifs.unit.css +0 -6
- data/vendor/test/cases/bifs.unit.styl +0 -5
- data/vendor/test/cases/bifs.unquote.css +0 -5
- data/vendor/test/cases/bifs.unquote.styl +0 -8
- data/vendor/test/cases/bifs.url.css +0 -11
- data/vendor/test/cases/bifs.url.styl +0 -15
- data/vendor/test/cases/bifs.values.css +0 -5
- data/vendor/test/cases/bifs.values.styl +0 -6
- data/vendor/test/cases/casting.css +0 -12
- data/vendor/test/cases/casting.styl +0 -14
- data/vendor/test/cases/coercion.css +0 -6
- data/vendor/test/cases/coercion.styl +0 -5
- data/vendor/test/cases/comments.css +0 -18
- data/vendor/test/cases/comments.styl +0 -28
- data/vendor/test/cases/compress.comments.css +0 -2
- data/vendor/test/cases/compress.comments.styl +0 -5
- data/vendor/test/cases/compress.units.css +0 -2
- data/vendor/test/cases/compress.units.styl +0 -18
- data/vendor/test/cases/conditional-assignment.css +0 -4
- data/vendor/test/cases/conditional-assignment.styl +0 -9
- data/vendor/test/cases/control.blueprint.ie.css +0 -126
- data/vendor/test/cases/control.blueprint.ie.styl +0 -36
- data/vendor/test/cases/control.blueprint.screen.css +0 -1103
- data/vendor/test/cases/control.blueprint.screen.styl +0 -265
- data/vendor/test/cases/control.boilerplate.css +0 -473
- data/vendor/test/cases/control.boilerplate.styl +0 -265
- data/vendor/test/cases/css.extend.css +0 -13
- data/vendor/test/cases/css.extend.styl +0 -15
- data/vendor/test/cases/css.functions.single-line.css +0 -9
- data/vendor/test/cases/css.functions.single-line.styl +0 -13
- data/vendor/test/cases/css.if.css +0 -8
- data/vendor/test/cases/css.if.styl +0 -21
- data/vendor/test/cases/css.keyframes.css +0 -57
- data/vendor/test/cases/css.keyframes.styl +0 -48
- data/vendor/test/cases/css.large.css +0 -172
- data/vendor/test/cases/css.large.styl +0 -172
- data/vendor/test/cases/css.media.css +0 -15
- data/vendor/test/cases/css.media.styl +0 -17
- data/vendor/test/cases/css.mixins.braces.css +0 -38
- data/vendor/test/cases/css.mixins.braces.styl +0 -53
- data/vendor/test/cases/css.mixins.css +0 -38
- data/vendor/test/cases/css.mixins.root.css +0 -26
- data/vendor/test/cases/css.mixins.root.styl +0 -25
- data/vendor/test/cases/css.mixins.root.wonky.css +0 -26
- data/vendor/test/cases/css.mixins.root.wonky.styl +0 -17
- data/vendor/test/cases/css.mixins.styl +0 -47
- data/vendor/test/cases/css.selector.interpolation.css +0 -91
- data/vendor/test/cases/css.selector.interpolation.styl +0 -90
- data/vendor/test/cases/css.selectors.css +0 -38
- data/vendor/test/cases/css.selectors.styl +0 -53
- data/vendor/test/cases/css.whitespace.css +0 -37
- data/vendor/test/cases/css.whitespace.styl +0 -38
- data/vendor/test/cases/dumb.css +0 -10
- data/vendor/test/cases/dumb.styl +0 -11
- data/vendor/test/cases/eol-escape.css +0 -11
- data/vendor/test/cases/eol-escape.styl +0 -27
- data/vendor/test/cases/escape.css +0 -4
- data/vendor/test/cases/escape.styl +0 -4
- data/vendor/test/cases/extend.complex.css +0 -16
- data/vendor/test/cases/extend.complex.styl +0 -15
- data/vendor/test/cases/extend.css +0 -22
- data/vendor/test/cases/extend.multiple-definitions.css +0 -11
- data/vendor/test/cases/extend.multiple-definitions.styl +0 -9
- data/vendor/test/cases/extend.styl +0 -22
- data/vendor/test/cases/fontface.css +0 -4
- data/vendor/test/cases/fontface.styl +0 -5
- data/vendor/test/cases/for.complex.css +0 -44
- data/vendor/test/cases/for.complex.styl +0 -28
- data/vendor/test/cases/for.css +0 -52
- data/vendor/test/cases/for.function.css +0 -20
- data/vendor/test/cases/for.function.styl +0 -51
- data/vendor/test/cases/for.styl +0 -44
- data/vendor/test/cases/function.arguments.css +0 -4
- data/vendor/test/cases/function.arguments.styl +0 -14
- data/vendor/test/cases/function.literals.css +0 -6
- data/vendor/test/cases/function.literals.styl +0 -12
- data/vendor/test/cases/functions.arg-calls.css +0 -3
- data/vendor/test/cases/functions.arg-calls.styl +0 -9
- data/vendor/test/cases/functions.call.css +0 -4
- data/vendor/test/cases/functions.call.styl +0 -7
- data/vendor/test/cases/functions.css +0 -11
- data/vendor/test/cases/functions.defaults.css +0 -15
- data/vendor/test/cases/functions.defaults.styl +0 -30
- data/vendor/test/cases/functions.multi-line.css +0 -9
- data/vendor/test/cases/functions.multi-line.styl +0 -25
- data/vendor/test/cases/functions.multiple-calls.css +0 -13
- data/vendor/test/cases/functions.multiple-calls.styl +0 -26
- data/vendor/test/cases/functions.nested-calls.css +0 -3
- data/vendor/test/cases/functions.nested-calls.styl +0 -9
- data/vendor/test/cases/functions.nested.css +0 -10
- data/vendor/test/cases/functions.nested.styl +0 -37
- data/vendor/test/cases/functions.property.css +0 -10
- data/vendor/test/cases/functions.property.styl +0 -11
- data/vendor/test/cases/functions.return.css +0 -15
- data/vendor/test/cases/functions.return.each.css +0 -10
- data/vendor/test/cases/functions.return.each.styl +0 -23
- data/vendor/test/cases/functions.return.styl +0 -86
- data/vendor/test/cases/functions.styl +0 -34
- data/vendor/test/cases/functions.variable.css +0 -9
- data/vendor/test/cases/functions.variable.ident.css +0 -3
- data/vendor/test/cases/functions.variable.ident.styl +0 -11
- data/vendor/test/cases/functions.variable.styl +0 -27
- data/vendor/test/cases/hack.star.css +0 -27
- data/vendor/test/cases/hack.star.styl +0 -37
- data/vendor/test/cases/if.css +0 -43
- data/vendor/test/cases/if.else.css +0 -6
- data/vendor/test/cases/if.else.styl +0 -16
- data/vendor/test/cases/if.mixin.css +0 -7
- data/vendor/test/cases/if.mixin.styl +0 -24
- data/vendor/test/cases/if.postfix.css +0 -61
- data/vendor/test/cases/if.postfix.styl +0 -110
- data/vendor/test/cases/if.selectors.css +0 -16
- data/vendor/test/cases/if.selectors.styl +0 -22
- data/vendor/test/cases/if.styl +0 -99
- data/vendor/test/cases/import.basic/a.styl +0 -5
- data/vendor/test/cases/import.basic/b.styl +0 -5
- data/vendor/test/cases/import.basic/c.styl +0 -3
- data/vendor/test/cases/import.basic.css +0 -11
- data/vendor/test/cases/import.basic.styl +0 -4
- data/vendor/test/cases/import.complex/a.styl +0 -4
- data/vendor/test/cases/import.complex/c.styl +0 -2
- data/vendor/test/cases/import.complex/nested/b.styl +0 -4
- data/vendor/test/cases/import.complex.css +0 -9
- data/vendor/test/cases/import.complex.styl +0 -1
- data/vendor/test/cases/import.index/vendor/a.styl +0 -2
- data/vendor/test/cases/import.index/vendor/b.styl +0 -2
- data/vendor/test/cases/import.index/vendor/c.styl +0 -2
- data/vendor/test/cases/import.index/vendor/index.styl +0 -4
- data/vendor/test/cases/import.index.css +0 -9
- data/vendor/test/cases/import.index.styl +0 -2
- data/vendor/test/cases/import.literal.css +0 -2
- data/vendor/test/cases/import.literal.styl +0 -3
- data/vendor/test/cases/import.mixins.css +0 -7
- data/vendor/test/cases/import.mixins.styl +0 -9
- data/vendor/test/cases/import.ordering/five.styl +0 -2
- data/vendor/test/cases/import.ordering/four.styl +0 -4
- data/vendor/test/cases/import.ordering/two.styl +0 -2
- data/vendor/test/cases/import.ordering.css +0 -15
- data/vendor/test/cases/import.ordering.styl +0 -12
- data/vendor/test/cases/important.css +0 -6
- data/vendor/test/cases/important.styl +0 -6
- data/vendor/test/cases/interpolation.properties.css +0 -40
- data/vendor/test/cases/interpolation.properties.styl +0 -56
- data/vendor/test/cases/introspection.css +0 -7
- data/vendor/test/cases/introspection.styl +0 -14
- data/vendor/test/cases/jquery.css +0 -3
- data/vendor/test/cases/jquery.styl +0 -5
- data/vendor/test/cases/keyframes.css +0 -9
- data/vendor/test/cases/keyframes.fabrication.css +0 -18
- data/vendor/test/cases/keyframes.fabrication.defaults.css +0 -45
- data/vendor/test/cases/keyframes.fabrication.defaults.styl +0 -9
- data/vendor/test/cases/keyframes.fabrication.styl +0 -11
- data/vendor/test/cases/keyframes.newlines.css +0 -45
- data/vendor/test/cases/keyframes.newlines.styl +0 -7
- data/vendor/test/cases/keyframes.styl +0 -6
- data/vendor/test/cases/kwargs.css +0 -63
- data/vendor/test/cases/kwargs.styl +0 -74
- data/vendor/test/cases/list.css +0 -3
- data/vendor/test/cases/list.styl +0 -3
- data/vendor/test/cases/literal.color.css +0 -10
- data/vendor/test/cases/literal.color.styl +0 -9
- data/vendor/test/cases/literal.css +0 -10
- data/vendor/test/cases/literal.styl +0 -18
- data/vendor/test/cases/media.css +0 -14
- data/vendor/test/cases/media.styl +0 -11
- data/vendor/test/cases/mixin.conditional.css +0 -19
- data/vendor/test/cases/mixin.conditional.styl +0 -36
- data/vendor/test/cases/mixin.order.conditional.css +0 -11
- data/vendor/test/cases/mixin.order.conditional.styl +0 -20
- data/vendor/test/cases/mixin.order.css +0 -9
- data/vendor/test/cases/mixin.order.nested.css +0 -9
- data/vendor/test/cases/mixin.order.nested.styl +0 -21
- data/vendor/test/cases/mixin.order.styl +0 -20
- data/vendor/test/cases/mixins/box.styl +0 -11
- data/vendor/test/cases/mixins.complex.css +0 -30
- data/vendor/test/cases/mixins.complex.fix-to.css +0 -15
- data/vendor/test/cases/mixins.complex.fix-to.styl +0 -28
- data/vendor/test/cases/mixins.complex.styl +0 -41
- data/vendor/test/cases/mixins.conditional.css +0 -3
- data/vendor/test/cases/mixins.conditional.styl +0 -8
- data/vendor/test/cases/mixins.nested.css +0 -7
- data/vendor/test/cases/mixins.nested.selectors.css +0 -21
- data/vendor/test/cases/mixins.nested.selectors.styl +0 -31
- data/vendor/test/cases/mixins.nested.styl +0 -14
- data/vendor/test/cases/mixins.order.2.css +0 -11
- data/vendor/test/cases/mixins.order.2.styl +0 -16
- data/vendor/test/cases/mixins.reset.css +0 -75
- data/vendor/test/cases/mixins.reset.styl +0 -27
- data/vendor/test/cases/mixins.return.css +0 -4
- data/vendor/test/cases/mixins.return.styl +0 -8
- data/vendor/test/cases/mixins.root.css +0 -3
- data/vendor/test/cases/mixins.root.styl +0 -5
- data/vendor/test/cases/operator.range.css +0 -15
- data/vendor/test/cases/operator.range.styl +0 -23
- data/vendor/test/cases/operators.assignment.function.css +0 -15
- data/vendor/test/cases/operators.assignment.function.styl +0 -34
- data/vendor/test/cases/operators.assignment.mixin.css +0 -15
- data/vendor/test/cases/operators.assignment.mixin.styl +0 -39
- data/vendor/test/cases/operators.assignment.root.css +0 -25
- data/vendor/test/cases/operators.assignment.root.styl +0 -55
- data/vendor/test/cases/operators.complex.css +0 -9
- data/vendor/test/cases/operators.complex.styl +0 -32
- data/vendor/test/cases/operators.css +0 -40
- data/vendor/test/cases/operators.equality.css +0 -55
- data/vendor/test/cases/operators.equality.styl +0 -55
- data/vendor/test/cases/operators.in.css +0 -37
- data/vendor/test/cases/operators.in.styl +0 -51
- data/vendor/test/cases/operators.mixins.css +0 -10
- data/vendor/test/cases/operators.mixins.styl +0 -25
- data/vendor/test/cases/operators.precedence.css +0 -51
- data/vendor/test/cases/operators.precedence.styl +0 -82
- data/vendor/test/cases/operators.styl +0 -96
- data/vendor/test/cases/operators.subscript.assign.css +0 -21
- data/vendor/test/cases/operators.subscript.assign.styl +0 -45
- data/vendor/test/cases/operators.subscript.css +0 -59
- data/vendor/test/cases/operators.subscript.range.css +0 -14
- data/vendor/test/cases/operators.subscript.range.styl +0 -15
- data/vendor/test/cases/operators.subscript.styl +0 -81
- data/vendor/test/cases/page.css +0 -16
- data/vendor/test/cases/page.styl +0 -17
- data/vendor/test/cases/parent.css +0 -32
- data/vendor/test/cases/parent.styl +0 -33
- data/vendor/test/cases/properties.colons.css +0 -8
- data/vendor/test/cases/properties.colons.styl +0 -10
- data/vendor/test/cases/properties.css +0 -4
- data/vendor/test/cases/properties.one-line.css +0 -10
- data/vendor/test/cases/properties.one-line.styl +0 -11
- data/vendor/test/cases/properties.styl +0 -4
- data/vendor/test/cases/property-access.bubble.css +0 -38
- data/vendor/test/cases/property-access.bubble.styl +0 -46
- data/vendor/test/cases/property-access.css +0 -48
- data/vendor/test/cases/property-access.siblings.css +0 -19
- data/vendor/test/cases/property-access.siblings.styl +0 -20
- data/vendor/test/cases/property-access.styl +0 -62
- data/vendor/test/cases/regression.107.lookup-failure.css +0 -12
- data/vendor/test/cases/regression.107.lookup-failure.styl +0 -13
- data/vendor/test/cases/regression.127.css +0 -3
- data/vendor/test/cases/regression.127.styl +0 -2
- data/vendor/test/cases/regression.130.css +0 -16
- data/vendor/test/cases/regression.130.styl +0 -6
- data/vendor/test/cases/regression.131.css +0 -7
- data/vendor/test/cases/regression.131.styl +0 -2
- data/vendor/test/cases/regression.137.css +0 -7
- data/vendor/test/cases/regression.137.styl +0 -7
- data/vendor/test/cases/regression.139.css +0 -5
- data/vendor/test/cases/regression.139.styl +0 -21
- data/vendor/test/cases/regression.142.css +0 -39
- data/vendor/test/cases/regression.142.styl +0 -54
- data/vendor/test/cases/regression.146.css +0 -30
- data/vendor/test/cases/regression.146.styl +0 -31
- data/vendor/test/cases/regression.153.css +0 -8
- data/vendor/test/cases/regression.153.styl +0 -9
- data/vendor/test/cases/regression.154.css +0 -8
- data/vendor/test/cases/regression.154.styl +0 -14
- data/vendor/test/cases/regression.156.css +0 -4
- data/vendor/test/cases/regression.156.styl +0 -6
- data/vendor/test/cases/regression.212.css +0 -15
- data/vendor/test/cases/regression.212.styl +0 -14
- data/vendor/test/cases/regression.216.css +0 -10
- data/vendor/test/cases/regression.216.styl +0 -8
- data/vendor/test/cases/regression.220.css +0 -5
- data/vendor/test/cases/regression.220.styl +0 -5
- data/vendor/test/cases/regression.229.css +0 -12
- data/vendor/test/cases/regression.229.styl +0 -9
- data/vendor/test/cases/regression.233.css +0 -6
- data/vendor/test/cases/regression.233.styl +0 -7
- data/vendor/test/cases/regression.235.css +0 -11
- data/vendor/test/cases/regression.235.styl +0 -13
- data/vendor/test/cases/regression.243.css +0 -3
- data/vendor/test/cases/regression.243.styl +0 -4
- data/vendor/test/cases/regression.244.css +0 -3
- data/vendor/test/cases/regression.244.styl +0 -3
- data/vendor/test/cases/regression.247.css +0 -6
- data/vendor/test/cases/regression.247.styl +0 -6
- data/vendor/test/cases/regression.248.compressed.css +0 -4
- data/vendor/test/cases/regression.248.compressed.styl +0 -10
- data/vendor/test/cases/regression.252.css +0 -13
- data/vendor/test/cases/regression.252.styl +0 -13
- data/vendor/test/cases/regression.260.css +0 -6
- data/vendor/test/cases/regression.260.styl +0 -6
- data/vendor/test/cases/regression.267.css +0 -3
- data/vendor/test/cases/regression.267.styl +0 -3
- data/vendor/test/cases/regression.270.css +0 -5
- data/vendor/test/cases/regression.270.styl +0 -7
- data/vendor/test/cases/regression.272.css +0 -11
- data/vendor/test/cases/regression.272.styl +0 -17
- data/vendor/test/cases/regression.274.css +0 -14
- data/vendor/test/cases/regression.274.styl +0 -16
- data/vendor/test/cases/regression.292.css +0 -3
- data/vendor/test/cases/regression.292.styl +0 -3
- data/vendor/test/cases/regression.360.css +0 -19
- data/vendor/test/cases/regression.360.styl +0 -1
- data/vendor/test/cases/regression.368.css +0 -4
- data/vendor/test/cases/regression.368.styl +0 -3
- data/vendor/test/cases/regression.379.css +0 -6
- data/vendor/test/cases/regression.379.styl +0 -10
- data/vendor/test/cases/regression.380.css +0 -8
- data/vendor/test/cases/regression.380.styl +0 -14
- data/vendor/test/cases/regression.388.css +0 -2
- data/vendor/test/cases/regression.388.styl +0 -6
- data/vendor/test/cases/regression.415.css +0 -5
- data/vendor/test/cases/regression.415.styl +0 -3
- data/vendor/test/cases/regression.420.css +0 -21
- data/vendor/test/cases/regression.420.styl +0 -29
- data/vendor/test/cases/regression.432.css +0 -5
- data/vendor/test/cases/regression.432.styl +0 -4
- data/vendor/test/cases/regression.440.css +0 -5
- data/vendor/test/cases/regression.440.styl +0 -7
- data/vendor/test/cases/regression.449.css +0 -9
- data/vendor/test/cases/regression.449.styl +0 -10
- data/vendor/test/cases/regression.458.css +0 -3
- data/vendor/test/cases/regression.458.styl +0 -3
- data/vendor/test/cases/regression.460.css +0 -13
- data/vendor/test/cases/regression.460.styl +0 -18
- data/vendor/test/cases/regression.469.css +0 -4
- data/vendor/test/cases/regression.469.styl +0 -6
- data/vendor/test/cases/regression.472.css +0 -10
- data/vendor/test/cases/regression.472.styl +0 -23
- data/vendor/test/cases/regression.475.css +0 -6
- data/vendor/test/cases/regression.475.styl +0 -7
- data/vendor/test/cases/regression.480.css +0 -9
- data/vendor/test/cases/regression.480.styl +0 -12
- data/vendor/test/cases/regression.484.css +0 -9
- data/vendor/test/cases/regression.484.styl +0 -8
- data/vendor/test/cases/regression.498.css +0 -8
- data/vendor/test/cases/regression.498.styl +0 -11
- data/vendor/test/cases/regression.499.css +0 -14
- data/vendor/test/cases/regression.499.styl +0 -20
- data/vendor/test/cases/regression.503.css +0 -65
- data/vendor/test/cases/regression.503.styl +0 -7
- data/vendor/test/cases/regression.504.css +0 -65
- data/vendor/test/cases/regression.504.styl +0 -12
- data/vendor/test/cases/regression.524.css +0 -4
- data/vendor/test/cases/regression.524.styl +0 -7
- data/vendor/test/cases/regression.535.css +0 -3
- data/vendor/test/cases/regression.535.styl +0 -9
- data/vendor/test/cases/regression.536.css +0 -3
- data/vendor/test/cases/regression.536.styl +0 -5
- data/vendor/test/cases/reset.css +0 -70
- data/vendor/test/cases/reset.styl +0 -16
- data/vendor/test/cases/rule.charset.css +0 -1
- data/vendor/test/cases/rule.charset.styl +0 -2
- data/vendor/test/cases/rulset.css +0 -4
- data/vendor/test/cases/rulset.newline.css +0 -5
- data/vendor/test/cases/rulset.newline.styl +0 -5
- data/vendor/test/cases/rulset.styl +0 -3
- data/vendor/test/cases/scope.complex.css +0 -10
- data/vendor/test/cases/scope.complex.styl +0 -16
- data/vendor/test/cases/scope.css +0 -5
- data/vendor/test/cases/scope.nested.css +0 -9
- data/vendor/test/cases/scope.nested.styl +0 -10
- data/vendor/test/cases/scope.styl +0 -12
- data/vendor/test/cases/selector.interpolation.css +0 -57
- data/vendor/test/cases/selector.interpolation.styl +0 -45
- data/vendor/test/cases/selectors.complex.css +0 -28
- data/vendor/test/cases/selectors.complex.styl +0 -27
- data/vendor/test/cases/selectors.css +0 -50
- data/vendor/test/cases/selectors.nested.comma.css +0 -9
- data/vendor/test/cases/selectors.nested.comma.styl +0 -8
- data/vendor/test/cases/selectors.nested.css +0 -34
- data/vendor/test/cases/selectors.nested.styl +0 -33
- data/vendor/test/cases/selectors.pseudo.css +0 -27
- data/vendor/test/cases/selectors.pseudo.elements.css +0 -26
- data/vendor/test/cases/selectors.pseudo.elements.styl +0 -29
- data/vendor/test/cases/selectors.pseudo.styl +0 -24
- data/vendor/test/cases/selectors.styl +0 -46
- data/vendor/test/cases/self-assignment.css +0 -3
- data/vendor/test/cases/self-assignment.styl +0 -4
- data/vendor/test/cases/vargs.call.css +0 -24
- data/vendor/test/cases/vargs.call.styl +0 -40
- data/vendor/test/cases/vargs.css +0 -30
- data/vendor/test/cases/vargs.styl +0 -49
- data/vendor/test/cases/variable.css +0 -3
- data/vendor/test/cases/variable.styl +0 -4
- data/vendor/test/cases/variables.css +0 -12
- data/vendor/test/cases/variables.styl +0 -17
- data/vendor/test/images/gif +0 -0
- data/vendor/test/images/squirrel.jpeg +0 -0
- data/vendor/test/images/tux.png +0 -0
- data/vendor/test/run.js +0 -169
@@ -0,0 +1,129 @@
|
|
1
|
+
|
2
|
+
/*!
|
3
|
+
* debug
|
4
|
+
* Copyright(c) 2012 TJ Holowaychuk <tj@vision-media.ca>
|
5
|
+
* MIT Licensed
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Module dependencies.
|
10
|
+
*/
|
11
|
+
|
12
|
+
var tty = require('tty');
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Expose `debug()` as the module.
|
16
|
+
*/
|
17
|
+
|
18
|
+
module.exports = debug;
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Library version.
|
22
|
+
*/
|
23
|
+
|
24
|
+
exports.version = '0.5.0';
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Enabled debuggers.
|
28
|
+
*/
|
29
|
+
|
30
|
+
var names = (process.env.DEBUG || '')
|
31
|
+
.split(/[\s,]+/)
|
32
|
+
.map(function(name){
|
33
|
+
name = name.replace('*', '.*?');
|
34
|
+
return new RegExp('^' + name + '$');
|
35
|
+
});
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Colors.
|
39
|
+
*/
|
40
|
+
|
41
|
+
var colors = [6, 2, 3, 4, 5, 1];
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Previous debug() call.
|
45
|
+
*/
|
46
|
+
|
47
|
+
var prev = {};
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Previously assigned color.
|
51
|
+
*/
|
52
|
+
|
53
|
+
var prevColor = 0;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Is stdout a TTY? Colored output is disabled when `true`.
|
57
|
+
*/
|
58
|
+
|
59
|
+
var isatty = tty.isatty(2);
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Select a color.
|
63
|
+
*
|
64
|
+
* @return {Number}
|
65
|
+
* @api private
|
66
|
+
*/
|
67
|
+
|
68
|
+
function color() {
|
69
|
+
return colors[prevColor++ % colors.length];
|
70
|
+
}
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Humanize the given `ms`.
|
74
|
+
*
|
75
|
+
* @param {Number} m
|
76
|
+
* @return {String}
|
77
|
+
* @api private
|
78
|
+
*/
|
79
|
+
|
80
|
+
function humanize(ms) {
|
81
|
+
var sec = 1000
|
82
|
+
, min = 60 * 1000
|
83
|
+
, hour = 60 * min;
|
84
|
+
|
85
|
+
if (ms >= hour) return (ms / hour).toFixed(1) + 'h';
|
86
|
+
if (ms >= min) return (ms / min).toFixed(1) + 'm';
|
87
|
+
if (ms >= sec) return (ms / sec | 0) + 's';
|
88
|
+
return ms + 'ms';
|
89
|
+
}
|
90
|
+
|
91
|
+
/**
|
92
|
+
* Create a debugger with the given `name`.
|
93
|
+
*
|
94
|
+
* @param {String} name
|
95
|
+
* @return {Type}
|
96
|
+
* @api public
|
97
|
+
*/
|
98
|
+
|
99
|
+
function debug(name) {
|
100
|
+
var match = names.some(function(re){
|
101
|
+
return re.test(name);
|
102
|
+
});
|
103
|
+
|
104
|
+
if (!match) return function(){};
|
105
|
+
var c = color();
|
106
|
+
|
107
|
+
function colored(fmt) {
|
108
|
+
var curr = new Date;
|
109
|
+
var ms = curr - (prev[name] || curr);
|
110
|
+
prev[name] = curr;
|
111
|
+
|
112
|
+
fmt = ' \033[9' + c + 'm' + name + ' '
|
113
|
+
+ '\033[3' + c + 'm\033[90m'
|
114
|
+
+ fmt + '\033[3' + c + 'm'
|
115
|
+
+ ' +' + humanize(ms) + '\033[0m';
|
116
|
+
|
117
|
+
console.error.apply(this, arguments);
|
118
|
+
}
|
119
|
+
|
120
|
+
function plain(fmt) {
|
121
|
+
fmt = new Date().toUTCString()
|
122
|
+
+ ' ' + name + ' ' + fmt;
|
123
|
+
console.error.apply(this, arguments);
|
124
|
+
}
|
125
|
+
|
126
|
+
return isatty
|
127
|
+
? colored
|
128
|
+
: plain;
|
129
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"name": "debug"
|
3
|
+
, "version": "0.5.0"
|
4
|
+
, "description": "small debugging utility"
|
5
|
+
, "keywords": ["debug", "log", "debugger"]
|
6
|
+
, "author": "TJ Holowaychuk <tj@vision-media.ca>"
|
7
|
+
, "dependencies": {}
|
8
|
+
, "devDependencies": { "mocha": "*" }
|
9
|
+
, "main": "index"
|
10
|
+
, "engines": { "node": "*" }
|
11
|
+
}
|
@@ -1,4 +1,25 @@
|
|
1
1
|
|
2
|
+
1.4.1 / 2011-12-28
|
3
|
+
==================
|
4
|
+
|
5
|
+
* Fixed: dont exit(). Closes #9
|
6
|
+
|
7
|
+
1.4.0 / 2011-12-17
|
8
|
+
==================
|
9
|
+
|
10
|
+
* Changed API: `growl.notify()` -> `growl()`
|
11
|
+
|
12
|
+
1.3.0 / 2011-12-17
|
13
|
+
==================
|
14
|
+
|
15
|
+
* Added support for Ubuntu/Debian/Linux users [niftylettuce]
|
16
|
+
* Fixed: send notifications even if title not specified [alessioalex]
|
17
|
+
|
18
|
+
1.2.0 / 2011-10-06
|
19
|
+
==================
|
20
|
+
|
21
|
+
* Add support for priority.
|
22
|
+
|
2
23
|
1.1.0 / 2011-03-15
|
3
24
|
==================
|
4
25
|
|
@@ -1,29 +1,41 @@
|
|
1
|
-
|
2
1
|
# Growl for nodejs
|
3
2
|
|
4
|
-
Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl).
|
3
|
+
Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce).
|
5
4
|
|
6
5
|
## Installation
|
7
6
|
|
8
|
-
|
9
|
-
|
7
|
+
### Mac OS X (Darwin):
|
8
|
+
|
9
|
+
Install [npm](http://npmjs.org/) and run:
|
10
10
|
|
11
|
-
$
|
11
|
+
$ npm install growl
|
12
|
+
|
13
|
+
### Ubuntu (Linux):
|
14
|
+
|
15
|
+
Install `notify-send` through the [libnotify-bin](packages.ubuntu.com/libnotify-bin) package:
|
16
|
+
|
17
|
+
$ sudo apt-get install libnotify-bin
|
18
|
+
|
19
|
+
Install [npm](http://npmjs.org/) and run:
|
20
|
+
|
21
|
+
$ npm install growl
|
12
22
|
|
13
23
|
## Examples
|
14
24
|
|
15
25
|
Callback functions are optional
|
16
26
|
|
17
27
|
var growl = require('growl')
|
18
|
-
growl
|
19
|
-
growl
|
20
|
-
growl
|
21
|
-
growl
|
22
|
-
growl
|
23
|
-
growl
|
24
|
-
growl
|
25
|
-
growl
|
26
|
-
growl
|
28
|
+
growl('You have mail!')
|
29
|
+
growl('5 new messages', { sticky: true })
|
30
|
+
growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })
|
31
|
+
growl('Message with title', { title: 'Title'})
|
32
|
+
growl('Set priority', { priority: 2 })
|
33
|
+
growl('Show Safari icon', { image: 'Safari' })
|
34
|
+
growl('Show icon', { image: 'path/to/icon.icns' })
|
35
|
+
growl('Show image', { image: 'path/to/my.image.png' })
|
36
|
+
growl('Show png filesystem icon', { image: 'png' })
|
37
|
+
growl('Show pdf filesystem icon', { image: 'article.pdf' })
|
38
|
+
growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){
|
27
39
|
// ... notified
|
28
40
|
})
|
29
41
|
|
@@ -33,6 +45,8 @@ Callback functions are optional
|
|
33
45
|
- notification title
|
34
46
|
- name
|
35
47
|
- application name
|
48
|
+
- priority
|
49
|
+
- priority for the notification (default is 0)
|
36
50
|
- sticky
|
37
51
|
- weither or not the notification should remainin until closed
|
38
52
|
- image
|
@@ -43,11 +57,6 @@ Callback functions are optional
|
|
43
57
|
- filename uses extname as --icon
|
44
58
|
- otherwise treated as --icon
|
45
59
|
|
46
|
-
Fetch the current version of 'growlnotify':
|
47
|
-
|
48
|
-
growl.binVersion(function(err, version){ ... })
|
49
|
-
// => 'n.n.n'
|
50
|
-
|
51
60
|
## License
|
52
61
|
|
53
62
|
(The MIT License)
|
@@ -71,4 +80,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
71
80
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
72
81
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
73
82
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
74
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
83
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -6,28 +6,62 @@
|
|
6
6
|
*/
|
7
7
|
|
8
8
|
var exec = require('child_process').exec
|
9
|
-
, path = require('path')
|
9
|
+
, path = require('path')
|
10
|
+
, os = require('os')
|
11
|
+
, cmd;
|
12
|
+
|
13
|
+
switch(os.type()) {
|
14
|
+
case 'Darwin':
|
15
|
+
cmd = {
|
16
|
+
type: "Darwin"
|
17
|
+
, pkg: "growlnotify"
|
18
|
+
, msg: '-m'
|
19
|
+
, sticky: '--sticky'
|
20
|
+
, priority: {
|
21
|
+
cmd: '--priority'
|
22
|
+
, range: [
|
23
|
+
-2
|
24
|
+
, -1
|
25
|
+
, 0
|
26
|
+
, 1
|
27
|
+
, 2
|
28
|
+
, "Very Low"
|
29
|
+
, "Moderate"
|
30
|
+
, "Normal"
|
31
|
+
, "High"
|
32
|
+
, "Emergency"
|
33
|
+
]
|
34
|
+
}
|
35
|
+
};
|
36
|
+
break;
|
37
|
+
case 'Linux':
|
38
|
+
cmd = {
|
39
|
+
type: "Linux"
|
40
|
+
, pkg: "notify-send"
|
41
|
+
, msg: ''
|
42
|
+
, sticky: '-t 0'
|
43
|
+
, priority: {
|
44
|
+
cmd: '-u'
|
45
|
+
, range: [
|
46
|
+
"low"
|
47
|
+
, "normal"
|
48
|
+
, "critical"
|
49
|
+
]
|
50
|
+
}
|
51
|
+
};
|
52
|
+
}
|
10
53
|
|
11
54
|
/**
|
12
|
-
*
|
55
|
+
* Expose `growl`.
|
13
56
|
*/
|
14
57
|
|
15
|
-
exports.
|
16
|
-
|
58
|
+
exports = module.exports = growl;
|
59
|
+
|
17
60
|
/**
|
18
|
-
*
|
19
|
-
*
|
20
|
-
* @param {function} fn
|
21
|
-
* @api public
|
61
|
+
* Node-growl version.
|
22
62
|
*/
|
23
|
-
|
24
|
-
exports.
|
25
|
-
exec('growlnotify -v', function(err, stdout){
|
26
|
-
if (err) return fn(err);
|
27
|
-
var version = /(\d+\.\d+(?:\.\d+)?)/.exec(stdout)[1];
|
28
|
-
fn(null, parseFloat(version));
|
29
|
-
});
|
30
|
-
};
|
63
|
+
|
64
|
+
exports.version = '1.4.1'
|
31
65
|
|
32
66
|
/**
|
33
67
|
* Send growl notification _msg_ with _options_.
|
@@ -36,6 +70,7 @@ exports.binVersion = function(fn) {
|
|
36
70
|
*
|
37
71
|
* - title Notification title
|
38
72
|
* - sticky Make the notification stick (defaults to false)
|
73
|
+
* - priority Specify an int or named key (default is 0)
|
39
74
|
* - name Application name (defaults to growlnotify)
|
40
75
|
* - image
|
41
76
|
* - path to an icon sets --iconpath
|
@@ -46,9 +81,9 @@ exports.binVersion = function(fn) {
|
|
46
81
|
*
|
47
82
|
* Examples:
|
48
83
|
*
|
49
|
-
* growl
|
50
|
-
* growl
|
51
|
-
* growl
|
84
|
+
* growl('New email')
|
85
|
+
* growl('5 new emails', { title: 'Thunderbird' })
|
86
|
+
* growl('Email sent', function(){
|
52
87
|
* // ... notification sent
|
53
88
|
* })
|
54
89
|
*
|
@@ -58,25 +93,67 @@ exports.binVersion = function(fn) {
|
|
58
93
|
* @api public
|
59
94
|
*/
|
60
95
|
|
61
|
-
|
96
|
+
function growl(msg, options, fn) {
|
62
97
|
var image
|
63
|
-
, args = [
|
98
|
+
, args = [cmd.pkg]
|
64
99
|
, options = options || {}
|
65
100
|
, fn = fn || function(){};
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
101
|
+
|
102
|
+
// noop
|
103
|
+
if (!cmd) return fn(new Error('growl not supported on this platform'));
|
104
|
+
|
105
|
+
// image
|
106
|
+
if (image = options.image) {
|
107
|
+
switch(cmd.type) {
|
108
|
+
case 'Darwin':
|
109
|
+
var flag, ext = path.extname(image).substr(1)
|
110
|
+
flag = flag || ext == 'icns' && 'iconpath'
|
111
|
+
flag = flag || /^[A-Z]/.test(image) && 'appIcon'
|
112
|
+
flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image'
|
113
|
+
flag = flag || ext && (image = ext) && 'icon'
|
114
|
+
flag = flag || 'icon'
|
115
|
+
args.push('--' + flag, image)
|
116
|
+
break;
|
117
|
+
case 'Linux':
|
118
|
+
args.push('-i ' + image);
|
119
|
+
break;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
// sticky
|
124
|
+
if (options.sticky) args.push(cmd.sticky);
|
125
|
+
|
126
|
+
// priority
|
127
|
+
if (options.priority) {
|
128
|
+
var priority = options.priority + '';
|
129
|
+
var checkindexOf = cmd.priority.range.indexOf(priority);
|
130
|
+
if (~cmd.priority.range.indexOf(priority)) {
|
131
|
+
args.push(cmd.priority, options.priority);
|
76
132
|
}
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
133
|
+
}
|
134
|
+
|
135
|
+
// name
|
136
|
+
if (options.name && cmd.type === "Darwin") {
|
137
|
+
args.push('--name', options.name);
|
138
|
+
}
|
139
|
+
|
140
|
+
switch(cmd.type) {
|
141
|
+
case 'Darwin':
|
142
|
+
args.push(cmd.msg);
|
143
|
+
args.push('"' + msg + '"');
|
144
|
+
if (options.title) args.push(options.title);
|
145
|
+
break;
|
146
|
+
case 'Linux':
|
147
|
+
if (options.title) {
|
148
|
+
args.push("'" + options.title + "'");
|
149
|
+
args.push(cmd.msg);
|
150
|
+
args.push("'" + msg + "'");
|
151
|
+
} else {
|
152
|
+
args.push("'" + msg + "'");
|
153
|
+
}
|
154
|
+
break;
|
155
|
+
}
|
156
|
+
|
157
|
+
// execute
|
158
|
+
exec(args.join(' '), fn);
|
82
159
|
};
|
@@ -1,17 +1,16 @@
|
|
1
1
|
|
2
2
|
var growl = require('./lib/growl')
|
3
3
|
|
4
|
-
growl
|
5
|
-
|
4
|
+
growl('You have mail!')
|
5
|
+
growl('5 new messages', { sticky: true })
|
6
|
+
growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })
|
7
|
+
growl('Message with title', { title: 'Title'})
|
8
|
+
growl('Set priority', { priority: 2 })
|
9
|
+
growl('Show Safari icon', { image: 'Safari' })
|
10
|
+
growl('Show icon', { image: 'path/to/icon.icns' })
|
11
|
+
growl('Show image', { image: 'path/to/my.image.png' })
|
12
|
+
growl('Show png filesystem icon', { image: 'png' })
|
13
|
+
growl('Show pdf filesystem icon', { image: 'article.pdf' })
|
14
|
+
growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(){
|
15
|
+
console.log('callback');
|
6
16
|
})
|
7
|
-
growl.notify('You have mail!')
|
8
|
-
growl.notify('5 new messages', { sticky: true })
|
9
|
-
growl.notify('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })
|
10
|
-
growl.notify('Show Safari icon', { image: 'Safari' })
|
11
|
-
growl.notify('Show icon', { image: 'path/to/icon.icns' })
|
12
|
-
growl.notify('Show image', { image: 'path/to/my.image.png' })
|
13
|
-
growl.notify('Show png filesystem icon', { image: 'png' })
|
14
|
-
growl.notify('Show pdf filesystem icon', { image: 'article.pdf' })
|
15
|
-
growl.notify('Show pdf filesystem icon', { image: 'article.pdf' }, function(){
|
16
|
-
require('sys').p('callback')
|
17
|
-
})
|
@@ -3,14 +3,14 @@ mkdirp
|
|
3
3
|
|
4
4
|
Like `mkdir -p`, but in node.js!
|
5
5
|
|
6
|
-
|
6
|
+
example
|
7
7
|
=======
|
8
8
|
|
9
9
|
pow.js
|
10
10
|
------
|
11
11
|
var mkdirp = require('mkdirp');
|
12
12
|
|
13
|
-
mkdirp('/tmp/foo/bar/baz',
|
13
|
+
mkdirp('/tmp/foo/bar/baz', function (err) {
|
14
14
|
if (err) console.error(err)
|
15
15
|
else console.log('pow!')
|
16
16
|
});
|
@@ -19,3 +19,36 @@ Output
|
|
19
19
|
pow!
|
20
20
|
|
21
21
|
And now /tmp/foo/bar/baz exists, huzzah!
|
22
|
+
|
23
|
+
methods
|
24
|
+
=======
|
25
|
+
|
26
|
+
var mkdirp = require('mkdirp');
|
27
|
+
|
28
|
+
mkdirp(dir, mode, cb)
|
29
|
+
---------------------
|
30
|
+
|
31
|
+
Create a new directory and any necessary subdirectories at `dir` with octal
|
32
|
+
permission string `mode`.
|
33
|
+
|
34
|
+
If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
|
35
|
+
|
36
|
+
mkdirp.sync(dir, mode)
|
37
|
+
----------------------
|
38
|
+
|
39
|
+
Synchronously create a new directory and any necessary subdirectories at `dir`
|
40
|
+
with octal permission string `mode`.
|
41
|
+
|
42
|
+
If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
|
43
|
+
|
44
|
+
install
|
45
|
+
=======
|
46
|
+
|
47
|
+
With [npm](http://npmjs.org) do:
|
48
|
+
|
49
|
+
npm install mkdirp
|
50
|
+
|
51
|
+
license
|
52
|
+
=======
|
53
|
+
|
54
|
+
MIT/X11
|
@@ -1,20 +1,79 @@
|
|
1
1
|
var path = require('path');
|
2
2
|
var fs = require('fs');
|
3
3
|
|
4
|
-
|
4
|
+
module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
|
5
|
+
|
6
|
+
function mkdirP (p, mode, f) {
|
7
|
+
if (typeof mode === 'function' || mode === undefined) {
|
8
|
+
f = mode;
|
9
|
+
mode = 0777 & (~process.umask());
|
10
|
+
}
|
11
|
+
|
5
12
|
var cb = f || function () {};
|
13
|
+
if (typeof mode === 'string') mode = parseInt(mode, 8);
|
6
14
|
p = path.resolve(p);
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
|
16
|
+
fs.mkdir(p, mode, function (er) {
|
17
|
+
if (!er) return cb();
|
18
|
+
switch (er.code) {
|
19
|
+
case 'ENOENT':
|
20
|
+
mkdirP(path.dirname(p), mode, function (er) {
|
21
|
+
if (er) cb(er);
|
22
|
+
else mkdirP(p, mode, cb);
|
23
|
+
});
|
24
|
+
break;
|
25
|
+
|
26
|
+
case 'EEXIST':
|
27
|
+
fs.stat(p, function (er2, stat) {
|
28
|
+
// if the stat fails, then that's super weird.
|
29
|
+
// let the original EEXIST be the failure reason.
|
30
|
+
if (er2 || !stat.isDirectory()) cb(er)
|
31
|
+
else cb();
|
32
|
+
});
|
33
|
+
break;
|
34
|
+
|
35
|
+
default:
|
36
|
+
cb(er);
|
37
|
+
break;
|
38
|
+
}
|
18
39
|
});
|
40
|
+
}
|
41
|
+
|
42
|
+
mkdirP.sync = function sync (p, mode) {
|
43
|
+
if (mode === undefined) {
|
44
|
+
mode = 0777 & (~process.umask());
|
45
|
+
}
|
46
|
+
|
47
|
+
if (typeof mode === 'string') mode = parseInt(mode, 8);
|
48
|
+
p = path.resolve(p);
|
49
|
+
|
50
|
+
try {
|
51
|
+
fs.mkdirSync(p, mode)
|
52
|
+
}
|
53
|
+
catch (err0) {
|
54
|
+
switch (err0.code) {
|
55
|
+
case 'ENOENT' :
|
56
|
+
var err1 = sync(path.dirname(p), mode)
|
57
|
+
if (err1) throw err1;
|
58
|
+
else return sync(p, mode);
|
59
|
+
break;
|
60
|
+
|
61
|
+
case 'EEXIST' :
|
62
|
+
var stat;
|
63
|
+
try {
|
64
|
+
stat = fs.statSync(p);
|
65
|
+
}
|
66
|
+
catch (err1) {
|
67
|
+
throw err0
|
68
|
+
}
|
69
|
+
if (!stat.isDirectory()) throw err0;
|
70
|
+
else return null;
|
71
|
+
break;
|
72
|
+
default :
|
73
|
+
throw err0
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
return null;
|
19
79
|
};
|
20
|
-
exports.mkdirp = exports.mkdirP = module.exports;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name" : "mkdirp",
|
3
3
|
"description" : "Recursively mkdir, like `mkdir -p`",
|
4
|
-
"version" : "0.0
|
4
|
+
"version" : "0.3.0",
|
5
5
|
"author" : "James Halliday <mail@substack.net> (http://substack.net)",
|
6
6
|
"main" : "./index",
|
7
7
|
"keywords" : [
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"url" : "http://github.com/substack/node-mkdirp.git"
|
14
14
|
},
|
15
15
|
"scripts" : {
|
16
|
-
"test" : "
|
16
|
+
"test" : "tap test/*.js"
|
17
17
|
},
|
18
18
|
"devDependencies" : {
|
19
19
|
"tap" : "0.0.x"
|
@@ -0,0 +1,38 @@
|
|
1
|
+
var mkdirp = require('../').mkdirp;
|
2
|
+
var path = require('path');
|
3
|
+
var fs = require('fs');
|
4
|
+
var test = require('tap').test;
|
5
|
+
|
6
|
+
var ps = [ '', 'tmp' ];
|
7
|
+
|
8
|
+
for (var i = 0; i < 25; i++) {
|
9
|
+
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
|
10
|
+
ps.push(dir);
|
11
|
+
}
|
12
|
+
|
13
|
+
var file = ps.join('/');
|
14
|
+
|
15
|
+
test('chmod-pre', function (t) {
|
16
|
+
var mode = 0744
|
17
|
+
mkdirp(file, mode, function (er) {
|
18
|
+
t.ifError(er, 'should not error');
|
19
|
+
fs.stat(file, function (er, stat) {
|
20
|
+
t.ifError(er, 'should exist');
|
21
|
+
t.ok(stat && stat.isDirectory(), 'should be directory');
|
22
|
+
t.equal(stat && stat.mode & 0777, mode, 'should be 0744');
|
23
|
+
t.end();
|
24
|
+
});
|
25
|
+
});
|
26
|
+
});
|
27
|
+
|
28
|
+
test('chmod', function (t) {
|
29
|
+
var mode = 0755
|
30
|
+
mkdirp(file, mode, function (er) {
|
31
|
+
t.ifError(er, 'should not error');
|
32
|
+
fs.stat(file, function (er, stat) {
|
33
|
+
t.ifError(er, 'should exist');
|
34
|
+
t.ok(stat && stat.isDirectory(), 'should be directory');
|
35
|
+
t.end();
|
36
|
+
});
|
37
|
+
});
|
38
|
+
});
|