Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Fix NPM release #154

Closed
tomwayson opened this issue Nov 18, 2015 · 6 comments
Closed

Fix NPM release #154

tomwayson opened this issue Nov 18, 2015 · 6 comments
Assignees
Milestone

Comments

@tomwayson
Copy link
Member

At first I was noticing that after running npm install angular-esri-map all that I would see under node_modules/angular-esri-map is index.html and bower_components - wat???

See: https://twitter.com/tomwayson/status/666988609560539136

So I ran npm publish and now after running npm install angular-esri-map I get a blank folder.

Ugggggggggggggghhhhhhhhhhh!!!

@tomwayson
Copy link
Member Author

the plot thickens

npm installs are indeed installing files on other machines. Blank folder above was related to issue in my env (which uses npm link).

However, there is no dist folder in the install. That is why this doesn't work:

https://npmcdn.com/[email protected]/dist/angular-esri-map.js

But this does:

https://npmcdn.com/[email protected]/src/core/esriLoader.js

However, since I'm using roughly the same build script as esri-leaflet, I'd expect these to fail:

https://npmcdn.com/[email protected]/dist/esri-leaflet.js
https://npmcdn.com/[email protected]/dist/esri-leaflet.js

But they work.

@tomwayson
Copy link
Member Author

Furthermore, the dist folder and all files are in that release on GH:

https://npmcdn.com/[email protected]/src/core/esriLoader.js

@tomwayson
Copy link
Member Author

Booyah - I think it's this:

https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package

Need to try adding a an .npmignore file. Looks like the way esri-leaflet does it is by including everything that .gitignore has except dist.

@tomwayson tomwayson modified the milestone: v1 Nov 18, 2015
@tomwayson
Copy link
Member Author

Should be fixed in 8f60281. Need to publish a new version to test.

@tomwayson tomwayson self-assigned this Nov 18, 2015
@tomwayson tomwayson modified the milestones: v1, RC2 Nov 23, 2015
@tomwayson
Copy link
Member Author

Looks like RC2 release didn't include the dist folder either. I can't figure out why? It wasn't even on my local file system after running the release script (which errored out as usual).

@tomwayson tomwayson changed the title Fix NPM install Fix NPM release Nov 23, 2015
@tomwayson
Copy link
Member Author

For future reference, the second issue (dist folder not on local file system or in release) was due to gulp build being run in the gh-release branch. It needs to be run a second time after the script switches back to the master branch just before publishing.

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

No branches or pull requests

1 participant