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

llc-calendar

v1.1.4

Published

- 基于react16+版本做的一个仿携程的H5日历,支持时间段设置 - 可以获取包括当前日期后面的十二个月 - 当前日期 curDay?: Date; //不可选日期(从x天到X天) disableDay?: { from?: Date; to?: Date; }; //选中日期 selDay?: { from: Date; to: Date; }; //是否显示日历 showCalendar: boole

Downloads

9

Readme

介绍

  • 基于react16+版本做的一个仿携程的H5日历,支持时间段设置
  • 可以获取包括当前日期后面的十二个月
  • 当前日期 curDay?: Date; //不可选日期(从x天到X天) disableDay?: { from?: Date; to?: Date; }; //选中日期 selDay?: { from: Date; to: Date; }; //是否显示日历 showCalendar: boolean | string; //关闭日历 closeCalendar: Function; //获取日历的dom calendarRef: any;

打包

  • npm login 登录
  • npm publish
  • 发布的时候会遇到 You do not have permission to publish "calendar". Are you logged in as the correct user? : calendar 类似这样的问题说明你的包名在npm上已经有人使用过了,改一下package.json的name就可以了
  • 替换版本,先声明版本号,然后再执行发布 npm version 1.0.1 遵从X.Y.Z版本号规则 npm publish

可能遇见的问题:

  • react-jsx-dev-runtime.development.js:117 Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
  • 参考: https://stackoverflow.com/questions/61706057/webpack-typscript-library-import-is-undefined-in-react-project 我这里用到的是webpack5.所以没法使用4的一些插件因为不支持,我只配置了
    libraryTarget: 'umd',
    globalObject: 'this',
    这两个属性,在output中, 另外又发现启动后会爆出 Minified React error #321 这个错误,这里是因为插件本身的react引用要使用外部的,不是插件自身的react引用,在webpack 配置如下:
    externals: {
      react: {
        commonjs: 'react',
        commonjs2: 'react',
        amd: 'react',
        root: 'React',
      },
      'react-dom': {
        commonjs: 'react-dom',
        commonjs2: 'react-dom',
        amd: 'react-dom',
        root: 'ReactDOM',
      },
    },
    此外可以在 package.json 中为 react 和 react-dom 添加同伴依赖 peerDependencies 的映射,这是为了检测宿主环境中这两项依赖的版本如果低于你规定的最低版本,那么在 npm@3 中会给出警告(npm@1 和 npm@2 中会自动安装)。 参考: https://zhuanlan.zhihu.com/p/93773786