0

I've been looking into using component.io in a current project, as it seems much simpler than require.js and browserify, and I like a few things they've done.

Seeing as component.io doesn't require any component style wrappers, why does component.io have their own versions of jquery? https://github.com/components/jqueryui

These seems to go counter to what they are proposing, as all component.io needs to know is the github username and project name in order to include the files.

If the only thing needed is the

 "scripts": [
    "ui/jquery-ui.js"
  ],
  "main": "ui/jquery-ui.js",

tags in a component.js file, why not just have a component.js file which points to the main jquery-ui file?

Charles
  • 50,943
  • 13
  • 104
  • 142
pedalpete
  • 21,076
  • 45
  • 128
  • 239

1 Answers1

0

as all component.io needs to know is the github username and project name in order to include the files.

No, that's not true


First of all - I think this should be clear before talking about component to avoid misunderstandings - component.io is only the website with a list of components using the package manager and build tool component developed by TJ Holowaychuk

'component' is ambiguous

Furthermore ComponentJS (http://componentjs.com) has nothing to do with it.
And also the component.json file in the context of bower has nothing to do with TJ's component. Bower renamed their component.json to bower.json and deprecated the old name

Nevertheless: some of the keys in bower's JSON are compatible to the JSON of TJ's component but that doesn't mean that a TJ component is build properly with a bower's component.json file.


To explain: No, that's not true you can read this form the componentjs/spec repository:

Components MUST provide a "component.json" file to describe the component's functionality and contents. Component developers MUST explicitly state the relevant file(s) via scripts, styles and others. [...|

To your question:

why not just have a component.js file which points to the main jquery-ui file

Usually someone can create a component.json file for an existing libarary like jQuery and send a pull request.

But the pull request might not be merged, because:

  1. there is already a component.json for bower
  2. the repository / build process don't contain/generate the needed files
  3. project isn't maintained anymore

To be sure what's the reason in your case you can just ask at https://github.com/components/jqueryui/issues and/or
https://forum.jquery.com/developing-jquery-ui

timaschew
  • 16,254
  • 6
  • 61
  • 78