Skip to content

Conversation

tunnckoCore
Copy link
Contributor

Separate commits for each thing.

Bug appears when you call base without new keyword for example

var base = require('base')
var app = base({baz: 'qux'}, {yeah: 123, nope: 456})

app.set('foo', 'bar')
console.log(app.foo) // => 'bar'
console.log(app.baz) // => 'qux'

console.log(app.get('foo')) // => 'bar'
console.log(app.get('baz')) // => 'qux'

console.log(app.yeah) // => undefined
console.log(app.nope) // => undefined
console.log(app.options) // => {}

calling it with new Base() works as expected (and as in tests) without this PR.

@jonschlinkert
Copy link
Collaborator

I know you don't like so much big examples,

I do it sometimes too, like you've said, sometimes it's necessary. I just like them a bit smaller in general. this is great though thanks!

jonschlinkert added a commit that referenced this pull request Feb 25, 2016
Bug in singleton + docs fixes
@jonschlinkert jonschlinkert merged commit 405417a into base-repos:master Feb 25, 2016
@tunnckoCore
Copy link
Contributor Author

damn, good catch.

Haha, yea! ;d

Btw, i tried to run verb, but it eats the whole readme (meaning.. it was like copy of verb.md file, with no other template staff from default layout from readme generator and etc), so i left it off.

@jonschlinkert
Copy link
Collaborator

it was like copy of verb.md file, with no other template staff from default layout from readme generator and etc), so i left it off.

yeah I have fixes for verb that will probably resolve that. the good thing is that verb will be really easy to maintain. the bugfixes are getting easier

edit: aaaaand also this why verb 0.9 isn't quite ready for release lol.

@tunnckoCore
Copy link
Contributor Author

the good thing is that verb will be really easy to maintain. the bugfixes are getting easier

absolutely! when we get familiar with underling libs/plugins. initially it cost some time (low) to realize from where comes given problem, but it worths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants