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

@deep-foundation/sdk

v0.0.0-dev.13

Published

A template/boilerplate for creating nextjs applications that use deep. It is recommended to merge with this repository to have its improvements in your nextjs application!

Downloads

3

Readme

A template/boilerplate for creating nextjs applications that use deep. It is recommended to merge with this repository to have its improvements in your nextjs application!

Just erase pages/index.tsx Page component body.

Variables

// Optional
NEXT_PUBLIC_GRAPHQL_URL=DeepPath
NEXT_PUBLIC_DEEP_TOKEN=DeepToken
NEXT_PUBLIC_I18N_DISABLE=1

How to make this repository pullable in your repository

git remote add sdk https://github.com/deep-foundation/sdk.git
git fetch sdk
git merge sdk/main --allow-unrelated-histories --strategy ours 

Note that we use ours strategy during merge to avoid any changed in your existing project

How to pull some new commits but not old

If you want to get some-commits to your repository - merge with ours strategy with old sdk commit that is created before required changes and then merge with main

git remote add sdk https://github.com/deep-foundation/sdk.git
git fetch sdk main
git merge sdk/some_old_commit_hash --allow-unrelated-histories --strategy ours
git merge sdk/main

Note: I am sure that it is not the only way to do this. Possibly you can use cherry-pick to do this

Now you can pull changes from this repository by using

git pull sdk main

Prerequisitions

  • Install and use nodejs version from .nvmrc
nvm install 18 && nvm alias default 18; npm use default;
  • Install dependencies
npm ci; (cd electron; npm ci)
  • Run by using How to run
  • Pass graphql url and token To easily get token you can use Copy token button in the menu of deepcase. In the same menu you can find gql button where you can get graphql path
  • Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

How to build manually

Web

Development

npm run dev

dev

Build server+client build with ssr

npm run build &&
npm run start

Export static client without server

npm run export

Android

Prepare:

  • Install Android Studio.
  • Install in (Settings -> Languages & Frameworks -> Android SDK -> SDK Tool):
    • Android SDK Command-line Tools
    • Android Emulator
    • Android SDK Platfrom-Tool
    • Google Play services
  • Install in (Settings -> Languages & Frameworks -> Android SDK -> SDK Platforms):
    • Android 14 Build:
npm run build-android &&
npm run open-android

ios

IOS

Prepare:

  • Xcode 10 or later installed on your Mac.
  • execute this
brew install cocoapods
(cd ios/App/App; pod install)

Build

npm run build-ios &&
npm run run-ios

ios

Windows

npm run build-windows

Unix

npm run build-unix

Mac

Prepare:

npm run build-mac

mac

Chrome extension

npm run build-chrome-extension

Result path: sdk/extension.crx and sdk/extension.pem

chrome

Github Pages

Only activate GitHub Pages for Your Repository

(Settings -> Pages -> Source -> Deploy from branch main -> Github Actions)

There is no need to make any changes to the code.

gh-pages

Development

You can use environment variables to set graphql path and token on server instead of setting it on client. See template in .env.development. Create a file .env.local with your values

Translation i18n

You can edit /public/locales/*/*.json files as /public/locales/en/common.json and use it inside your components as:

const { t } = useTranslation();
<div>{t('connection')}</div>

You must use this on every page:

import { i18nGetStaticProps } from "../src/i18n";
export async function getStaticProps(arg) {
  return await i18nGetStaticProps(arg);
}

And this on every dynamc route page (as /path/[variable])

export async function getStaticPaths() {
  return {
    paths: ['/path/123'],
    fallback: true
  }
}

For support static npm run export of nextjs, you can use env variable NEXT_PUBLIC_I18N_DISABLE. But i18n is not available in export nextjs mode.

Restart

GitPod

SDK app is started together with Deep.Links and other services in GitPod. So to restart it from GitPod you should do the following:

  1. Find terminal there npm run gitpod-start command was executed. IMG_1490

  2. Press CTRL+C in terminal to stop a Deep instance (Deep.Links and SDK). IMG_1491

  3. Press button on your keyboard to get last executed command. IMG_1492

  4. Press Enter to execute that command again, that will finish restart sequence. IMG_1493

NPM

If you want launch your repo from npx as npx @deep-foundation/sdk you must change name in package.json, manually npm adduser and first publish npm publish --access public yout fork.

For publish new version, just update package.json version field and then git commit && publish to github.

This app can be launched as builded web server with npx @deep-foundation/sdk