Skip to content

Instantly share code, notes, and snippets.

@mrcoles
Last active December 11, 2015 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrcoles/4660618 to your computer and use it in GitHub Desktop.
Save mrcoles/4660618 to your computer and use it in GitHub Desktop.
meteor less test example
<head>
<title>less-test</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>Hello World!</h1>
{{greeting}}
<input type="button" value="Click" />
</template>
if (Meteor.isClient) {
Template.hello.greeting = function () {
return "Welcome to less-test.";
};
Template.hello.events({
'click input' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
}
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
});
}
@import "imports";
.test(@arguments) {}
.p { .test(1px, 2px); }
html { background: @foo; }
@glasser
Copy link

glasser commented Feb 6, 2013

Don't forget to include .meteor/packages when making gists from Meteor apps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment