@socketsupply/next-native

0.0.2 • Public • Published

SYNOPSIS

Next-Natve is a project that makes it possible to build native, cross-platform apps using the Next.js framework.

[!WARNING] This is pre-release software! It requires the dev branch of the socket-runtime. It's only ready for early adopters and potential contributors

USAGE

During pre-release...

# from the socket repo
npm run relink

# from the repo you are working on
npm link @socketsupply/socket

FROM CLI

Use as a command line tool to initialize an existing project as a native app.

$ npm i @socketsupply/next-native -g
$ next-native -h
next-native v0.5.4 (97fa3f7c)

usage:
  next-native [SUBCOMMAND] [options] [<project-dir>]
  next-native [SUBCOMMAND] -h

subcommands:
  build                                build project
  list-devices                         get the list of connected devices
  init                                 create a new project (in the current directory)
  install-app                          install app to the device
  print-build-dir                      print build path to stdout
  run                                  run application
  env                                  print relavent environment variables
  setup                                install build dependencies

general options:
  -h, --help                           print help message
  --prefix                             print install path
  -v, --version                        print program version

AS CODE

Use as a module inside to create a nextjs server inside a service worker. See this example to get a quick demo up and running.

$ npm i @socketsupply/next-native -S
import createServer from 'npm:@socketsupply/next-native'

const server = await createServer()
console.log('Created Server')

server.start().then(() => {
  console.log('Started Server')
})

Package Sidebar

Install

npm i @socketsupply/next-native

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

73.5 kB

Total Files

29

Last publish

Collaborators

  • chicoxyzzy
  • hij1nx
  • werle