Skip to content
This repository has been archived by the owner. It is now read-only.

Modify resources for publishing to npm. #3108

Closed
wants to merge 3 commits into from

Conversation

@maxkorp
Copy link
Contributor

maxkorp commented Dec 15, 2014

This PR resolves #1636

This adds a .npmignore to reduce the size of a published NPM package (while allowing the built files in ./dist to be published), as well as setting npm's prepublish script to run grunt build, so the files don't have to be built after pulling in from npm.

Alternatively, we could have this be an install script (so once they pull the source from NPM, it compiles locally), but as described on the NPM site that is generally an antipattern, and where possible the ready-to-go concatenated scripts should be published instead.

With this NPMignore setting, the only files that should be present once published to NPM should be the compiles js in dist, the npmignore, the changelog, the readme, license, and package.json.

@rnicholus
Copy link

rnicholus commented Jan 6, 2015

It would be great if angular-bootstrap could be published to npm. Looks like mostly everything is in place here. Any idea when this can be published to npm?

@maxkorp
Copy link
Contributor Author

maxkorp commented Jan 6, 2015

It seems all of the angular-ui stuff using a specific publishing schema. I want to modify that to support publishing to NPM as well, but I jjust havent had the time.

See here: angular-ui/ui-layout#71

@rnicholus
Copy link

rnicholus commented Jan 6, 2015

It will probably be easiest if someone just forks this project and publishes it to npm. I may do that in the near future in fact (unless someone beat me to it).

@maxkorp
Copy link
Contributor Author

maxkorp commented Jan 6, 2015

Possibly, but there are a number of useful modules on here, and forking a bunch of them just to have publishable versions seems unnecessarily complicated. Short term easiest, yes, but long term certainly not ideal, unless theres pushback to allowing the publishing via the custom platform.

@rnicholus
Copy link

rnicholus commented Jan 6, 2015

Hmm, I guess I'm not familiar with this "custom platform" for publishing.

@maxkorp
Copy link
Contributor Author

maxkorp commented Jan 6, 2015

See here: angular-ui/ui-layout#72 (comment)

Here is the repo that handles their publishing code: https://github.com/angular-ui/angular-ui-publisher

@maxkorp maxkorp mentioned this pull request Jan 8, 2015
@maxkorp
Copy link
Contributor Author

maxkorp commented Jan 8, 2015

@wesleycho wesleycho force-pushed the angular-ui:master branch from e373941 to 2c2dba6 Mar 23, 2015
@wesleycho wesleycho added this to the 0.13.2 (1.4 support) milestone Jul 30, 2015
@wesleycho wesleycho closed this in 27f7ca2 Jul 30, 2015
tmcgee123 pushed a commit to tmcgee123/bootstrap that referenced this pull request Aug 10, 2015
- Build in support for npm consumption for users
- Improve efficiency of travis tasks

Closes angular-ui#3108
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.