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

@yangzw/bruce-std

v1.3.6

Published

A VSCode configuration tool with integrated code verification

Downloads

92

Readme

@yangzw/bruce-std

请查看Bruce FEES@yangzw/bruce-std的文档

CJS构建rc文件

  • config文件夹中的xxxrc.ts使用export = XXX的形式导出
  • src文件夹中的脚本使用.mts作为文件后缀,内部文件引用使用xxx/yyy/abc.mjs的形式
  • package.json不要设置typemodule
  • tsconfig.json使用两种形式,tsconfig.json用于编译src文件夹,tsconfig.config.json用于编译config文件夹
{
    "main": "dist/index.mjs",
    "bin": {
        "bruce-std": "dist/index.mjs"
    },
    "scripts": {
        "build": "rimraf dist && tsc -p tsconfig.config.json && tsc -p tsconfig.json",
        "dev": "nodemon -w config -w src -w package.json -w tsconfig.json -e ts,mts -x \"npm run build\""
    }
}
// tsconfig.json
{
	"compilerOptions": {
		"allowJs": true,
		"allowSyntheticDefaultImports": true,
		"baseUrl": ".",
		"downlevelIteration": true,
		"esModuleInterop": true,
		"experimentalDecorators": true,
		"forceConsistentCasingInFileNames": true,
		"jsx": "preserve",
		"lib": [
			"DOM",
			"DOM.Iterable",
			"ES2015",
			"ES2016",
			"ES2017",
			"ES2018",
			"ES2019",
			"ES2020",
			"ES2021",
			"ES2022",
			"ES2023",
			"ESNext"
		],
		"module": "ESNext",
		"moduleResolution": "Node",
		"outDir": "dist",
		"removeComments": true,
		"resolveJsonModule": true,
		"sourceMap": false,
		"strict": true,
		"target": "ES6"
	},
	"exclude": [
		"node_modules"
	],
	"include": [
		"src"
	]
}
// tsconfig.config.json
{
	"compilerOptions": {
		"allowJs": true,
		"allowSyntheticDefaultImports": true,
		"baseUrl": ".",
		"downlevelIteration": true,
		"esModuleInterop": true,
		"experimentalDecorators": true,
		"forceConsistentCasingInFileNames": true,
		"jsx": "preserve",
		"lib": [
			"DOM",
			"DOM.Iterable",
			"ES2015",
			"ES2016",
			"ES2017",
			"ES2018",
			"ES2019",
			"ES2020",
			"ES2021",
			"ES2022",
			"ES2023",
			"ESNext"
		],
		"module": "CommonJS",
		"moduleResolution": "Node",
		"outDir": "dist",
		"removeComments": true,
		"resolveJsonModule": true,
		"rootDir": "config",
		"sourceMap": false,
		"strict": true,
		"target": "ES5"
	},
	"exclude": [
		"node_modules"
	],
	"include": [
		"config"
	]
}

兼容

ecswt v38-

eslint-config-standard-with-typescript v38-,tslint配置需要做一些调整。

import { join } from "node:path";

export default {
	parserOptions: {
		project: "tsconfig.config.json",
		tsconfigRootDir: join(__dirname, "..")
	}
}
ecswt v38+

eslint-config-standard-with-typescript v38+,tslint配置需要做一些调整。

import { cwd } from "node:process";

export default {
	parserOptions: {
		project: "tsconfig.json",
		tsconfigRootDir: cwd()
	}
}

每个项目目录中必须存在tsconfig.json且其配置需要做一些调整。

{
	"include": [
		"src"
	]
}

EslintparserOptions配置请参考这里。