-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin .library should include the file automatically #36
Comments
If I would I can just check if the library is an array and do a simple: if (Array.isArray(plugin.library)) library += plugin.library.map(function (path) {
return fs.readFileSync(path, 'utf-8');
}).join('\n'); I don't have a problem with that at all :) |
At least, if that is what you want ;) |
I see. glob, like in grunt, would be useful, since it translates to real paths to the files, since you can specify the |
I honestly don't the big problem here, what's the problem with doing a |
well, relative paths won't work, unless it's |
Why would need relative paths? What's wrong with the __dirname & resolve approach? |
nothing, it just need to be stated explicity in the readme that the library paths (that will be concat'ed) need to be absolute instead of relative. that would be the only catch, else, everything is fine |
the plugin code:
the
library
member should automatically require the files, for example, if you pass an array, like this:the path should resolved using
require.resolve
each file and concat them. This way the, Primus can distinguish between paths and a 'raw' library string. Could it be done?The text was updated successfully, but these errors were encountered: