Open srl295 opened 8 years ago
Ya, that seems reasonable. I'd document your "Some Random Thing" package as providing a setup()
method that takes an options object, where one key can be appEnv
and is expected to be the result of a cfenv.getAppEnv()
call.
I'm not sure about documenting it as best practice, since yours is the first suggestion I've seen of someone wanting to do this. Let us know how it works out! Maybe it WILL BE a best practice!
@pmuellr thanks. We'll see how it goes, I'll link back here. I'm also exporting the regex itself from the package.
As promised, see https://www.npmjs.com/package/g11n-pipeline
All OK, except for the issue #3 i hit.
Say I am writing an SDK (just suppose…)
Is the following reasonable, and if so, should it be documented as a best practice?
OLD:
IMPROVED?
implemented within the SDK by:
Any pitfalls? My idea is to reduce the amount of copy and paste user code. User can just pass in
appEnv
if they have one, otherwise credentials can be supplied.