fix npmextra.json not present error

This commit is contained in:
Philipp Kunz 2016-09-25 13:12:16 +02:00
parent d5fea19831
commit 00855e3d63
5 changed files with 10 additions and 4 deletions

View File

@ -5,7 +5,7 @@ export declare class Npmextra {
cwd: string;
lookupPath: string;
npmextraJsonExists: boolean;
npmextraJsonData: boolean;
npmextraJsonData: any;
/**
* creates instance of Npmextra
*/

View File

@ -58,7 +58,10 @@ class Npmextra {
if (this.npmextraJsonExists) {
this.npmextraJsonData = plugins.smartfile.fs.toObjectSync(this.lookupPath);
}
else {
this.npmextraJsonData = {};
}
}
}
exports.Npmextra = Npmextra;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZXh0cmEuY2xhc3Nlcy5ucG1leHRyYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWV4dHJhLmNsYXNzZXMubnBtZXh0cmEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDhDQUE2QztBQUM3QywwQ0FBeUM7QUFFekM7O0dBRUc7QUFDSDtJQU1JOztPQUVHO0lBQ0gsWUFBWSxNQUFlO1FBQ3ZCLEVBQUUsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDVCxJQUFJLENBQUMsR0FBRyxHQUFHLE1BQU0sQ0FBQTtRQUNyQixDQUFDO1FBQUMsSUFBSSxDQUFDLENBQUM7WUFDSixJQUFJLENBQUMsR0FBRyxHQUFHLEtBQUssQ0FBQyxHQUFHLENBQUE7UUFDeEIsQ0FBQztRQUNELElBQUksQ0FBQyxlQUFlLEVBQUUsQ0FBQTtRQUN0QixJQUFJLENBQUMsdUJBQXVCLEVBQUUsQ0FBQTtRQUM5QixJQUFJLENBQUMscUJBQXFCLEVBQUUsQ0FBQTtJQUNoQyxDQUFDO0lBRUQ7O09BRUc7SUFDSCxPQUFPLENBQWMsV0FBbUIsRUFBRSxpQkFBc0I7UUFDNUQsSUF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RUFBRSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUE7UUFDOUUsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ0osSUFBSSxDQUFDLGdCQUFnQixHQUFHLEVBQUUsQ0FBQTtRQUM5QixDQUFDO0lBQ0wsQ0FBQztDQUVKO0FBL0RELDRCQStEQyJ9

1
npmextra.json Normal file
View File

@ -0,0 +1 @@
{}

View File

@ -47,7 +47,7 @@ export class KeyValueStore {
* computes the identity
*/
private initIdentity(identityStringArg: string) {
}
/**

View File

@ -8,7 +8,7 @@ export class Npmextra {
cwd: string
lookupPath: string
npmextraJsonExists: boolean
npmextraJsonData: boolean
npmextraJsonData: any
/**
* creates instance of Npmextra
@ -62,6 +62,8 @@ export class Npmextra {
private checkNpmextraJsonData() {
if (this.npmextraJsonExists) {
this.npmextraJsonData = plugins.smartfile.fs.toObjectSync(this.lookupPath)
} else {
this.npmextraJsonData = {}
}
}