marcj / angular2-localstorage

Angular 2+ decorator to save and restore variables/class properties to HTML5 LocalStorage automatically.
302 stars 108 forks source link

What you published to npmjs seems messy and wrong. 0.0.19 #65

Closed sunshineo closed 7 years ago

sunshineo commented 7 years ago

It included .d.ts files which is great. But it also included .ts files. messy

The result is if I try to use typescript to build my project into ES6/ES2015, I got errors like this:

error TS6059: File '/Users/gordon/workspace/CraigsMenu/web/node_modules/angular-2-local-storage/src/ILocalStorageEvent.ts' is not under 'rootDir' '/Users/gordon/workspace/CraigsMenu/web/app'. 'rootDir' is expected to contain all source files.

error TS6059: File '/Users/gordon/workspace/CraigsMenu/web/node_modules/angular-2-local-storage/src/ILocalStorageServiceConfig.ts' is not under 'rootDir' '/Users/gordon/workspace/CraigsMenu/web/app'. 'rootDir' is expected to contain all source files.

error TS6059: File '/Users/gordon/workspace/CraigsMenu/web/node_modules/angular-2-local-storage/src/INotifyOptions.ts' is not under 'rootDir' '/Users/gordon/workspace/CraigsMenu/web/app'. 'rootDir' is expected to contain all source files.

error TS6059: File '/Users/gordon/workspace/CraigsMenu/web/node_modules/angular-2-local-storage/src/LocalStorageService.ts' is not under 'rootDir' '/Users/gordon/workspace/CraigsMenu/web/app'. 'rootDir' is expected to contain all source files.

error TS6059: File '/Users/gordon/workspace/CraigsMenu/web/node_modules/angular-2-local-storage/src/LocalStorageServiceConfig.ts' is not under 'rootDir' '/Users/gordon/workspace/CraigsMenu/web/app'. 'rootDir' is expected to contain all source files.

My tsconfig.json file looks like this:

{
  "compilerOptions": {
    "target": "es2015",
    "module": "es2015",
    "moduleResolution": "node",
    "declaration": false,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "pretty": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "noImplicitReturns": true,
    "noImplicitUseStrict": false,
    "noFallthroughCasesInSwitch": true,
    "outDir": "./dist",
    "rootDir": "./app"
  },
  "compileOnSave": false,
  "files": [
    "app/main.ts"
  ]
}

The build command is simply: tsc -p tsconfig.json

sunshineo commented 7 years ago

Sorry. Wrong repo