Add "info" command to get information about the local env.

This commit is contained in:
2022-11-24 07:31:29 +02:00
parent 38a2d60f2c
commit 502326fd8d
4 changed files with 563 additions and 579 deletions
Executable
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env node
import {getConfigs} from "./helpers.js";
const {isDev, modulesPath, projectPath, developmentBlockName} = getConfigs();
console.log('----------------------------------\n')
console.log('Local Details', process.versions, '\n');
console.log('Configs', {
isDev,
modulesPath,
projectPath,
developmentBlockName
});
console.log('\n----------------------------------\n')
+544 -567
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -8,6 +8,7 @@
},
"scripts": {
"start": "component-dev",
"info": "node debug.js",
"dev": "NODE_ENV=development NODE_CONFIG_DIR=blocks/text-block/config BLOCK_NAME=text-block node server.js",
"build": "rollup --config rollup.config.js",
"build-platform": "NODE_ENV=development NODE_CONFIG_DIR=blocks/text-block/config BLOCK_NAME=text-block node ./build.js",
@@ -63,6 +64,7 @@
},
"files": [
"helpers.js",
"debug.js",
"layouts/*.hbs",
"layouts/styles/*.css*",
"layouts/scripts/dist/*.js*",
-10
View File
@@ -402,13 +402,3 @@ function handlebarLayoutsPath() {
return path.join(...arguments)
.replace(/\\/g, '/'); // Windows path issue. Fix all "\" for Handlebars.
}
console.log('----------------------------------\n')
console.log('Local Details', process.versions, '\n');
console.log('Configs', {
isDev,
modulesPath,
projectPath,
developmentBlockName
});
console.log('\n----------------------------------\n')