How to use @teleporthq/teleport-publisher-disk - 1 common examples

To help you get started, we’ve selected a few @teleporthq/teleport-publisher-disk 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 teleporthq / teleport-code-generators / packages / teleport-test / src / packer.ts View on Github external
const templates: Record = {
  react: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, REACT_GITHUB_PROJECT),
  reactnative: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, REACTNATIVE_GITHUB_PROJECT),
  next: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, NEXT_GITHUB_PROJECT),
  vue: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, VUE_GITHUB_PROJECT),
  nuxt: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, NUXT_GITHUB_PROJECT),
  preact: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, PREACT_GITHUB_PROJECT),
  stencil: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, STENCIL_GITHUB_PROJECT),
  angular: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, ANGULAR_GITHUB_PROJECT),
  preactCodesandbox: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, PREACT_CODESANDBOX_PROJECT),
  gridsome: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, GRIDSOME_GITHUB_PROJECT),
  gatsby: getGithubRemoteDefinition(GITHUB_TEMPLATE_OWNER, GATSBY_GITHUB_PROJECT),
}

const publisher = createDiskPublisher({
  outputPath: 'dist',
})

const packProject = async (projectType: string) => {
  const remoteTemplate = templates[projectType] as RemoteTemplateDefinition

  remoteTemplate.auth = {
    token: config.token,
  }

  const packer = createProjectPacker()
  packer.setPublisher(publisher)
  packer.setGenerator(generators[projectType])
  await packer.loadRemoteTemplate(remoteTemplate)

  const result = await packer.pack((projectUIDL as unknown) as ProjectUIDL)

@teleporthq/teleport-publisher-disk

Project disk publisher

MIT
Latest version published 1 month ago

Package Health Score

82 / 100
Full package analysis

Popular @teleporthq/teleport-publisher-disk functions

Similar packages