Skip to content

netteForms.js: common js, amd #69

@davidkudera

Description

@davidkudera

Since nette-forms is registered in bower repository, it would be really greate if netteForms.js could work with common js or amd environments.

Eg. I'm using browserify with gulp to build my js files. But it's little bit difficult with nette forms, because I have to use something like browserify-shim to actually simulate wanted behavior.

Prons:

  • In common js or amd environment, Nette object will not be in global object
  • Easy to use in these environments
  • Nette is trying to encourage everyone to not use global services like old Environment, so this is just another step 😉

Cons:

  • Pull request will be for whole file, because all code needs to be wrapped in function

Good example is at nprogress package.

Edit

So even browserify-shim doesn't work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions