Skip to content

Add header to support commonjs package managers#115

Open
OnkelTem wants to merge 1 commit intoncuillery:masterfrom
OnkelTem:commonjs
Open

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

Conversation

@OnkelTem
Copy link

@OnkelTem OnkelTem commented Dec 6, 2015

Allows to use patterns like:

module.exports = 'myApp'; var dependencies = [ require('angular-breadcrumb') ]; angular.module(module.exports, dependencies) ...
@ncuillery
Copy link
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
Copy link
Author

OnkelTem commented Dec 6, 2015

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
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
Copy link

stramel commented Sep 2, 2016

#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

3 participants