Publish TypeScript declarations to NPM
See original GitHub issueNow that 10.0 is released and the JavaScript docs are up-to-date, it would be great if the TypeScript declarations could be published to NPM. For now, in my own projects, I just copied said file into my project, but that’s a bit hard to update and maintain. If it were published on NPM, people could then just
- npm install -D primefaces
and add
/// <reference types="primefaces" />
to the top of their file to (a) enjoy auto completion and (b) type checking.
- There’s a script and maven profile for publishing to NPM, see the readme.
- For now I set the package name
primefaces
. This does not exist yet on NPM, but we could also use another name. - @melloware I think you did ask PrimeTek about this? Did they say anthing about this?
Also note, the publish maven profile reads the version from the pom, which is now 11, so we need to specifiy the version explicitly:
mvn org.codehaus.mojo:build-helper-maven-plugin:parse-version \
com.github.eirslett:frontend-maven-plugin:npm@publish-to-npm \
"-Dnpm.token=token" \
-DparsedVersion.majorVersion=10 \
-DparsedVersion.minorVersion=0
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Documentation - Publishing - TypeScript
There are two main ways you can publish your declaration files to npm: ... Both TypeScript and JavaScript projects can generate types via...
Read more >The 30-second guide to publishing a TypeScript package to ...
The 30-second guide to publishing a TypeScript package to NPM · 1. Add "declaration": true to the compilerOptions of your tsconfig.json · 2....
Read more >Build and publish an NPM Typescript package | Codementor
Use -y for default values. Add typescript dev dependency to your project. devDependencies will only be installed when you run npm install, but ......
Read more >How to publish TypeScript package to NPM
How to publish TypeScript package to NPM · Write some code · tsconfig.json · Set up Rollup · Build code and publish package...
Read more >Including declarations in your npm package - TypeScript
There are two main ways you can publish your declaration files to npm: ... If your package is written in TypeScript then the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep I was in a cleaned directory. OK its published!
See: https://www.npmjs.com/package/primefaces
Awesome, looks great. I’ll give it a try later.