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

lemon-cmd

v0.0.4

Published

1. 全局安装

Downloads

3

Readme

lemon-cmd

  1. 全局安装
npm install -g lemon-cmd
  1. 创建模块目录
mkdir lemon-module-awesome-module
cd lemon-module-awesome-module

新建如下的文件结构。参考示例:https://github.elenet.me/ioslh/lemon-module-amap

- packages
  |- plugin
       |- index.js
       |- plugin.vue
  |- setting
       |- index.js
       |- setting.vue
  1. 启动
lemon serve

注意:由于需要登录 SSO,为了顺利获取 token,最好修改本地 host,将本地 IP 127.0.0.1 指向一个 *.elenet.me 域名,然后使用该域名访问。

  1. 打包
lemon build

参数

在上述的 lemon serve 和 lemon build 命令中,模块组件入口和配置组件入口都是 lemon 自动推断了。在不提供参数的情况下,lemon 会尝试如下位置寻找模块组件入口:

const possiblePlugins = [
  'plugin.js',
  'Plugin.js',
  'plugin/index.js',
  'Plugin/index.js',
].map(i => `packages/${i}`)

并在如下位置寻找配置组件入口:

const possibleSettings = [
  'setting.js',
  'Setting.js',
  'setting/index.js',
  'Setting/index.js',
].map(i => `packages/${i}`)

你也可以通过提供参数指定相应的组件入口

# 启动
lemon serve --plugin my-plugin-entry.js --setting my-plugin-setting.js

# 打包
lemon build --plugin my-plugin-entry.js --setting my-plugin-setting.js