update to meet newest standards
This commit is contained in:
35
ts/index.ts
35
ts/index.ts
@@ -1,20 +1,25 @@
|
||||
import "typings-global"
|
||||
import plugins = require("./projectinfo.plugins");
|
||||
import 'typings-global'
|
||||
import plugins = require('./projectinfo.plugins')
|
||||
|
||||
//npm
|
||||
import {ProjectinfoNpm} from "./projectinfo.classes.npm";
|
||||
export {ProjectinfoNpm} from "./projectinfo.classes.npm";
|
||||
export let npm = function(cwdArg,optionsArg){
|
||||
return new ProjectinfoNpm(cwdArg,optionsArg);
|
||||
};
|
||||
// direct access to classes
|
||||
export * from './projectinfo.classes.git'
|
||||
export * from './projectinfo.classes.npm'
|
||||
export * from './projectinfo.classes.projectinfo'
|
||||
|
||||
//quick functions
|
||||
export let getName = function(cwdArg){
|
||||
var localNpm = new ProjectinfoNpm(cwdArg);
|
||||
if (localNpm.status === "ok"){
|
||||
return localNpm.name;
|
||||
// npm
|
||||
import { ProjectinfoNpm } from './projectinfo.classes.npm'
|
||||
|
||||
// quick functions
|
||||
|
||||
/**
|
||||
* gets the name from package.json in a specified directory
|
||||
*/
|
||||
export let getNpmNameForDir = function(cwdArg){
|
||||
let localNpm = new ProjectinfoNpm(cwdArg)
|
||||
if (localNpm.status === 'ok') {
|
||||
return localNpm.name
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* TODO
|
||||
projectinfo.git = function(){
|
||||
@@ -24,4 +29,4 @@ projectinfo.git = function(){
|
||||
projectinfo.mojo = function(){
|
||||
|
||||
};
|
||||
*/
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user