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

gm_static_x_mes

v1.1.0

Published

- `node` version >=14.17.1 - **windows os only:** [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) have been installed - **mac os only:** Command Line Tools (CLT) for Xcode: xcode-select --install, [developer.apple.com/downloads](h

Downloads

3

Readme

Requirements

Getting started

Clone the repository

git clone [email protected]:fe-x/gm_static_x_mes.git
# or git clone https://code.guanmai.cn/fe-x/gm_static_x_mes.git

Switch to the repo folder

cd gm_static_x_mes

Install dependencies (If you are blocked by GFW, please read the QA section)

yarn install

Move the config/sample.local.js to config/local.js.

mv config/sample.local.js config/local.js

Runs the app in the development mode

yarn start

Devlopement

Webpack DevServer Config

the config/local.js file:

module.exports = {
  port: 5555,
  proxy: [
    {
      context: ['/ceres'],
      target: 'https://x.guanmai.cn',
      // target: 'https://env-feature-order-abolish-calculate.x.k8s.guanmai.cn',
      // target: 'https://env-develop.x.k8s.guanmai.cn,
      changeOrigin: true,
    },
  ],
}

Webpack will merge config/local.js files, so you can configure webpack through js files. For more information about this json file, you can check this page

The proxy target list:

  • develop: https://env-develop.x.k8s.guanmai.cn
  • online: https://x.guanmai.cn
  • feature: https://env-feature-you-branch-name.x.k8s.guanmai.cn

This branch name will be provided to you by the backend

mes.json

the config/mes.json file

{
  "mainLoadURL": "http://172.16.3.70:5555/mes_index",
  "printLoadURL": "http://172.16.3.70:8080/build/print.html",
  "isOpenDevTools": true,
  "showPrint": true,
  "isOpenPrintDevTools": true
}

copy the mes.json to user desktop, the electron will read the config, so you can configure elelctron through json files.

Remote Desktop

archlinux: you can use the xfreerdp remote to windows desktop

yay -S xfreerdp
xfreerdp /u:Administrator /p:123456 /f /v:172.16.3.100 +clipboard -themes -wallpaper -grab-keyboard

mac: you can use the microsoft-remote-desktop remote to windows desktop

windows: just use system bind remote desktop

https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-mac#get-the-remote-desktop-client

Test

When you are independently developing a function or fixing a bug, and no back-end changes are involved, you can provide a link in the following format to provide an environment for testers to test

https://env-develop.x.k8s.guanmai.cn/mes/you-branch-name/index.html

for example:

  • https://env-develop.x.k8s.guanmai.cn/mes/feature-add-ssu-id/index.html
  • https://env-develop.x.k8s.guanmai.cn/mes/hotfix-chenge-text/index.html

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode. Open http://localhost:5555 to view it in the browser.

the default port is 5555, you can change this in the config/local.json

The page will reload if you make edits. You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode. See the section about running tests for more information.

yarn build

Builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

yarn lint

Use eslint to check for script errors

yarn lint:fix

Use eslint to check and try to fix script errors

yarn stylelint

Use stylelint to check for style errors

yarn stylelint:fix

Use stylelint to check and try to fix style errors

Note: If you have added these plugins to your editor, you rarely need to manually execute any of the above code specification related commands.

Enhance your development experience

The vscode editor extensions listed below can enhance your development experience, and other editors should have similar plugins.

Learn More

There are a lot of link comments in the source code, if you do not understand the code, you might as well click the link in the comments to see!

QA

Q: yarn upgrade does not update package.json

A: ref https://github.com/yarnpkg/yarn/issues/2042

yarn global add npm-check-updates
ncu -u
yarn install --check-files
ncu -u

Q: What to do if the dependencies cannot be downloaded due to network problems

A: ref https://npm.taobao.org/mirrors

First execute the following command to add the mirror, and then use yarn install to download the dependencies

yarn config set registry https://registry.npm.taobao.org -g
yarn config set disturl https://npm.taobao.org/dist -g
yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/ -g
yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ -g
yarn config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/ -g

if it still does not work, you can try to use yarn --ignore-optional to skip the download of optional dependencies