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

antdprolayout

v1.0.1

Published

绝影内置Layout

Downloads

1

Readme

Remote Component Starter Kit

Starter Kit

Starter Kit for quickly creating a Remote React Component that can be Lazily Loaded by @paciolan/remote-component.

Getting Started

Clone the repository and initialize your project

# create new repo
mkdir my-component
cd my-component
git init

# pull the remote component starter kit
git pull https://github.com/Paciolan/remote-component-starter.git --depth=1
git commit --amend -m "chore: 🛠️ pull remote-component-starter"

# install dependencies
npm ci

Modify package.json and replace the starter kit values with your own.

  • set name to the name of your project.
  • set description to describe your project.
  • set repository to point to your repository.
  • set license to reflect the license of your project.

Files

There are a few important files, one set is used for the bundle, another set for local development.

  • src/index.js - Entrypoint of the Remote Component. The component needs to be the default export.
  • src/dev.js - Entrypoint for webpack-dev-server. This is only used for development and will not be included in the final bundle.
  • src/index.html - HTML for webpack-dev-server. This is only used for development and will not be included in the final bundle.

Building

The bundle will be output to the dist/main.js.

npm run build

Create a development build for easier debugging.

npm run build:dev

Debugging

The component can be debugged locally by starting webpack-dev-server. This will start and launch the entrypoint src/dev.js.

npm run start

External Dependencies

The Remote Component is self contained with all of it's dependencies bundled with webpack. Any dependencies that will be provided by the app should be marked as external in the webpack.config.js.

In this example, react and prop-types are added to externals. They will not be included in the bundle. The web application is expected to provide these dependencies.

module.exports = {
  output: {
    libraryTarget: "commonjs"
  },
  externals: {
    react: "react",
    "prop-types": "prop-types"
  }
};

Commiting

Commits are added to the repository with commitizen compatible cit-cz.

# stage all changes
git add .

# run commitizen
npm run cz

Contributors

Joel Thoms (https://twitter.com/joelnet)

Icon made by Freepik from www.flaticon.com