Giter Club home page Giter Club logo

webpack-demo's Introduction

webpack-demo

webpack构建前端项目,包含demo与目录规范

目录

my_app
	|- src					// 开发源码
		|- modules				// 模块(JS|LESS|图片等资源分散到各模块中)
			|- app					// 应用主页面模块目录,一个页面一个目录,对应有html主文档,比如detail, home
				|- app1					// 页面1
					|- index.html			// 页面1主文档
					|- index.less
					|- index.js
					|- block1_bg.png
				|- app2
					|- index.html			// 页面2主文档
					|- index.less
					|- index.js
					|- ...
				|- ...
			|- components			// 可视化的组件,比如header, footer, app-item
				|- component1
					|- index.(html|vue|tpl)
					|- index.less
					|- index.js
					|- component1_bg.png
					|- component.json
				|- component2
				|- ...
			|- extend				// 非可视化的模块,比如server, proxy
		|- static				// 公共静态资源
			|- script			// 公共脚本
			|- style				// 公共样式
			|- img				// 公共图片
	|- test					// 测试相关
	|- package.json			// package.json
	|- webpack.config.js		// webpack配置文件
	|- README.md				// 项目说明

编译

$ clone https://github.com/diamont1001/webpack-demo.git
$ cd webpack-demo/example1
$ npm i

# for dev version
$ npm run dev
# for release version
$ npm run prod

最后生成的发布代码在 release/ 目录下。

webpack-demo's People

Contributors

diamont1001 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.