Closed leosvelperez closed 7 years ago
@cstefanache do you mean running ngc on this project? or do you mean running it on an external project using this lib as a dependency when it has no .ts file in the package?
@cstefanache I'll update this PR with other changes to make it work well with AoT and with a cleaner npm package.
@cstefanache I made some updates to the tsconfig-aot.json
file and the npm scripts.
Now, when you do npm run build
you'll have everything compiled to the dist
folder, with all the metadata needed by AoT to work with and the declaration files.
When you do npm run release:patch
(or minor, or major) you'll have all the previous functionalities you were using and in addition, the package.json
will be copied to the dist
folder without the devDependencies
and the scripts
. The README.md
and the LICENSE.md
will also be copied for publishing that folder as the distributable package.
If you don't use any of the npm run release:VERSION
script and you publish it manually just be sure to follow this steps:
npm run build
// Before this step you must change the package version
npm run copy:release
cd dist
npm publish
I tested the generated package on a real application and it worked perfectly with JiT and AoT. I published it just for testing here https://www.npmjs.com/package/ng2-img-cropper-custom, I'll unpublish it later.
Regards!
Thanks!
will release it as 0.8.6
unfortunately this will break AOT compiler. can you please check ngc compilation on pull request. On Fri, 31 Mar 2017 at 22:21, Leosvel Pérez Espinosa < notifications@github.com> wrote: