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

@robotical/martyblocksjr

v1.3.54

Published

ScratchJr

Downloads

20

Readme

Overview

This is the official git repository hosting the source code for the ScratchJr project.

ScratchJr can be built both for iOS and Android. A pure-web version is planned to follow at some point in the future.

Platform | Status -------- | ------------- iOS | Released in App Store Android | Released in Google Play

Architecture Overview

The diagram below illustrates the architecture of ScratchJr and how the iOS (functional), Android (functional) and pure HTML5 (future) versions share a common client.

Scratch Jr. Architecture Diagram

Directory Structure and Projects

This repository has the following directory structure:

  • src/ - Shared JavaScript code for iOS and Android common client. This is where most changes should be made for features, bug fixes, UI, etc.
  • editions/ - Assembly directories for each "flavor" of ScratchJr. These symlink to src for common code, and could diverge in settings and assets.
    • free/ - Free edition JavaScript, including all shared code for all releases
  • android/ - Android port of Scratch Jr. (Java, Android Studio Projects)
    • ScratchJr/ - Android Studio Project for ScratchJr Android Application
  • bin/ - Build scripts and other executables
  • doc/ - Developer Documentation
  • ios/ - Xcode project for iOS build. (Make sure to open ScratchJr.xcworkspace not ScratchJr.xcodeproj)

Building ScratchJr

Initial setup

Regardless of whether you are doing iOS development or Android development, you should do these steps.

These instructions assume you are building both versions on Mac OSX, with Homebrew installed.

  1. Clone or update the code for this repo
  2. Ensure you have node and npm installed.
  3. Run sudo easy_install pysvg to install python svg libraries
  4. Run brew install librsvg to install commandline rsvg-convert
  5. Run brew install imagemagick to install commandline magick
  6. In the top level of the scratchjr repo directory, install npm dependencies for bundling the JavaScript: npm install

Analytics

ScratchJr uses the Firebase SDK to record analytics for the app. Scratch Team developers should look for the configuration files in the Scratch Devs Vault. If you're not on the Scratch Team, then you'll need to set up your own app analytics with Google Firebase. It's free. Firebase will generate the configuration files for you to download.

  1. Place the google-services.json file in editions/free/android-resources
  2. Place the GoogleService-Info.plist file in editions/free/ios-resources

iOS

  1. To build the iOS version, you need to have a Mac with Xcode
  2. Run brew install cocoapods to install CocoaPods
  3. Run pod install to install the Firebase Analytics dependencies
  4. Open Xcode
  5. In Xcode, open ios/ScratchJr.xcworkspace

Android

  1. Install or update Android Studio
  2. In Android Studio, open the project android/ScratchJr
  3. Choose the appropriate flavor/build variant in Android Studio

Note: you can still do Android development on Ubuntu. Instead of the install commands above, run:

  1. sudo easy_install pysvg to install python svg libraries
  2. sudo apt-get install librsvg2-bin to install rsvg-convert
  3. sudo apt-get install imagemagick to install ImageMagick

Where and how to make changes

All changes should be made in a fork. Before making a pull request, ensure all changes pass our linter:

  • npm run lint

For more information, see CONTRIBUTING.md.

GitHub Actions

Versioning

We use GitHub Actions to automate versioning of the project. The workflow is triggered every time a new tag is pushed to the repository. The action updates the version number in the package.json file, creates a new release on GitHub, and pushes the updated files to the repository.

Deployment to NPM

We also use GitHub Actions for deployment to NPM. The workflow is triggered every time a new release is created on GitHub. The action builds and publishes the updated package to NPM, making it available for others to install and use.

Code credits

ScratchJr would not be possible without free and open source libraries, including:

Acknowledgments

ScratchJr is a collaborative effort between: