Skip to content

Commit

Permalink
fix: fix ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cpselvis committed Nov 21, 2019
1 parent 95bfb85 commit 610f304
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/feflow-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"scripts": {
"start": "npm run build:live",
"build": "tsc",
"build": "rm -rf lib && tsc",
"test": "nyc mocha -r ts-node/register __tests__/**/*.test.ts",
"build:live": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/index.ts",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
Expand Down
2 changes: 1 addition & 1 deletion packages/feflow-cli/src/core/commander/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class Commander {
}

register(name: string, desc: string, fn: Function) {
const c = this.store[name.toLowerCase()] = fn;
this.store[name.toLowerCase()] = fn;
this.alias = abbrev(Object.keys(this.store));
}
};
9 changes: 1 addition & 8 deletions packages/feflow-cli/src/core/devkit/loadDevkits.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import path from 'path';
import Config from './config';

const resolveBuilder = (builderStr: string) => {
const [packageName, builderName] = builderStr.split(':', 2);
if (!builderName) {
throw new Error('No builder name specified.');
}
}

export default function loadDevkits(ctx: any) {
const config = new Config(ctx);
const configData = config.loadConfig();
Expand All @@ -17,7 +10,7 @@ export default function loadDevkits(ctx: any) {
ctx.projectConfig = configData;
for (const cmd in devkit.commands) {
const builderStr = devkit.commands[cmd].builder;
const [packageName, builderName] = builderStr.split(':', 2);
const [packageName] = builderStr.split(':', 2);
const pkgPath = path.join(directoryPath, 'node_modules', packageName);
const kitJson = require(path.join(pkgPath, 'devkit.json'));
const implementation = kitJson.builders[cmd].implementation;
Expand Down
2 changes: 1 addition & 1 deletion packages/feflow-cli/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class Feflow {
'private': true
}, null, 2));
}

resolve();
});
}
Expand Down
2 changes: 0 additions & 2 deletions packages/feflow-cli/src/core/logger/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import bunyan from 'bunyan';
import chalk from 'chalk';
import osenv from 'osenv';
import path from 'path';
import { Writable } from 'stream';

interface IObject {
Expand Down
2 changes: 1 addition & 1 deletion packages/feflow-cli/src/core/native/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = (ctx: any) => {
console.log(str.replace(/\s+$/g, ''));
break;
default:
return null;
return null;
}
});
};
1 change: 0 additions & 1 deletion packages/feflow-cli/src/core/native/install.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import chalk from 'chalk';
import { install } from '../../shared/npm';

module.exports = (ctx: any) => {
Expand Down
1 change: 0 additions & 1 deletion packages/feflow-cli/src/core/plugin/loadPlugins.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import fs from 'fs';
import osenv from 'osenv';
import path from 'path';
import applyPlugins from './applyPlugins';

Expand Down
3 changes: 2 additions & 1 deletion packages/feflow-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"allowJs": true,
"baseUrl": ".",
"moduleResolution": "node",
"rootDir": "src"
"rootDir": "src",
"typeRoots": ["node_modules/@types", "./types"],
},
"exclude": [
"node_modules",
Expand Down
1 change: 1 addition & 0 deletions packages/feflow-cli/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module '@feflow/report';
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"downlevelIteration": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitReturns": false,
"noImplicitThis": true,
"noUnusedLocals": true,
"sourceMap": true,
Expand Down

0 comments on commit 610f304

Please sign in to comment.