Socket
Socket
Sign inDemoInstall

webpack-cli-multi

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-cli-multi - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "webpack-cli-multi",
"version": "1.0.2",
"version": "1.0.3",
"description": "a simple webpack config cli for multi apps suooprt vue & react",

@@ -5,0 +5,0 @@ "main": "views/*/main.js",

@@ -1,78 +0,53 @@

# 这是一个简单的自用webpack多view脚手架
## Introduce
### 安装步骤
this is a simple self use cli for multi-views app with webpack
1.请确保全局安装了 webpack npm
## Quick to start
1.make sure you have install webpack npm with global
2.download this project
3.npm install
4.npm run dev-* (example:npm run dev-mobile) `develop mode`
5.npm run build-* (example:npm run build-mobile) `build mode`
2.下载克隆此工程
## Directory
3.npm install
4.npm run dev-* (开发环境 *代表views下面的模块名) npm run build-* (发布环境 *代表views下面的模块名) npm run build (发布环境 全部发布)
### 目录结构
> `src 开发环境`
>> css 通用css
>> js 通用js
>> components 通用组件
>> views 模块名字
>>> mobile mobile模块目录
>>>> ... mobile模块里的资源 包括JS,CSS等
>>> pc pc模块目录
>>>> ... pc模块里的资源 包括JS,CSS等
>> ... 其他模块
>> template.html 主模板/页面
> `dist 发布环境`
>> mobile
>>> ...
>> pc
>>> ...
>> ... 其他模块
> .babelrc babel配置文件
> package.json 包信息
> postcss.config.js postcss配置文件
> webpack.config.js webpack配置文件
> node_modules 模块包
### webpack 配置
总体:热加载(不含组件热加载),全局挂载,自动清理产出文件夹,区分处理开发和发布环境
html:html模板引擎,svg行内挂载
css: less sass 分离样式表 自动补全前缀hack 支持css4(与less sass 冲突 选择性使用)
js: 支持es6 typescript 代码分离 提取公共模块 丑化
图片:压缩 base64编码
字体:压缩
### npm包说明
* devDependencies 为开发的配置项
* dependencies 为项目的配置项 现包括jquery(已在webpack全局挂载),font-awesome,lodash
```
|--- dist #build files
|--- node_modules #node packages
|--- src #dev folder
|--- components #global components
|--- css #global css
|--- common.scss #global css-style
|--- variable.scss #global css-variable
|--- img #global img
|--- js #global script
|--- api.js #api conf
|--- common.js #global js with all plugins & functions & conts
|--- ...
|--- static #static files for relative path
|--- views #all views
|--- mobile #display mode
|--- components #private components
|--- css #private css
|--- img #private img
|--- js #private js
|--- router #private router
|--- App.vue #main vue
|--- main.js #main entry
|--- pc #display mode
|--- ... #just like what in mobile
|--- thinker #display mode
|--- ... #just like what in mobile
|--- ... #and so on
|--- template.html #html template for webpack
|--- .babelrc #babel conf
|--- .eslintignore #eslint ignore conf
|--- .eslintrc.js #eslint conf
|--- .gitignore #git ignore conf
|--- package.json #all dependencies
|--- package.json #all dependencies
|--- package-lock.json #locked dependencies
|--- postcss.config.js #postcss conf
|--- README.md #this file
|--- webpack.config.js #webpack file
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc