projectinfo/ts/index.ts

22 lines
535 B
TypeScript
Raw Normal View History

2018-09-02 12:21:05 +00:00
import plugins = require('./projectinfo.plugins');
2016-11-26 13:45:56 +00:00
// direct access to classes
2018-09-02 12:21:05 +00:00
export * from './projectinfo.classes.git';
export * from './projectinfo.classes.npm';
export * from './projectinfo.classes.projectinfo';
2016-11-26 13:45:56 +00:00
// npm
2018-09-02 12:21:05 +00:00
import { ProjectinfoNpm } from './projectinfo.classes.npm';
2016-02-20 04:05:07 +00:00
2016-11-26 13:45:56 +00:00
// quick functions
/**
* gets the name from package.json in a specified directory
*/
2018-09-02 12:21:05 +00:00
export let getNpmNameForDir = function(cwdArg) {
let localNpm = new ProjectinfoNpm(cwdArg);
if (localNpm.status === 'ok') {
return localNpm.name;
}
};