
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
编写软著时,总是需要复制前30页和后30页的代码,没什么技术含量还得保证刚好结尾的时候是完整的(完全不明白他们的脑回路)因此写了该脚本自动将计算每个源码的文件行数,拼接处刚好符合要求的30页+30页
npm i sc60 -g
在你的源码工作目录上执行以下命令
sc60
然后你就会得到两个txt文档,对应前30页和后30页的代码
Options:
-c, --config <path> 指定配置文件路径,默认sc60.config.json
-i, --include <include> 指定源码范围,默认为src/**/*,逗号分开
-e, --exclude <exclude> 指定源码排除范围,逗号分开
-n, --name <name> 指定生成的文件名,默认sc
-t, --total-line <total-line> 指定生成的总行数,默认53*30=1590
由于工作目录下有一些依赖或编译生成文件,这些不应该包含在内,因此可以自行配置:
| key | 默认值 | 说明 |
|---|---|---|
| name | "sc" | 输出的文件名前缀 |
| totalLine | 1590 | 30页的word总共要多少行代码(这个需要用户自行计算) |
| include | ["src/**/*"] | 源代码的路径,是一个数组,glob匹配 |
| exlucde | ['**/node_modules/**/*','dist/**/*','**/*.{png,jpg,jpeg,gif,webp,svg}','**/*.{woff,woff2,eot,ttf,otf}','**/*.{mp4,webm,ogg,mp3,wav,flac,aac,m4a}'] | 不会计算在内的文件, 例如node_module的依赖,图片等等 |
在工作目录创建一个文件sc60.config.json,填上相关的配置:
{
"name": "xx",
"totalLine": 1590,
"include": ["你的源码"],
"exclude": ["不是源码", "的文件"]
}
FAQs
Unknown package
The npm package sc60 receives a total of 3 weekly downloads. As such, sc60 popularity was classified as not popular.
We found that sc60 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.