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-web-native-sketch

v0.0.43

Published

[TODO: We need an overview of how this can be used via npm vs as a local package]

Downloads

55

Readme

Getting started

[TODO: We need an overview of how this can be used via npm vs as a local package]

Install dependencies (for local dev)

You will need to install the following dependencies:

  • Yarn

    https://yarnpkg.com/en/docs/install

  • Yalc

    https://github.com/whitecolor/yalc

    yarn global add yalc
    or
    npm i yalc -g

How to use (for local dev)

  1. Run this from ics-primitives root:

    yarn
    yarn build
    yalc publish  # this publishes code to local yalc repo
  2. Go to your development project (e.g. instacar-front) and run (remember to run this after every yarn or npm install):

    yalc link react-web-native-sketch
  3. When making code changes to ics-primitives run (from ics-primitives root):

    1. Run:

      yarn build  # run this if necessary
      yalc push
    2. Refresh web page

How to Add Styles

Styles can be specified like this:

// platform before class name
import {web, ios, android} from 'src/utils/theme';

const styles = {
    container: {
        [web]: {
            padding: 1,
        },
        [ios]: {
            padding: 2,
        },
        [android]: {
            padding: 3,
        },
        [all]: {
            padding: 4,
        },
    }
}

or

// platform inside class styles
import {web, native, all} from 'src/utils/theme';

const styles = {
    container: {
        padding: {
            [web]: 1,
            [native]: 2,
            [all]: 3
        },
    }
}

Things to pay attention to:

  • On web, styles cascade to children. This does not happen in sketch (and native?).

How to add sketch to a project

  1. add sketch-manifest.json (similar to the one in this repo)

  2. in package.json add

    "skpm": {
      "main": "your_repo_name.sketchplugin",
      "manifest": "./sketch-manifest.json"
    },
    "scripts": {
      "render": "skpm-build --watch --run & npm run typescript",
    }
  3. add your_repo_name.sketchplugin to .gitignore

TODO

  1. Add internationalization (using context maybe?)
  2. Add the rest of form components
    1. select
    2. checkbox
    3. radio group
    4. photo upload
    5. array of photos
    6. array of objects
    7. date/time picker
  3. Document components
  4. Navigation (native and web)
  5. Dialogs
  6. Alerts