Update paths

This commit is contained in:
Ibby Hadeed
2017-12-28 07:40:57 -05:00
parent c22ac6d681
commit 75675ea19f
12 changed files with 10874 additions and 17 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import { camelCase, clone } from 'lodash';
export const ROOT = path.resolve(__dirname, '../../');
export const TS_CONFIG = clone(require(path.resolve(ROOT, 'tsconfig.json')));
export const COMPILER_OPTIONS = TS_CONFIG.compilerOptions;
export const PLUGINS_ROOT = path.join(ROOT, 'src/plugins/');
export const PLUGINS_ROOT = path.join(ROOT, 'src/@ionic-native/plugins/');
export const PLUGIN_PATHS = fs.readdirSync(PLUGINS_ROOT).map(d => path.join(PLUGINS_ROOT, d, 'index.ts'));
export function getDecorator(node: ts.Node, index: number = 0): ts.Decorator {
+1 -1
View File
@@ -32,7 +32,7 @@ export function getProgram(rootNames: string[] = createSourceFiles()) {
// hacky way to export metadata only for core package
export function transpileNgxCore() {
getProgram([path.resolve(ROOT, 'src/core/index.ts')]).emit({
getProgram([path.resolve(ROOT, 'src/@ionic-native/core/index.ts')]).emit({
emitFlags: EmitFlags.Metadata,
emitCallback: ({ program, writeFile, customTransformers, cancellationToken, targetSourceFile }) =>
program.emit(targetSourceFile, writeFile, cancellationToken, true, customTransformers)
@@ -23,7 +23,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/plugins') > -1) {
if (tsSourceFile.fileName.indexOf('src/@ionic-native/plugins') > -1) {
ts.visitEachChild(tsSourceFile, node => {
if (node.kind !== ts.SyntaxKind.ClassDeclaration) {
return node;
+1 -1
View File
@@ -55,7 +55,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/plugins') > -1)
if (tsSourceFile.fileName.indexOf('src/@ionic-native/plugins') > -1)
return transformClasses(tsSourceFile, ctx, ngcBuild);
return tsSourceFile;