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

@huzan/hz-eagle

v1.2.3

Published

## Install

Downloads

3

Readme

@huzan/hz-eagle(基于@huzan-umi3-plugins架构的前端代码共享方案)

Install

npm install --save @huzan/hz-eagle

commands


cross-env HZ_EAGLE_CONFIG_PATH=./.eagle.config.js //config path

Usage: hz-eagle <command> [options]

                sync      (-b=branch || -t=tag || -c=commitId) -f=[forceUpdate] -i=[init]
                update  
                copy
                remove    -c=[isCommit]
                check
                move      -o=[oldBaseCodePath]
                lint

option


// copy file option
//"notCover": true //是否不覆盖, "crateShadowFile" : true //使用影子文件

// @hz-sync-base-project-option-begin
// {"notCover": true, "crateShadowFile" : true}
// @hz-sync-base-project-option-end


"husky": {
    "hooks": {
        "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
        "pre-commit": "hz-eagle lint && npm run lint-staged"
    }
}

//.eagle.config.js
module.exports = {
    baseCodePath: '',
    gitlabUrl: '',
    token: '',
    projectId: '',
    copyCacheToSourceFilter: ({absFromPath,absToPath,path,}) => true,
    copySourceToSrcFilter: ({absFromPath,absToPath,path,}) => true,
    copyCacheToSourceGlobbyPatterns: ['**'],
    copyCacheToSourceGlobbyOption: {},
    hzSyncBaseProjectOptionExtnameRe: /\.(js|jsx|ts|tsx|less|css)$/,
    copySourceToSrcGlobbyPatterns: ['./src/**'],
    copySourceToSrcGlobbyOption: {},
}

//lint-staged.config.js
const {createFilterCopyFiles} = require('@huzan/hz-eagle')

const filterCopyFiles = createFilterCopyFiles()


module.exports = {
    '**/*': [
        async function lintFilesPath(files) {
            await filterCopyFiles(files)

            return `node ./scripts/lint-files-path.js ${files.join(' ')}`
        },
    ],
    '**/*.{js,jsx}': [
        async function lintJs(files) {
            await filterCopyFiles(files)

            return `hz-eslint --fix ${files.join(' ')}`
        },
        async function prettier(files) {
            await filterCopyFiles(files)

            return `hz-prettier --write ${files.join(' ')}`
        },
    ],
    '**/*.{css,less}': [
        async function lintStyle(files) {
            await filterCopyFiles(files)

            files.forEach((file) => file.replace('[', '\\[').replace(']', '\\]'))

            return `hz-stylelint --fix ${files.join(' ')}`
        },
        async function prettier(files) {
            await filterCopyFiles(files)

            return `hz-prettier --write ${files.join(' ')}`
        },
    ],
}

私有部署改造 前端代码共享方案

##前提条件

  • 1.所有的代码都由本公司人员开发。
  • 2.基础功能版本只维护一个版本。有3个分支dev,test,master。所有定制版本都是共享基础版本代码,向下兼容,定制版本更新只能共享到基础版本对应分支的最新代码。
  • 3.基础功能版本提供路由基本的配置。交互都一样,不能在基础版本二级菜单中加入地址版本页面。如果需要,单独在定制版本上开发,关闭基础版本的路由页面。
  • 4.定制版本上不能修改基础版本代码,使用影子文件引入。

License

MIT © LeoHuiyi