From 869eb79fafe7a5d6dd87f10e075192a06e1ba358 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sun, 29 Nov 2020 21:25:17 +0200 Subject: [PATCH] move build before detection --- README.md | 5 +++-- src/squeebot.ts | 10 +++++----- tslint.json | 38 +++++--------------------------------- 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index bd5bc07..2967d49 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The primary configuration will be located in `/configs/squeebot.json`. ## Installing plugins In order to install plugins, you have to add a repository. Repositories are JSON files served over HTTP. -For example, installing core plugins (Interactive mode `-i` on `squeebotd`): +For example, installing core plugins (Interactive mode `-i` on `squeebotd`): 1. `repository install https://(TODO)/repository.json` 2. `plugin install control mqtt` 3. `plugin list` @@ -51,6 +51,7 @@ Plugin manifest (`plugin.json`) example: "name": "plugin-name", // The name of your plugin, must match the name of the directory "version": "0.0.0", // The version of your plugin, must be semantic versioning! "description": "", // Optional description for this plugin + "tags": [], // Optional list of tags describing this plugin "dependencies": [], // List of plugins this plugin depends on "npmDependencies": [], // List of npm modules this plugin depends on. Supports versions, example 'thing@1.0.0' } @@ -60,4 +61,4 @@ Plugin manifest (`plugin.json`) example: You can configure deployment options using a file called `deployment.json` in your repository root. Currently supported deployment methods: 1. TODO! -In order to activate your configured deployment, use the `-d` flag when building your repository. `-o` flag skips build and deploys immediately. \ No newline at end of file +In order to activate your configured deployment, use the `-d` flag when building your repository. `-o` flag skips build and deploys immediately. diff --git a/src/squeebot.ts b/src/squeebot.ts index 9af29e5..01df80e 100644 --- a/src/squeebot.ts +++ b/src/squeebot.ts @@ -217,6 +217,11 @@ async function buildRepository( } } + if (meta.typescript) { + console.log('Running build task..'); + await execute(['npm', 'run', 'build'], location); + } + console.log('Detecting plugins in this environment..'); const loader = new PluginMetaLoader(env); @@ -237,11 +242,6 @@ async function buildRepository( meta.plugins = savedList; await fs.writeJson(buildMetaFile, meta, { spaces: 2 }); - if (meta.typescript) { - console.log('Running build task..'); - await execute(['npm', 'run', 'build'], location); - } - if (!out) { console.log('Done!'); return; diff --git a/tslint.json b/tslint.json index 97a7a7f..9f05d30 100644 --- a/tslint.json +++ b/tslint.json @@ -14,10 +14,6 @@ "severity": "warning" }, "eofline": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], "import-spacing": true, "indent": { "options": [ @@ -70,7 +66,6 @@ "always" ] }, - "forin": false, "space-before-function-paren": { "options": { "anonymous": "never", @@ -84,6 +79,10 @@ true, "call-signature" ], + "forin": false, + "ban-types": { + "function": false + }, "typedef-whitespace": { "options": [ { @@ -118,33 +117,6 @@ "check-type", "check-typecast" ] - }, - "component-class-suffix": true, - "contextual-lifecycle": true, - "directive-class-suffix": true, - "no-conflicting-lifecycle": true, - "no-host-metadata-property": true, - "no-input-rename": true, - "no-inputs-metadata-property": true, - "no-output-native": true, - "no-output-on-prefix": true, - "no-output-rename": true, - "no-outputs-metadata-property": true, - "template-banana-in-box": true, - "template-no-negated-async": true, - "use-lifecycle-interface": true, - "use-pipe-transform-interface": true, - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ] + } } }