test-bdk-cli 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/commands/pack.js
CHANGED
|
@@ -67,7 +67,8 @@ function registerPack(program) {
|
|
|
67
67
|
const version = manifest.version || '0.0.0';
|
|
68
68
|
const fmt = (opts.format || 'zip').toLowerCase();
|
|
69
69
|
const outTarget = opts.output || './dist';
|
|
70
|
-
|
|
70
|
+
// Resolve output path relative to source directory, not current working directory
|
|
71
|
+
let outputPath = path_1.default.resolve(sourceDir, outTarget);
|
|
71
72
|
try {
|
|
72
73
|
const stat = fs_1.default.existsSync(outputPath) && fs_1.default.statSync(outputPath);
|
|
73
74
|
if (!stat || stat.isDirectory()) {
|
package/dist/commands/publish.js
CHANGED
|
@@ -26,7 +26,9 @@ function registerPublish(program) {
|
|
|
26
26
|
console.log('No package file given — running `bdk pack` to create archive...');
|
|
27
27
|
try {
|
|
28
28
|
const cliEntry = path_1.default.resolve(__dirname, '../index.js');
|
|
29
|
-
|
|
29
|
+
// Pass sourceArg or sourceDir to pack command
|
|
30
|
+
const sourceArg_str = sourceArg ? `"${sourceArg}"` : '.';
|
|
31
|
+
(0, child_process_1.execSync)(`node "${cliEntry}" pack ${sourceArg_str} --output ./dist --format zip`, { cwd: process.cwd(), stdio: 'inherit' });
|
|
30
32
|
}
|
|
31
33
|
catch (e) {
|
|
32
34
|
console.error('Automatic pack failed; please run `bdk pack` manually or provide --file');
|
package/package.json
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Sample app scaffolded by bdk",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"start": "echo
|
|
7
|
-
"build": "echo
|
|
8
|
-
"test": "echo
|
|
6
|
+
"start": "echo Starting app...",
|
|
7
|
+
"build": "echo Building app...",
|
|
8
|
+
"test": "echo Running tests..."
|
|
9
9
|
},
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "MIT"
|