lykmapipo / sails-hook-validation

Custom validation error messages for sails model with i18n support
104 stars 29 forks source link

require lodash #7

Closed isery closed 9 years ago

isery commented 9 years ago

this fixes the issue that lodash is not in your projects package.json and also in production we run sails www and that won't go through if lodash is global. Besides that its not the beste style to have global variables.

lykmapipo commented 9 years ago

@isery what about requiring internal sails lodash than installing on our own?

Dont you think we will maintain compactibility with sails dependencies?

lykmapipo commented 9 years ago

@isery what about sails.util._

lykmapipo commented 9 years ago

@isery What about using parent-require

var prequire = require('parent-require');
var async = prequire('async');
var lodash = prequire('lodash');

In that fashion we will be requiring packages from sails

How about that?.

isery commented 9 years ago

I like the idea of sails.util._ and I changed the PR but travis does not run through? On my local machine all tests passed. Any Idea?

lykmapipo commented 9 years ago

@isery Am on it

isery commented 9 years ago

any news on this one?

lykmapipo commented 9 years ago

@isery I have been in a tight schedule. Hopely next week I will have time on this.