Giter Site home page Giter Site logo

veliovgroup / meteor-template-helpers Goto Github PK

View Code? Open in Web Editor NEW
35.0 7.0 5.0 67 KB

Template helpers for Session, logical operations and debug

Home Page: https://atmospherejs.com/ostrio/templatehelpers

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%
meteor meteor-package template templating helpers javascript meteorjs

meteor-template-helpers's People

Contributors

danrubins avatar dr-dimitru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

meteor-template-helpers's Issues

Meteor >=1.5 doesn't like non-deterministic imports

Using this package in Meteor >=1.5 gives us console errors like this whenever we use the helpers. Thanks to the introduction of dynamic imports in 1.5, the imports need to be known during build so the appropriate bundles can be prepared. Preparing a PR now - easy fix.

Exception in template helper: TypeError: Session.get is not a function
    at Object.session (http://localhost:3000/app/app.js?hash=2159b3ccd40084b8aaf7c9d3fe5eb6e18d7f9d32:10945:26)
    at http://localhost:3000/packages/blaze.js?hash=d84a1b26384b9fd1dc94795596d2fa3d1d037b7c:3049:16
    at http://localhost:3000/packages/blaze.js?hash=d84a1b26384b9fd1dc94795596d2fa3d1d037b7c:1713:16
    at http://localhost:3000/packages/blaze.js?hash=d84a1b26384b9fd1dc94795596d2fa3d1d037b7c:3101:66
    at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=d84a1b26384b9fd1dc94795596d2fa3d1d037b7c:3742:12)
    at http://localhost:3000/packages/blaze.js?hash=d84a1b26384b9fd1dc94795596d2fa3d1d037b7c:3100:27
    at Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=ebf9381e7fc625d41acb0df14995b7614360858a:172:18)
    at Spacebars.mustacheImpl (http://localhost:3000/packages/spacebars.js?hash=ebf9381e7fc625d41acb0df14995b7614360858a:106:25)
    at Object.Spacebars.dataMustache (http://localhost:3000/packages/spacebars.js?hash=ebf9381e7fc625d41acb0df14995b7614360858a:138:39)
    at HTML.P.Blaze.Each.HTML.P.class (http://localhost:3000/app/app.js?hash=2159b3ccd40084b8aaf7c9d3fe5eb6e18d7f9d32:10263:24)

Doesn't "build" on Windows

"$ meteor add ostrio:templatehelpers
=> Errors while adding packages:

While building package ostrio:templatehelpers:
error: Couldn't build this package on Windows due to the following file with a colon -- ostrio:templatehelpers.js. Please rename and and re-publish the
package. "

I'll add a pull request for this shortly

Compare always false

Trying to use the compare helper and every time it will return false. Even using your examples:

{{log (compare 2 '>' 1)}}
{{log (compare 'one' '==' 'one')}}

Any idea?

Error when adding package

E:\work\aaa\meteor>meteor update
This project is already at Meteor 1.2.0.2, the latest release.
Your top-level dependencies are at their latest compatible versions.

E:\work\aaa\meteor>meteor add ostrio:templatehelpers

C:\Users\I\AppData\Local\.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32
\dev_bundle\lib\node_modules\fibers\future.js:278
                                                throw(ex);
                                                      ^
Error: ENOENT, open 'C:\Users\I\AppData\Local\Temp\mt-lzvxy1\web.browser\ostrio:
templatehelpers.js'
    at Object.Future.wait (C:\Users\I\AppData\Local\.meteor\packages\meteor-tool
\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\fibers\future.js:398:15)

    at C:\tools\fs\files.js:1331:28
    at Object.wrapper [as open] (C:\tools\fs\files.js:1334:20)
    at Object.files.readBufferWithLengthAndOffset (C:\tools\fs\files.js:1474:20)

    at C:\tools\isobuild\isopack.js:973:26
    at Array.forEach (native)
    at Function._.each._.forEach (C:\Users\I\AppData\Local\.meteor\packages\mete
or-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\unders
core.js:79:11)
    at C:\tools\isobuild\isopack.js:971:9
    at Array.forEach (native)
    at Function._.each._.forEach (C:\Users\I\AppData\Local\.meteor\packages\mete
or-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\unders
core.js:79:11)
    at [object Object]._.extend._loadUnibuildsFromPath (C:\tools\isobuild\isopac
k.js:931:7)
    at C:\tools\packaging\tropohouse.js:500:19
    at Array.forEach (native)
    at Function._.each._.forEach (C:\Users\I\AppData\Local\.meteor\packages\mete
or-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\unders
core.js:79:11)
    at C:\tools\packaging\tropohouse.js:499:11
    at C:\tools\utils\buildmessage.js:356:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:349:34
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:347:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at Object.enterJob (C:\tools\utils\buildmessage.js:321:26)
    at Object.download (C:\tools\packaging\tropohouse.js:437:20)
    at C:\tools\packaging\tropohouse.js:575:22
    at C:\tools\utils\buildmessage.js:356:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:349:34
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:347:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at Object.enterJob (C:\tools\utils\buildmessage.js:321:26)
    at [object Object]._.extend.downloadPackagesMissingFromMap (C:\tools\packagi
ng\tropohouse.js:572:20)
    at C:\tools\project-context.js:702:25
    at C:\tools\utils\buildmessage.js:356:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:349:34
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:347:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at Object.enterJob (C:\tools\utils\buildmessage.js:321:26)
    at C:\tools\project-context.js:701:20
    at C:\tools\packaging\catalog\catalog.js:100:5
    at C:\tools\utils\buildmessage.js:268:13
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:261:29
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:259:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:250:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at Object.capture (C:\tools\utils\buildmessage.js:249:19)
    at Object.catalog.runAndRetryWithRefreshIfHelpful (C:\tools\packaging\catalo
g\catalog.js:99:31)
    at ProjectContext._.extend._downloadMissingPackages (C:\tools\project-contex
t.js:700:13)
    at C:\tools\project-context.js:257:35
    at C:\tools\utils\buildmessage.js:356:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:349:34
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:347:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at Object.enterJob (C:\tools\utils\buildmessage.js:321:26)
    at ProjectContext._.extend._completeStagesThrough (C:\tools\project-context.
js:247:18)
    at ProjectContext._.extend.saveChangedMetadata (C:\tools\project-context.js:
235:10)
    at ProjectContext._.extend.prepareProjectForBuild (C:\tools\project-context.
js:240:10)
    at C:\tools\cli\commands-packages.js:1996:20
    at C:\tools\utils\buildmessage.js:268:13
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:261:29
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:259:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at C:\tools\utils\buildmessage.js:250:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:114:1
4)
    at Object.capture (C:\tools\utils\buildmessage.js:249:19)
    at Command.main.registerCommand.name [as func] (C:\tools\cli\commands-packag
es.js:1995:27)
    at C:\tools\cli\main.js:1378:23
    - - - - -


compare many to many always returns true.

compare many to many (&&) always returns true.

{{compare 4 'gte' 1 '&&' 4 'lte' 6}}   // ture
{{compare 4 'gte' 7 '&&' 4 'lte' 8}}   // ture
{{compare 4 'gte' 9 '&&' 4 'lte' 10}}  // ture

Version of ostrio:templatehelpers : 2.1.4
Version of Meteor : 1.6.1.1
Browser name : chrome
Platform : mac

Link to the reproduction repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.