Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

a angular 1.x and ionic 1.x project base on webpack 3.x

Notifications You must be signed in to change notification settings

dudemonkey/angular-ionic-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

基于webpack构建的angularjs1.x + ionic 1.x 工程

这是一个基于webpack的angularjs 1.x和ionic 1.x的工程脚手架。

给需要重构angular老工程的朋友的一个参考 (是思路参考,如果是需要新建angularjs工程的朋友请不要使用,但是可以参考来学习一下webpack的基本的配置方法。)

初始化工程

npm install

这条命令会自动安装所有必要的依赖,这里用到的angularjs版本是1.4.3 ionic的版本是1.2.4(不过由于用npm安装ionic会提示找不到ionic的错误,所以我把ionic附在了/app/assets/lib文件夹里面,直接引用)

运行工程/开发模式打包

npm run dev

这条命令会打包并生成dev-server,然后可以在localhost:8089端口访问到这个项目的开发环境(端口配置和接口代理可以在build/configServer.js里配置)

生产模式打包

npm run build

这条命令会打包成生产环境的包供部署。

注意: 目前此工程中使用的webpack-dev-server由于版本过低,没有限制开发环境中的websocke访问的客户源主机,所以可能会造成开发过程中的开发代码泄露的问题。曾尝试过将此工程中的webpack-devServer升级,发现并不兼容。所以不针对这个问题进行修复。如不介意的话可以使用。

更多信息可以看本脚手架里其他两篇文章:
基于webpack构建的angular 1.x工程(webpack篇)

基于webpack构建的angular 1.x工程(angular篇)

About

a angular 1.x and ionic 1.x project base on webpack 3.x

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.4%
  • CSS 2.8%
  • HTML 0.8%

AltStyle によって変換されたページ (->オリジナル) /