0

I'd like to keep source (/ts/**/*.ts) files only in remote git repo, and transpilation results (/js/**/*.js) - only in resulting npm package.
In order to achieve that I've added these entries in ignore-files:

.gitignore

/js
...

.npmignore

/ts

Remote repository doesn't contain /js folder, so .gitignore works fine.
But it looks like entry in .npmignore doesn't work, because I get /ts folder with its contents on npm i <package>.

What am I doing wrong?

4

1 回答 1

1

Although I still didn't get the point of the issue, some of these helped:

  • re-clone the repo from scratch into another folder
  • run npm doctor
  • change entry in .npmignore to ./ts

So now the /ts folder is not being downloaded on npm i <package> and no fatal error occur.

于 2017-07-16T10:05:43.460 回答