How to use the @nstudio/xplat.getDefaultTemplateOptions function in @nstudio/xplat

To help you get started, we’ve selected a few @nstudio/xplat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nstudio / xplat / packages / nativescript / src / schematics / helpers / imports / index.ts View on Github external
function addHelperFiles(options: IHelperSchema): Rule {
  // executed from 'helpers' directory so ensure _files are loaded relative
  const xplatFolderName = XplatHelpers.getXplatFoldername('nativescript');
  return branchAndMerge(
    mergeWith(
      apply(url(`./imports/_files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions()
        }),
        move(`xplat/${xplatFolderName}/utils`)
      ])
    )
  );
}
github nstudio / xplat / packages / electron-angular / src / schematics / application / index.ts View on Github external
function addAppFiles(
  options: XplatElectrontHelpers.SchemaApp,
  appPath: string
): Rule {
  const appname = getAppName(options, 'electron');
  const directory = options.directory ? `${options.directory}/` : '';
  return branchAndMerge(
    mergeWith(
      apply(url(`./_files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions(),
          appname,
          xplatFolderName: XplatHelpers.getXplatFoldername(
            'electron',
            'angular'
          )
        }),
        move(`apps/${directory}${appPath}`)
      ])
    )
  );
}
github nstudio / xplat / packages / electron / src / schematics / application / index.ts View on Github external
function addAppFiles(
  options: XplatElectrontHelpers.SchemaApp,
  appPath: string
): Rule {
  const appname = getAppName(options, 'electron');
  const directory = options.directory ? `${options.directory}/` : '';
  return branchAndMerge(
    mergeWith(
      apply(url(`./_files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions(),
          appname,
          xplatFolderName: XplatHelpers.getXplatFoldername('electron')
        }),
        move(`apps/${directory}${appPath}`)
      ])
    )
  );
}
github nstudio / xplat / packages / angular / src / schematics / application / index.ts View on Github external
function addAppFiles(options: Schema, extra: string = ''): Rule {
  extra = extra ? `${extra}_` : '';
  const directory = options.directory ? `${options.directory}/` : '';
  return branchAndMerge(
    mergeWith(
      apply(url(`./_${extra}files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions(),
          xplatFolderName: XplatHelpers.getXplatFoldername('web', 'angular')
        }),
        move(`apps/${directory}${options.name}`)
      ])
    )
  );
}
github nstudio / xplat / packages / nativescript / src / schematics / application / index.ts View on Github external
function addAppFiles(
  options: Schema,
  appPath: string,
  extra: string = ''
): Rule {
  extra = extra ? `${extra}_` : '';
  const appname = getAppName(options, 'nativescript');
  const directory = options.directory ? `${options.directory}/` : '';
  return branchAndMerge(
    mergeWith(
      apply(url(`./_${extra}files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions(),
          appname,
          pathOffset: directory ? '../../../' : '../../',
          xplatFolderName: XplatHelpers.getXplatFoldername('nativescript')
        }),
        move(`apps/${directory}${appPath}`)
      ])
    )
  );
}
github nstudio / xplat / packages / ionic / src / schematics / application / index.ts View on Github external
function addAppFiles(options: Schema, appPath: string) {
  const appname = getAppName(options, 'ionic');
  const directory = options.directory ? `${options.directory}/` : '';
  return branchAndMerge(
    mergeWith(
      apply(url(`./_files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions(),
          pathOffset: directory ? '../../../' : '../../',
          appname,
          xplatFolderName: XplatHelpers.getXplatFoldername('ionic')
        }),
        move(`apps/${directory}${appPath}`)
      ])
    )
  );
}
github nstudio / xplat / packages / angular / src / schematics / elements / index.ts View on Github external
function addFiles(options: ElementsOptions, extra: string = ''): Rule {
  extra = extra ? `${extra}_` : '';
  const xplatFolderName = XplatHelpers.getXplatFoldername('web', 'angular');
  return branchAndMerge(
    mergeWith(
      apply(url(`./_${extra}files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions(),
          name: options.name.toLowerCase(),
          xplatFolderName,
          customElementList,
          componentSymbolList,
          componentSymbols,
          htmlElements
        }),
        move(`xplat/${xplatFolderName}/elements`)
      ])
    )
  );
}
github nstudio / xplat / packages / nativescript-angular / src / schematics / application / index.ts View on Github external
function addAppFiles(
  options: Schema,
  appPath: string,
  extra: string = ''
): Rule {
  extra = extra ? `${extra}_` : '';
  const appname = getAppName(options, 'nativescript');
  const directory = options.directory ? `${options.directory}/` : '';
  return branchAndMerge(
    mergeWith(
      apply(url(`./_${extra}files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions(),
          appname,
          pathOffset: directory ? '../../../' : '../../',
          xplatFolderName: XplatHelpers.getXplatFoldername(
            'nativescript',
            'angular'
          )
        }),
        move(`apps/${directory}${appPath}`)
      ])
    )
  );
}