Skip to content

Add header to support commonjs package managers#115

Open
OnkelTem wants to merge 1 commit into
ncuillery:masterfrom
OnkelTem:commonjs
Open

Add header to support commonjs package managers#115
OnkelTem wants to merge 1 commit into
ncuillery:masterfrom
OnkelTem:commonjs

Conversation

@OnkelTem

@OnkelTem OnkelTem commented Dec 6, 2015

Copy link
Copy Markdown

Allows to use patterns like:

module.exports = 'myApp';
var dependencies = [
  require('angular-breadcrumb')
];
angular.module(module.exports, dependencies)
...

@ncuillery

Copy link
Copy Markdown
Owner

Hi, thanks for the PR.

I don't know about component but in the same PR for ui-router angular-ui/ui-router#451 they add a component.json file too. Isn't it necessary here ?

@OnkelTem

OnkelTem commented Dec 6, 2015

Copy link
Copy Markdown
Author

Well actually I've never used component and just copy-pasted the header right from ui-router :)
I just wanted to be able to include angular-breadcrumb like I do with ui-router - i.e. via require() as in the example above.

@ncuillery

Copy link
Copy Markdown
Owner

Please can you add a component.json file with this content:

{
  "name": "angular-breadcrumb",
  "version": "0.4.1",
  "description": "AngularJS module that generates a breadcrumb from ui-router's states",
  "keywords": [
    "angular",
    "breadcrumb"
  ],
  "main": "release/angular-breadcrumb.js",
  "license": "MIT",
  "repo": "ncuillery/angular-breadcrumb"
} 

And add 'component.json' in the configuration of the plugin I use to keep the version in sync here

I suppose it will be enough for an already deprecated tool 😃

@stramel

stramel commented Sep 2, 2016

Copy link
Copy Markdown

#147 #148 #158 Seem to all be related. I have also seen grunt-umd used for wrapping at build time.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants