Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
vue-cli-plugin-tq-tpl
Advanced tools
配合 @vue/cli
3.0 通过插件快速生成前端项目模版.
vue config
查看 useTaobaoRegistry
、packageManager
信息
useTaobaoRegistry
为 true
,则运行 vue config -s useTaobaoRegistry false
设置成 false
packageManager
值为 yarn
还是 npm
,并分别执行下面两个步骤,切换镜像源npm
安装依赖,则需将 npm
的镜像源设置成 http://223.4.69.11:4873/
nrm
设置、切换镜像源yarn
安装依赖,则需将 yarn
的镜像源设置成 http://223.4.69.11:4873/
yarn config set registry http://223.4.69.11:4873/
安装插件
$ vue add tq-tpl
安装依赖
$ npm install
vue add tq-tpl
后会默认执行了 npm install
进行依赖安装
master
主分支dev
开发分支releate/addTemplate
新增后端管理模板分支(可删)dev-second-phase
v1.2.0升级分支dev-mtpl
新增云图模板分支npm run serve
启动本地服务npm run build
构建打包npm run serve
启动本地服务npm run framework
构建打包基座项目本地开发模式下,可以访问/dev
路由,进入子应用本地联调模式
npm run serve
启动本地服务npm run module
构建打包子应用项目npm run dev:module
启动本联调模式本地开发模式下,可以访问/dev
路由,进入子应用本地联调模式
npm run serve
启动本地服务npm run preview
构建打包模版项目template-env
类型的项目推荐在push到仓库后带入构建好的资源,方便支持预览相关功能,因此该模式下的项目也不推荐做的厚重
$ npm run [build/framework/module] -- --app_env='{"DNS_CODE": "test"}'
$ npm run module -- --external=false
默认抽离配置项:
conf.externals({
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'vuex-persistedstate': 'VuexPersistedstate',
'vuex-router-sync': 'VuexRouterSync',
'@ourea/fetch': 'vFetch',
...EXTERNAL_OPTIONS,cd
})
devServer
的proxy
配置生成nginx.conf
$ npm run build -- --port=8181 --root=/home/8181/mnt/dist
注意: v1.1.16 版本前的依赖, devServer
的 proxy
为 必填项
。
$ npm run build // NODE_ENV: production
$ npm run framework // NODE_ENV: framework
$ npm run module // NODE_ENV: module
v1.1.16
端口检测功能
,默认为3000
,可同时启动多个子应用baseUrl
端口号 3000
改成 控制台
输出可用的端口号。
process.env.NODE_ENV === 'development' && http.setOption({
conf: {
baseUrl: 'http://localhost:3000/api',
},
})
v1.1.17
build
指令走自定义 build
指令v1.2.0
husky
lint-staged
在 git commit
前校验 eslint
dev:module
的环境变量由 development
修改为 dev-module
Husky hooks skipped
mac上使用sourceTree提交代码不会走husky自定义的钩子
v1.2.1
数据可视化大屏
、基线子项目
模版FAQs
tq tpl
The npm package vue-cli-plugin-tq-tpl receives a total of 27 weekly downloads. As such, vue-cli-plugin-tq-tpl popularity was classified as not popular.
We found that vue-cli-plugin-tq-tpl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.