Skip to content

Commit

Permalink
cli: port to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
dmstern committed Nov 26, 2018
1 parent 7602c0d commit bf99d6d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
/tmp
/package-cache
/dist.zip
/bin/cli.js

# local env files
.env.local
Expand Down
9 changes: 6 additions & 3 deletions bin/cli.js → bin/cli.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/env node
//==============================================================
const exec = require('child_process').exec;
const path = require('path');
// =============================================================

import * as childProcess from 'child_process';
const exec = childProcess.exec;
import * as path from 'path';
// tslint:disable-next-line:no-var-requires
const pm2Config = require('../pm2.config');
const port = pm2Config.serveUIStatic.env.PM2_SERVE_PORT;
const logFiles = {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"copy": "cp-cli server/mock dist/server/mock",
"lint": "vue-cli-service lint && tslint src/**/*.ts types/**/*.ts server/**/*.ts",
"prettier": "prettier src/**/* types/**/* server/**/* --write",
"compile": "npm run lint && cd server && tsc",
"compile": "npm run lint && tsc bin/cli.ts && cd server && tsc",
"compile:watch": "cd server && tsc --watch",
"build": "npm run compile && npm run copy && vue-cli-service build --dest dist/webui",
"logs": "pm2 logs /frog-.*/",
Expand Down Expand Up @@ -86,7 +86,7 @@
".sample.npmfrogrc.json",
"pm2.config.js",
"pm2.prod.config.js",
"bin"
"bin/cli.js"
],
"bin": {
"npmfrog": "bin/cli.js"
Expand Down

0 comments on commit bf99d6d

Please sign in to comment.