Giter VIP home page Giter VIP logo

nun's People

Contributors

akaspin avatar lsm 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nun's Issues

No npm package for nun?

I totally love nun, thanks for this module!

Is it possible to make a npm package out of it so I can set it as a dependency for my own programs?

TypeError: Not a string of buffer.

make
-n test/test-basic.js: 

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
TypeError: Not a string or buffer
    at Array.<anonymous> (/usr/local/lib/node_modules/nun/index.js:35:25)
    at EventEmitter._tickCallback (node.js:126:26)
FAIL

Related to this bit of code:

if (have_openssl) { 
                // if have openssl, add options hash to key
                key += crypto.createHash("sha1").
                        update(options).digest("hex");
            }

I think options is an object, and the update function on on the crypto is looking for a string or buffer.

nun.render, nun.compile examples give TypeError

TypeError: Not a string or buffer
at Array. (node_modules/nun/index.js:35:25)
at EventEmitter._tickCallback (node.js:126:26)

When running the examples. Have to give a random string instead of option object to bypass.

Can't initialize

Every test and even the example on the readme throw the same error all the time (using node.js version: v0.1.96-8-g3768aaa) (using 'make' all tests fail with this error) :

pubuntu@pubuntu:/media/cofs2/nodedev$ node testing.js
crypto:3638
return (new Hash).init(hash);
        ^
TypeError: undefined is not a function
    at CALL_NON_FUNCTION_AS_CONSTRUCTOR (native)
    at Object.createHash (crypto:3638:11)
    at /media/cofs2/nodedev/nun/index.js:35:19
    at EventEmitter._tickCallback (node.js:48:25)
    at node.js:204:9

testing.js is:

var sys = require("sys");
var nun = require("./nun");

var origin = "template.html";

nun.render(origin, { name: "John Dow" }, {}, function(err, output){
    if (err) throw err;

    var buffer = '';
    output.addListener('data', function(data){ buffer += data; })
              .addListener('end', function(){ sys.puts(buffer) });
});

template.html:

Name is {{name}}.

Problem for nodejs 0.1.98

undefined:3
var HS = new HStream();
^
ReferenceError: HStream is not defined
    at eval at compile (/path/to/nun/lib/nun/compiler.js:58:2)
    at /path/to/nun/lib/nun/index.js:73:23
    at /path/to/nun/lib/nun/index.js:40:6
    at Object.get (/path/to/nun/lib/nun/cache.js:43:15)
    at /path/to/nun/lib/nun/index.js:38:10
    at EventEmitter._tickCallback (node.js:48:25)
    at node.js:221:9

How to do multi-level override?

I think nun is really a good idea templating engine
But how can I do multi-level override?

testOverride.html
{{< testBase.html}}
{{+ content}}
I Am Content
{{/ content}}

testBase.html
{{< testSuperBase.html}}
{{+ contentWrap}}

{{+ content}} {{/ content}} {{/ contentWrap}}

testSuperBase.html

{{+ contentWrap}} {{/ contentWrap}}

When I render testOverride.html, it give me :

the content is missing... please help

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.