npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mlatham/cyber

v0.4.4

Published

Cross-platform UI bridge for mobile-embedded next.js apps.

Downloads

6

Readme

Cyber.js

Bundle next.js into your native mobile apps.

Getting Started

npx create-next-app my-app --example https://github.com/mlatham/cyber.js --example-path packages/next-cyber-starter

Documentation

TODO:

Roadmap

  1. Create example project.
  • iOS Project + WKWebView
  • Android Project + WebView
  1. Create tool which replicates example project, substituting certain values (app name, etc).

Notes

Testing locally:

  • npx create-react-app my-app --template file:/Users/matt/Documents/workspace/cyber/packages/cra-template-cyber-app

  • npx create-next-app next-cyber-starter --typescript --tailwind --eslint --src-dir --app --use-npm --import-alias "@/*"

  • npx create-next-app my-app --example https://github.com/mlatham/cyber --example-path packages/next-cyber-starter

Custom integration:

  • npm install cyber (<- add the Javascript bridge interface)

  • spm install cyber-ios (<- add the iOS bridge interface)

    • Adds custom build step to copy cyber-ios.js as a resource
  • gradle install cyber-android (<- add the android bridge interface)

    • Adds custom build step to copy in cyber-android.js as a resource
  • npx create-react-app my-app --template cyber-react-app

    • esbuild
  • npx create-react-app my-app --template cyber-mobile-app

    • cyber-react-app + ios
  • https://createapp.dev/webpack

  • main library

    • react vs svelte vs vue? react consistently most popular
  • UI library (NONE)

    • bootstrap vs tailwind vs material UI? tailwind + bootstrap similar popularity. Suggestion is to learn raw CSS first
  • Test framework (NONE)

  • Transpiler

    • typescript (ES6 modules)
  • Styling

    • CSS (vs CSS modules, PostCSS, Sass, Less, stylus)
  • Image

    • SVG (vs PNG)
  • Utilities (NONE)

  • Linting

    • Prettier
  • Optimization (NONE)

    • Code split vendors (?)
  • Webpack plugins

    • HTML webpack plugin
  • React

    • React hot loader
  • https://createapp.dev/webpack/react--babel--css--html-webpack-plugin--prettier--svg--typescript--style-loader--css-loader

Added:

  • npm install webpack-dev-server style-loader css-loader --save-dev

  • webpack.config.*.js

  • tsconfig.json:

    • allowSyntheticDefaultImports: true

Modified: "build-dev": "webpack --mode development --config webpack.config.development.js", "build-prod": "webpack --mode production --config webpack.config.js"

  •   {
      test: /\.(png|jp(e*)g|svg|gif)$/,
      type: 'asset/resource'
    }
  • index.tsx ("root" -> "app", to align with HtmlWebPackPlugin)

  • Use template file: new HtmlWebpackPlugin({ template: './src/index.html', })

iOS Notes

  • Let Safari inspect webview within iOS Simulator via Develop->Simulator in Safari (Also Safari->Settings->Advanced->Show Develop menu in menu bar)

if #available(iOS 16.4, *) { self.webView.isInspectable = true }

  • Faster-tap (ios) and disable zooming: