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

react-sphere

v0.0.6

Published

Utils for react sphere

Downloads

8

Readme

react-sphere

Maintenance Status NPM version

A boiler plate for building product for multiple platforms (mobile, desktop and VR) with single codebase. It explains an architecture for building sites and apps for multiple platforms, for geographical regions(internationalization with a capability of changing themes) and flexible for building whitelabel sites/apps.

Advantages of react-sphere

  • Follow adaptive design You can implement the adaptive design for each device types like mobile, desktop and VR
  • Multiple sites / apps Able to build multiple sites and apps like B2B, whitelabel sites / apps and also tragetting geographical regions by country wise. (eg: French, Arabic) by inheriting or overriding the templates of global app / site (.com)

Idea

Idea inspired from Leland Richardson talk on Chain React 2017: React as a Platform

Getting Started

  • Install react native If you haven't installed react native on your machine, follow these steps from React Native till Create new Application
  • Install react-sphere as Gobal
    $ npm install -g react-sphere
  • Create your project
    $ react-sphere init project_name
    Alternate way:
    react-native init project_name --template sphere
    cd project_name/
    node scripts/addDevDependencies.js
  • After initializing the project, its all react-native and react. you can use react-native / react commands

Usage

  • Configure the sites in .babelrc file, like below.
    {
      "presets": [
        "react-native"
      ],
      "plugins": [
        ["transform-inline-environment-variables"],
        ["variable-path-resolver", {
          "envName": "SITE",
          "vars": {
            "m-fr": {"Device": "Mobile", "Site": "Fr" },
            "m-com": {"Device": "Mobile", "Site": "Com"},
            "d-fr": {"Device": "Desktop", "Site": "Fr" },
            "d-com": {"Device": "Desktop", "Site": "Com"},
            "default": {"Device": null, "Site": "Com"}
          }
        }]
      ]
    }
  • Running a web application (Webpack dev server)
    • SITE=m-com yarn web // For running your global mobile site
    • SITE=m-fr yarn web // french mobile site
    • SITE=d-com yarn web // global desktop site
    • SITE=d-fr yarn web // french desktop
    • To switch between sites, you may need to clear the compiler cache, for that you can use below command
      react-sphere switch m-fr web
  • Running react-native app
    • react-native run-ios // For running your global mobile app
    • To change to french app, stop the existing bundling terminal and run below script and reload your app.
      SITE=m-fr yarn start --reset-cache
  • Produciton build (web sites)
    • SITE=m-com yarn build
    • SITE=m-fr yarn build
    • yarn build:all // this will create builds for your sites mentioned in the .babelrc file
  • Production build (mobile apps)

Major Dependency

Similar Projects

IDE

VScode users can start the project as

SITE=m-fr code project_name  

Create VScode Alias