Skip to content

Instantly share code, notes, and snippets.

View themeteorchef's full-sized avatar

The Meteor Chef themeteorchef

View GitHub Profile
Template.newUser.onRendered( () => {
$("#signUpForm").validate({
highlight: function(element, errorClass) {
$(element).parent().addClass(errorClass);
},
unhighlight: function(element, errorClass, validClass) {
$(element).parent().removeClass(errorClass).addClass(validClass);
},
onfocusout: true,
errorClass: "has-error",
@themeteorchef
themeteorchef / get-text-replacement.js
Created August 31, 2016 14:36
Native Node.js File Read in Meteor
/*
Read a file with Node's fs instead of Meteor's Assets lib.
Originally used as a swap for Meteor's Assets.getText() method not working consistently.
*/
import fs from 'fs';
const file = 'some-file-in-private.html';
// assets/app here is analagous to your /private directory in the root of your app. This is where Meteor ultimately
// stores the contents of /private in a built app.