Skip to content

Move Util variable to bootstrap namespace #18136

Closed

Description

@JoyceBabu

Bootstrap v4 has introduced a new Util variable in global namespace. Please rename it to a bootstrap specific name like BootstrapUtil or Bootstrap.util. It is a common variable name, and there is a high probability that such a variable already exists. For example, our app already include a Util collection with utility methods like notify, highlight etc.

Activity

  1. added
    jsJavaScript or TypeScript sources and plugins
    v4v4, the frozen docs on gh-pages
    on Nov 3, 2015
  2. cvrebert commented on Nov 3, 2015

    @cvrebert
    Collaborator

    Unless I'm missing something, it's not global; it's in the util ES6 module. And it doesn't seem to get exported as a global after transpilation to ES5 either, otherwise there'd be a window.Util on http://v4-alpha.getbootstrap.com/components/buttons/
    So please explain what leads you to believe that it's global.

  3. added
    awaiting-replyWaiting on the author; an issue closes after 14 days without reply
    on Nov 3, 2015
  4. JoyceBabu commented on Nov 3, 2015

    @JoyceBabu
    ContributorAuthor

    I tried to create my own custom build (without tooltip and popover plugins) by concatenating the .js files in js/dist/ using gulp-concat. Do I need to include util.js in that case?

  5. removed
    awaiting-replyWaiting on the author; an issue closes after 14 days without reply
    on Nov 24, 2015
  6. cvrebert commented on Nov 24, 2015

    @cvrebert
    Collaborator

    Following the Gruntfile's current approach (which I don't like, but that's a matter for another issue), the way to create such a custom build would be to concatenate the desired/required subset of the js/src/ files and then run Babel over the result with the modules: 'ignore' option set.

  7. JoyceBabu commented on Nov 24, 2015

    @JoyceBabu
    ContributorAuthor

    When I use {presets: ["es2015"], modules: "ignore"} options, babel is not generating any output :-(

    When I use {presets: ["es2015"]}, it is working fine. I am using Gulp not Grunt

  8. mdo commented on Nov 26, 2016

    @mdo
    Member

    Closing out since I don't see a specific action to do here. Holler if we need to reopen though.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsJavaScript or TypeScript sources and pluginsv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions