diff --git a/.npmignore b/.npmignore index f9680ba..0d09332 100644 --- a/.npmignore +++ b/.npmignore @@ -4,6 +4,10 @@ node_modules/ coverage/ test/ typings/ +src/ +tsconfig.json +tslint.json +typings.json npm-debug.log .eslintrc @@ -12,3 +16,6 @@ npm-debug.log .travis.yml CONTRIBUTING.md + +*.spec.js +*.spec.ts diff --git a/package.json b/package.json index 8e83b78..052585e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "description": "Bot Core package to run bots", "main": "lib/index.js", "typings": "lib/index.d.ts", + "files": [ + "lib" + ], "scripts-info": { "info": "List available scripts", "build": "Builds the plugin, by cleaning and compiling TypesScript into Javascript", diff --git a/src/loader.ts b/src/loader.ts index 77abf31..f5022c3 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -33,8 +33,7 @@ export class PluginLoader { protected requireLibrary(libpath: string): BotBuilder.Library { let lib = require(libpath).default as BotBuilder.Library; - // XXX this validation could be improved checking that lib instanceof BotBuilder.Library - if (!lib.name) { + if (!(lib instanceof BotBuilder.Library)) { logger.warn(`Skip plugin at ${libpath}: not a valid Library`); return null; }