Giter Site home page Giter Site logo

angular-ionic-webpack's Introduction

基于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篇)

angular-ionic-webpack's People

Contributors

homerious avatar

Watchers

James Cloos avatar  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.