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

umi-plugin-capacitor

v0.0.9

Published

更方便地使用`capacitor`进行`hybrid-app`开发 (for `umijs@3`)

Downloads

120

Readme

umi-plugin-capacitor

更方便地使用capacitor进行hybrid-app开发 (for umijs@3)

NPM version NPM downloads

功能介绍

插件功能比较简单,目的是帮助开发者在运行时结合capacitor进行模拟器/真机调试。

插件灵感来自umi-plugin-cordova

Install

# npm or yarn
$ npm install umi-plugin-capacitor @capacitor/cli @capacitor/core -D

Usage

umijs@3会扫描符合命名规则的插件并自动注册

添加scripts

请在package.json添加如下命令以便使用

{
  "scripts":{
    "init": "cap init",
    "add-ios": "cap add ios",
    "add-android": "cap add android",
    "android": "umi dev --android",
    "ios": "umi dev --ios",
    "build-android": "umi build --android",
    "build-ios": "umi build --ios",
    "start": "umi dev",
    "build": "umi build"
  }
}

初始化项目

# 根据提示生成capacitor.config.json
npm run init

运行项目

# web 模式
npm start

# android 模式
npm run andoird

# TODO: ios 模式
npm run ios

注意事项

  • 请先准备好开发环境,Android需要准备Android Studio及Android Sdk,ios需要准备Mac及XCode
  • 目前Android开发模式,参考的是cordova-android的逻辑,通过gradle编译,并启动模拟器/连接真机,再通过adb命令将开发包安装到目标机器上。
  • IOS 开发模式还没有封装,使用的是默认命令cap open ios,需要手动完成后续步骤。
  • 需要目标机器与当前机器处于同个局域网(因为要通过局域网IP访问web端)
  • 目前build模式,全部都是走的cap open ios/android,需要手动完成打包。
  • 如需要调试页面,

Options

Configure in .umirc.js,

export default {
  /* latter */
};

TODO

  • [ ] capacitor navive API调试
  • [ ] IOS开发模式自动化

LICENSE

MIT