ng-lib-schematics icon indicating copy to clipboard operation
ng-lib-schematics copied to clipboard

README not copied when building the library

Open caroso1222 opened this issue 7 years ago • 7 comments

The README.md must be copied over to /dist, otherwise the npm registry page will show an empty description. This is bad as the package won't properly appear in searches.

caroso1222 avatar Apr 02 '18 05:04 caroso1222

what about https://github.com/caroso1222/ng-lib-schematics/blob/master/gulpfile.js#L22?

NetanelBasal avatar Apr 02 '18 06:04 NetanelBasal

Good catch, not sure why it's not properly working then, need to debug it thoroughly. By any chance, did it work for you when running npm run build:lib? Maybe you wanted to get rid of the readme file on purpose and I missed it?

caroso1222 avatar Apr 02 '18 06:04 caroso1222

Actually not, I checked it and it does not copy the README file.

NetanelBasal avatar Apr 02 '18 06:04 NetanelBasal

The first link was a mistake, it's the schematics library gulpfile, not the library that uses it. We should check https://github.com/caroso1222/ng-lib-schematics/blob/master/src/lib-standalone/files/lib/path/build-tools/gulpfile.js#L72

NetanelBasal avatar Apr 02 '18 06:04 NetanelBasal

I think I know what the problem is. You are coping the whole lib files but the README file is in the root of the CLI project. You need to copy it from there.

NetanelBasal avatar Apr 02 '18 06:04 NetanelBasal

Yeah, definitely. I'll create a gulp.task('copy:readme') to copy over that file. I was wondering, do you think we'll need to copy LICENSE as well (if applicable)? I've seen it in many node packages within node_modules.

caroso1222 avatar Apr 02 '18 06:04 caroso1222

Yes, it's nice to have.

NetanelBasal avatar Apr 02 '18 06:04 NetanelBasal