mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
chore(repo): move files to new repo name
This commit is contained in:
@@ -24,7 +24,7 @@ export const EMIT_PATH = path.resolve(ROOT, 'injectable-classes.json');
|
||||
export function extractInjectables() {
|
||||
return (ctx: ts.TransformationContext) => {
|
||||
return tsSourceFile => {
|
||||
if (tsSourceFile.fileName.indexOf('src/@ionic-native/plugins') > -1) {
|
||||
if (tsSourceFile.fileName.indexOf('src/@awesome-cordova-plugins/plugins') > -1) {
|
||||
ts.visitEachChild(
|
||||
tsSourceFile,
|
||||
node => {
|
||||
|
||||
@@ -10,12 +10,12 @@ function transformImports(file: ts.SourceFile, ctx: ts.TransformationContext, ng
|
||||
);
|
||||
}
|
||||
|
||||
// find the @ionic-native/core import statement
|
||||
// find the @awesome-cordova-plugins/core import statement
|
||||
const importStatement = (file.statements as any).find((s: any) => {
|
||||
return s.kind === ts.SyntaxKind.ImportDeclaration && s.moduleSpecifier.text === '@ionic-native/core';
|
||||
return s.kind === ts.SyntaxKind.ImportDeclaration && s.moduleSpecifier.text === '@awesome-cordova-plugins/core';
|
||||
});
|
||||
|
||||
// we're only interested in files containing @ionic-native/core import statement
|
||||
// we're only interested in files containing @awesome-cordova-plugins/core import statement
|
||||
if (!importStatement) return file;
|
||||
|
||||
const decorators: string[] = [];
|
||||
|
||||
@@ -63,7 +63,7 @@ function transformClasses(file: ts.SourceFile, ctx: ts.TransformationContext, ng
|
||||
export function pluginClassTransformer(ngcBuild?: boolean): ts.TransformerFactory<ts.SourceFile> {
|
||||
return (ctx: ts.TransformationContext) => {
|
||||
return tsSourceFile => {
|
||||
if (tsSourceFile.fileName.indexOf('src/@ionic-native/plugins') > -1)
|
||||
if (tsSourceFile.fileName.indexOf('src/@awesome-cordova-plugins/plugins') > -1)
|
||||
return transformClasses(tsSourceFile, ctx, ngcBuild);
|
||||
return tsSourceFile;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user