Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Modify resources for publishing to npm. #3108

Closed
wants to merge 3 commits into from
Closed

Modify resources for publishing to npm. #3108

wants to merge 3 commits into from

Conversation

maxkorp
Copy link
Contributor

@maxkorp 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

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

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

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

For reference: angular-ui/angular-ui-publisher#3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

install via npm
4 participants