Closed DanielRosenwasser closed 8 years ago
Thanks, this is the first time i'm publishing a module. I did do some reading, but i figured it would be better to leave it in typescript so that if users want to modify some behavior or read the source they could so so with non-generated code (maybe im better pointing package.json to js and leaving the ts in src?). Also, i published typings simply to include the vue typings, but i guess i should leave that up to the user.
I was planning on working on it today, so ill make fixing these issues my first priority, if you wouldn't mind, once i get them fixed in a few hours, could you check it over a second time and let me know if it makes more sense? Thanks!
So I've followed your advice and changed a few things:
the module folder will now look like this:
vue-typescript /lib - precompiled js, definitons and sourcemaps /src - source typescript files, so user can inspect the code .npmignore LICENSE package.json README.md
I'm debating leaving typings.json and my tsconfig file so that if users want to make quick fixes, they can run typings install
and npm run build
to apply the fixes they made to the source files.
If i forgot anything or you still see issues with the package let me know. I'll probably be working on adding @Watch tonight and writing better tests for @Props
Thanks again for pointing this out
I'll be closing this for now, feel free to open it up again if you spot anything
Looks right as far as I can tell, and it looks like people have been having a great experience so far. Thanks for the work here!
Hey there!
I noticed a few things that looked like issues in terms of publishing TypeScript to npm.
.ts
files instead of.js
and.d.ts
, so your users are being forced to compile innode_modules
(which isn't great for.js
users).index.ts
, but TypeScript only automatically looks attypings
(and in 2.0,types
).typings
folder (and have it committed in git too). This can cause issues if other users have their own versions ofnode.d.ts
Here's a page with a little bit of detail, though it should be getting fleshed out more: https://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html
Let me know if you need any help!