@appsemble/cli
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -42,3 +42,3 @@ const path = require('path'); | ||
version: config.version, | ||
resources: await readResources(), | ||
resources: await readResources(project), | ||
files: await readFiles(buildDir), | ||
@@ -45,0 +45,0 @@ permissions: config.permissions, |
@@ -13,14 +13,15 @@ const path = require('path'); | ||
*/ | ||
module.exports = async function readResources() { | ||
module.exports = async function readResources(projectDir) { | ||
const result = {}; | ||
if (!fs.existsSync('resources')) { | ||
const resourcesDir = path.join(projectDir, 'resources'); | ||
if (!fs.existsSync(resourcesDir)) { | ||
return result; | ||
} | ||
const stat = await fs.stat('resources'); | ||
const stat = await fs.stat(resourcesDir); | ||
if (!stat.isDirectory) { | ||
return result; | ||
} | ||
const files = await fs.readdir('resources'); | ||
const files = await fs.readdir(resourcesDir); | ||
await Promise.all(files.map(async (filename) => { | ||
const { config, filepath } = await explorer.load(null, path.join('resources', filename)); | ||
const { config, filepath } = await explorer.load(null, path.join(resourcesDir, filename)); | ||
log.info('Read resource from', filepath); | ||
@@ -27,0 +28,0 @@ result[path.parse(filename).name] = config; |
{ | ||
"name": "@appsemble/cli", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A CLI for the Appsemble extension platform", | ||
@@ -5,0 +5,0 @@ "homepage": "https://www.appsemble.com", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11371
316
0