Git Product home page Git Product logo

Comments (8)

moritz-h avatar moritz-h commented on August 11, 2024 1

Ok seems not to hard. I can try making a PR.
Infos from:
http://ljn.io/posts/publishing-typescript-projects-with-npm/
https://www.twilio.com/blog/2017/06/writing-a-node-module-in-typescript.html
https://stackoverflow.com/questions/30928253/writing-npm-modules-in-typescript

from ng-trim-value-accessor.

moritz-h avatar moritz-h commented on August 11, 2024

Found some more infos:
The problem could be that you are providing .ts files in the npm package.
See the second half of this comment:

So we don't really support using incorrectly packaged libraries with TS sources. It's something you do at your risk.
angular/angular-cli#8284 (comment)

from ng-trim-value-accessor.

moritz-h avatar moritz-h commented on August 11, 2024

I can now confirm the *.ts files in the library as error source.
As quick check I tried the following:

clone your repo
npm install
npm install --save-dev @types/es6-shim (needed for build)
npm run build
copy the dist/ folder to my-app/node_modules/ng-trim-value-accessor/

My app then builds without problems.

from ng-trim-value-accessor.

khashayar avatar khashayar commented on August 11, 2024

Thanks for the report and rundown. Do you mind submitting a PR for that?

from ng-trim-value-accessor.

moritz-h avatar moritz-h commented on August 11, 2024

I don't know if I can help with this. I have no experience in creating modules or in publishing anything on npm yet. I only know, that providing .ts files in a module is wrong from the above linked comment.
So it must be something like "compile before uploading it to npm", but how exactly to do this is the question :-)

from ng-trim-value-accessor.

khashayar avatar khashayar commented on August 11, 2024

@moritz-h Can you please verify whether the latest version works for you?

from ng-trim-value-accessor.

moritz-h avatar moritz-h commented on August 11, 2024

@khashayar Looks good. ng serve runs now also without --aot. In node_module/ng-trim-value-accessor/ are now only the .js and .d.ts files. No other .ts sources. 👍

from ng-trim-value-accessor.

khashayar avatar khashayar commented on August 11, 2024

Great! Thanks for the PR!

from ng-trim-value-accessor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.