Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A front end project seed for whatever
这是一个前端webpack种子项目,可以用来生成前端的起始项目。通过问答完成移动端适配、sass编译等环境配置,类似vue-init.
详见已实现功能
$ wpbase-cli create <project-name>
$ git clone https://github.com/pillarBoy/what-seed
$ cd what-seed
$ npm link # make wpbase-cli a global command, might have accession issues.
# alternatively, set path-to-webcli-dir as env variable
$ wpbase-cli create myproject
$ cd myproject
start to work
当前可以通过修改 src/config.template.js
来修改默认配置,这个文件将会复制到生成项目的 webpack/config.js
由webpack引用
问答可以定制一些不同场景下的不同配置,在 src/questions.js
中可以定制问答项目。
引入单元测试,编写测试文件 test/test.js
后 npm test
运行测试,npm run coverage
运行istanbul覆盖率测试
istanbul 依赖的 esprima 暂不支持async,因此控制台会有一些无关的报错
移动端适配方案: 依照750px设计图写尺寸(后续将增设配置),单位用px, 编译时,由px2rem转为rem,根据ClientWidth设定根字体,完成响应式适配。
在webpack中引入了px2rem,基准宽度是750px,因此750px宽度设计图的尺寸可以直接用到css文件中,单位是px
代码在生成项目中的 src/utils/htmlFontSize.js
中
不想转换的,如1px 线,写作 border: 1px solid #ddd; /*no*/
,想转换,但需要保留px单位的,如字体,写作 font-size: 28px; /*px*/
详见px2rem文档
async await 需要node > 7.6支持
yarn
或 npm install
yarn start
yarn build
FAQs
A front end project seed for whatever
The npm package wpbase-cli receives a total of 0 weekly downloads. As such, wpbase-cli popularity was classified as not popular.
We found that wpbase-cli 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.