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

@wings-j/web-slide

v1.1.0

Published

网页幻灯片制作工具

Downloads

2

Readme

web-slide

用于生成网页幻灯片的 Node 程序,由多个输入文件(html、css、js、json),最终输出为一个 HTML 文件。

安装

npm install --global @wings-j/web-slide

示例

Demo

右下角的按钮可翻页。

示例源文件可见demo

使用方法

  1. 在工作目录下新建input文件夹,在这个文件夹中编写幻灯片内容(html、css、json)。
  2. 在工作目录下运行web-slide
web-slide

运行成功后在工作目录下会index.html文件。

观察模式:

web-slide --watch

输入

所有输入(配置、幻灯片、资源)放置在 input 文件中。

配置

配置文件类型为 JSON,默认名称为 $config.json

配置项可见:./src/config/runtime.js

全局脚本

全局脚本会在 DOMContentLoad 后执行,默认名称为 $config.js

模块可使用 CommonJs 和 ES 模块方式引入。

全局样式

全局样式会应用到所有幻灯片中,默认名称为 $config.css 。在$config.css 中设置#Slide的属性可以配置全局样式。

内置的 id 和 class 使用大坨峰和连字符命名,自定义的 id 和 class 建议使用小拓峰和连字符命名。

幻灯片

幻灯片以 HTML 文件组织,一个 HTML 文件代表一张幻灯片。

幻灯片以 HTML 的名称排序。

模板

<body></body>
<style></style>
<script></script>

body、style、script 的内容会被提取并添加到页面中。

API

Broadcast(广播,详见:./src/web/core/broadcast/index.js),会触发事件:

  • render:渲染

样式

详见 ./src/web/style