move build before detection

This commit is contained in:
Evert Prants 2020-11-29 21:25:17 +02:00
parent 974fe320f0
commit 869eb79faf
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 13 additions and 40 deletions

View File

@ -13,7 +13,7 @@ The primary configuration will be located in `<path>/configs/squeebot.json`.
## Installing plugins ## Installing plugins
In order to install plugins, you have to add a repository. Repositories are JSON files served over HTTP. 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` 1. `repository install https://(TODO)/repository.json`
2. `plugin install control mqtt` 2. `plugin install control mqtt`
3. `plugin list` 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 "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! "version": "0.0.0", // The version of your plugin, must be semantic versioning!
"description": "", // Optional description for this plugin "description": "", // Optional description for this plugin
"tags": [], // Optional list of tags describing this plugin
"dependencies": [], // List of plugins this plugin depends on "dependencies": [], // List of plugins this plugin depends on
"npmDependencies": [], // List of npm modules this plugin depends on. Supports versions, example 'thing@1.0.0' "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: You can configure deployment options using a file called `deployment.json` in your repository root. Currently supported deployment methods:
1. TODO! 1. TODO!
In order to activate your configured deployment, use the `-d` flag when building your repository. `-o` flag skips build and deploys immediately. In order to activate your configured deployment, use the `-d` flag when building your repository. `-o` flag skips build and deploys immediately.

View File

@ -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..'); console.log('Detecting plugins in this environment..');
const loader = new PluginMetaLoader(env); const loader = new PluginMetaLoader(env);
@ -237,11 +242,6 @@ async function buildRepository(
meta.plugins = savedList; meta.plugins = savedList;
await fs.writeJson(buildMetaFile, meta, { spaces: 2 }); await fs.writeJson(buildMetaFile, meta, { spaces: 2 });
if (meta.typescript) {
console.log('Running build task..');
await execute(['npm', 'run', 'build'], location);
}
if (!out) { if (!out) {
console.log('Done!'); console.log('Done!');
return; return;

View File

@ -14,10 +14,6 @@
"severity": "warning" "severity": "warning"
}, },
"eofline": true, "eofline": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true, "import-spacing": true,
"indent": { "indent": {
"options": [ "options": [
@ -70,7 +66,6 @@
"always" "always"
] ]
}, },
"forin": false,
"space-before-function-paren": { "space-before-function-paren": {
"options": { "options": {
"anonymous": "never", "anonymous": "never",
@ -84,6 +79,10 @@
true, true,
"call-signature" "call-signature"
], ],
"forin": false,
"ban-types": {
"function": false
},
"typedef-whitespace": { "typedef-whitespace": {
"options": [ "options": [
{ {
@ -118,33 +117,6 @@
"check-type", "check-type",
"check-typecast" "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"
]
} }
} }