New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sc60

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sc60

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

sc60

NPM version

编写软著时,总是需要复制前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"输出的文件名前缀
totalLine159030页的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": ["不是源码", "的文件"]
}

License

MIT License © 2021 kkopite

FAQs

Package last updated on 15 May 2022

Did you know?

Socket

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.

Install

Related posts