Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
fix: cli template
Browse files Browse the repository at this point in the history
  • Loading branch information
JamilOmar committed Feb 28, 2020
1 parent d6e8a25 commit 4abaf96
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/bin/lsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import fs = require('fs')
import path = require('path')
import {start, init} from "../cli";

const manifestPath = path.join(__dirname, '..', '..', 'package.json');
const manifestPath = path.join(__dirname,'..', '..', '..', 'package.json');
const requiredNodeVersion = JSON.parse(fs.readFileSync(manifestPath).toString()).engines.node;

if (!semver.satisfies(process.versions.node, requiredNodeVersion)) {
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
"commitmsg": "commitlint -e $GIT_PARAMS",
"publish": "tsc",
"pretest": "tsc",
"test": "jasmine JASMINE_CONFIG_PATH=./dist/test/lib/jasmine.json",
"coverage": "istanbul cover jasmine JASMINE_CONFIG_PATH=./dist/test/lib/jasmine.json",
"build": "tsc",
"test": "jasmine JASMINE_CONFIG_PATH=./test/lib/jasmine.json",
"coverage": "istanbul cover jasmine JASMINE_CONFIG_PATH=./test/lib/jasmine.json",
"copytemplates": "cp -r ./templates ./dist",
"build": "tsc && npm run copytemplates",
"watch:build": "tsc --watch",
"snyk-protect": "snyk protect",
"semantic-release": "semantic-release",
Expand Down
3 changes: 2 additions & 1 deletion templates/cli-package/cli/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export function hello() {
desc: 'This is an optional value',
default: 'name',
},
});
}).argv;

// using built-in logging
logger.info('Hello: ' + name);
}
Expand Down
2 changes: 1 addition & 1 deletion test/lib/jasmine.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"spec_dir": "./test/lib/unit",
"spec_dir": "./dist/test/lib/unit",
"spec_files": [
"**/*[sS]pec.js"
],
Expand Down
2 changes: 1 addition & 1 deletion test/lib/unit/bin/lsc_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {getPackageManifest} from "../../../../lib/cli";

describe('LSC', () => {

const cwd = path.join(__dirname, '..', '..', '..', '..');
const cwd = path.join(__dirname,'..', '..', '..', '..', '..');
const binPath = getPackageManifest(cwd).bin.lsc;

it('runs commands', (done: DoneFn) => {
Expand Down

0 comments on commit 4abaf96

Please sign in to comment.