Last active
December 11, 2015 21:09
-
-
Save mrcoles/4660618 to your computer and use it in GitHub Desktop.
meteor less test example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foo: cyan; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>less-test</title> | |
</head> | |
<body> | |
{{> hello}} | |
</body> | |
<template name="hello"> | |
<h1>Hello World!</h1> | |
{{greeting}} | |
<input type="button" value="Click" /> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "imports"; | |
.test(@arguments) {} | |
.p { .test(1px, 2px); } | |
html { background: @foo; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't forget to include
.meteor/packages
when making gists from Meteor apps :)