Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM package includes unnecessary files #40

Closed
Layoric opened this issue Aug 11, 2016 · 0 comments
Closed

NPM package includes unnecessary files #40

Layoric opened this issue Aug 11, 2016 · 0 comments
Assignees
Milestone

Comments

@Layoric
Copy link

Layoric commented Aug 11, 2016

Hi @rbuckton ,

Going by the .npmignore file, it seems that the NPM package once installed shouldn't include typings/test folder as well as Reflect.ts and other files which makes sense, however when installing from NPM it does include these files.

image

The only reason I bring this up is due to what I believe to be an issue with TypeScript extension for Visual Studio 2015 when performing a clean/rebuild of a project with TypeScript, it deletes the Reflect.js.

I am using JSPM trying to build a simple Angular 2 demo and whenever I build the project, Reflect.js is deleted from the jspm_packages folder even though tsconfig.json is excluding the jspm_packages folder. I think this is because of the matching Reflect.ts/Reflect.js names where the exclude is being ignored/not working for clean but successfully being ignored for build. This leaves my JSPM project unable to resolve the Reflect.js file as it's been deleted. I can confirm this by renaming Reflect.ts to Reflect_.ts and a clean/rebuild leaves the Reflect.js untouched.

Below is my tsconfig.json for completeness.

{
  "compileOnSave":  true,
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5",
    "module": "commonjs",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "moduleResolution": "node"
  },
  "exclude": [
    "jspm_packages",
    "typings",
    "node_modules",
    "wwwroot"
  ]
}

Reflect.js is untouched by a clean/rebuild if in the node_modules directory, but not so for the jspm_packages directory.

Provided you do want the files ignored, could the .npmignore be updated to remove these files from the npm package? I think the file contents should be:

node_modules
test
typings
Reflect.ts
tsconfig.json

Thanks for the package either way 👍

@rbuckton rbuckton self-assigned this Feb 21, 2017
@rbuckton rbuckton added this to the v0.1.11 milestone Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants