BREAKING CHANGE(core): switch to ESM
This commit is contained in:
10
ts/index.ts
10
ts/index.ts
@ -1,12 +1,12 @@
|
||||
import plugins = require('./projectinfo.plugins');
|
||||
import * as plugins from './projectinfo.plugins.js'
|
||||
|
||||
// direct access to classes
|
||||
export * from './projectinfo.classes.git';
|
||||
export * from './projectinfo.classes.npm';
|
||||
export * from './projectinfo.classes.projectinfo';
|
||||
export * from './projectinfo.classes.git.js';
|
||||
export * from './projectinfo.classes.npm.js';
|
||||
export * from './projectinfo.classes.projectinfo.js';
|
||||
|
||||
// npm
|
||||
import { ProjectinfoNpm } from './projectinfo.classes.npm';
|
||||
import { ProjectinfoNpm } from './projectinfo.classes.npm.js';
|
||||
|
||||
// quick functions
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as plugins from './projectinfo.plugins';
|
||||
import * as plugins from './projectinfo.plugins.js';
|
||||
|
||||
export class ProjectinfoGit {
|
||||
isGit: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import plugins = require('./projectinfo.plugins');
|
||||
import * as plugins from './projectinfo.plugins.js';
|
||||
|
||||
export class ProjectinfoNpm {
|
||||
isNpm: boolean = false;
|
||||
packageJson: any;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as plugins from './projectinfo.plugins';
|
||||
import { ProjectinfoNpm } from './projectinfo.classes.npm';
|
||||
import { ProjectinfoGit } from './projectinfo.classes.git';
|
||||
import * as plugins from './projectinfo.plugins.js';
|
||||
import { ProjectinfoNpm } from './projectinfo.classes.npm.js';
|
||||
import { ProjectinfoGit } from './projectinfo.classes.git.js';
|
||||
export type TProjectType = 'git' | 'npm';
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user