V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sd4399340
V2EX  ›  Angular

纯 Directive 的组件式开发

  •  
  •   sd4399340 · 2016-01-09 21:26:40 +08:00 · 2551 次点击
    这是一个创建于 3000 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近几个月尝试用 AngularJS 1.x 的 Directive 来作组件式的开发,文件夹结构就是 components 和 pages ,每个 component 里都是 directive ,这样每个 page 的实现其实就是堆叠 directive 。项目全用 ES6 来实现,用 Webpack 来打包。

    另外在持续集成上也做了很多尝试,每次 push 以后 Travis CI 自动跑单元测试,然后跑 build 并把 build 后的文件夹和测试覆盖率报告上传回 gh-pages 分支,完成之后还会在 Sauce Lab 上调用 5 个不同的浏览器跑 E2E 的测试。

    =========

    今年感觉 React 已经完全压过 Angular ,但很想把 React 的一些思路和想法用在 Angular 上。希望和还奋战在 Angular 上的小伙伴多交流。

    Github : https://github.com/PinkyJie/angular1-webpack-starter
    Demo : http://pinkyjie.com/angular1-webpack-starter/#/
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3920 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:25 · PVG 18:25 · LAX 03:25 · JFK 06:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.