Giter Site home page Giter Site logo

Comments (10)

tunnckoCore avatar tunnckoCore commented on May 29, 2024

Adding console.log(this.debug) before line 79 in lib/plugins/helpers.js mostly output correct and expected object, but the last is

{ [Function: disabled]
  enabled: false,
  namespace: 'base:templates:assemble:generate:verb',
  append: [Function] }

If I comment the whole debug things in this file, same error comes from lib/plugins/engine.js:58 which again is debug, sooo.. it seems that lib/utils.js (actually debug function from lib/utils/common.js) is not called (because it adds these methods) some times, strange.

from templates.

jonschlinkert avatar jonschlinkert commented on May 29, 2024

does sound strange. I'll look into, it's probably an oversight somewhere

from templates.

jonschlinkert avatar jonschlinkert commented on May 29, 2024

the output is great though, it's already coming in useful (even more once we get the kinks out!).

like how we did the namespace thing? :)

from templates.

tunnckoCore avatar tunnckoCore commented on May 29, 2024

like how we did the namespace thing?

Yea, looks good.

Is there any quick fix? Or any ideas? From where to start? I tried to manually install previous versions of base and templates, generate and assemble-core, but not success.
This bug blocked my using of verb ;/

from templates.

tunnckoCore avatar tunnckoCore commented on May 29, 2024

Okey, i have idea. We should drop the debug thing from base/index.js#L107-111 and replace it with this.use(baseDebug()) (the base-debug plugin). I'm trying it locally with latest verb installed.

from templates.

jonschlinkert avatar jonschlinkert commented on May 29, 2024

yeah, agreed that's already the plan. the plugin isn't done correctly - or at least how I want it to work, and I just wanted to get debug working because it's helping us get everything prepared for release

from templates.

tunnckoCore avatar tunnckoCore commented on May 29, 2024

Damn, I just realize it 😆

Problem is that verb not follow the new "debug" style, yet. Meaning, in templates, assemble-core and generate, there is var debug = Assemble.debug; then that debug should be called with this in every app constructor. That is lil' bit shitty need. :D

I think we should remove all this static .debug method, that lib/debug.js thing, and all namespacing from base.is. I think all namespacing and debug is job of base-debug plugin.

Also, this utils.namespace function in base/utils.js is incorrect, it tries to split this._name by :, but really (don't need to split) it can't contain it, or if it can then is* would be shit. For example

function MyApp () {
  Base.call(this)
  this.is('app:bar:baz')
  console.log(this._namespace) // => base:app:baz:bar
  console.log(this['isApp:bar:baz']), // => true
}

You may say that .is is intended to be used with single word and/or without colons and shit characters - yes, but then why you split it by colons (in base/utils.js the utils.namespace function)? Good idea can be to namify over coming name (which is set to this._name).

edit: actually, yea, both namespace and debug plugin not works correctly, as you said. :)

from templates.

jonschlinkert avatar jonschlinkert commented on May 29, 2024

Problem is that verb not follow the new "debug" style, yet.

oh, yeah you're one step ahead of me. I already implemented this in verb locally but didn't realize it wasn't pushed up. I'll do that in a moment.

Also, this utils.namespace function in base/utils.js is incorrect, it tries to split this._name by :, but really (don't need to split) it can't contain it, or if it can then is* would be shit

If you want to add : to the isFoo:bar:baz then why shouldn't you be able to do that? what am I missing?

from templates.

jonschlinkert avatar jonschlinkert commented on May 29, 2024

fixed

from templates.

tunnckoCore avatar tunnckoCore commented on May 29, 2024

If you want to add : to the isFoo:bar:baz then why shouldn't you be able to do tha

hmm, when i rethink it.. okey 👍

fixed

Great, i'll try.

from templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.