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

wang-nw-builder

v1.0.3

Published

nwjs打包工具

Downloads

16

Readme

wang-nw-builder

这是一个NW.js的打包工具。

快速开始

安装依赖

npm i --save-dev wang-nw-builder

执行打包命令

执行下面的命令即可打包,默认情况下假设 ./dist 目录下包含应用代码以及 package.json 文件:

npm run nwBuilder --srcDir=./dist

启动客户端

启动 ./out 目录下的对应文件

可选项

| 选项 | 默认值 | 可选项 | 示例 | 说明 | |-------------|------------------------------------|--------------------------------------|--------------------------------------------------|-----------------------------------------------| | srcDir | ./dist | | --srcDir=./dist | 源代码保存目录。 | | outDir | ./out | | --outDir=./out | 打包成品输出目录。 | | cacheDir | ./cache | | --cacheDir=./cache | 缓存保存目录。 | | version | latest | latest、stable、lts,以及精确版本号,例如: 0.82.0 | --version=latest | nwjs版本号。 | | flavor | normal | normal、sdk | --flavor=normal | 打包后的类型。normal一般用于生产环境;sdk是带控制台的,一般用于开发环境。 | | platform | win | win、osx、linux | --platform=win | 操作系统平台。非osx系统打包osx文件可能会出问题,建议osx的应用单独在osx系统打包 | | arch | x64 | x64、ia32、arm64 | --arch=x64 | 操作系统架构。新款苹果m2 CPU使用arm64。 | | logLevel | info | info、debug | --logLevel=info | 日志级别。info指的是仅输出少量日志,debug就是输出详细日志。 | | downloadUrl | https://npmmirror.com/mirrors/nwjs | | --downloadUrl=https://npmmirror.com/mirrors/nwjs | 文件下载地址。 |

使用代码的方式进行打包

代码的方式允许我们以可编程的方式进行打包,大大增加了打包的灵活性,其可选项和上文一样。

示例:

import {nwBuilder} from "wang-nw-builder";

nwBuilder({
  srcDir: './test/src',
  version: 'latest',
  flavor: 'normal',//"normal" | "sdk"
  platform: 'osx',//"win" | "osx" | "linux"
  arch: 'x64',//"x64" | "arm64" | "ia32"
  logLevel: 'debug',//"info" | "debug"
  cacheDir: './cache',
  outDir: './out',
  downloadUrl: 'https://npmmirror.com/mirrors/nwjs',
});

示例

https://gitee.com/consolelog/wang-nw-builder-example.git