Coder Social home page Coder Social logo

angularjs-sample's Introduction

angularjs-sample

Angular.js 1.x sample.

Technologies

前端:

后端:

自动化工具:

自动化测试:

AngularJs Architecture

    app.module.js
        |
        |-- blocks/
        |   |
        |   |-- exception/
        |   |-- logger/
        |   \-- ..
        |
        |-- widgets/
        |
        |-- core/
        |
        \-- features/
            |
            |-- app.feature1
            |-- app.feature2
            |-- app.feature3
            \-- ...

angualr.js框架总体上分为三个部分:app功能模块,app通用模块,跨app通用模块。

  • app.module.js: 存放app启动逻辑和模块依赖。
  • blocks/:跨app的通用模块。如 blocks.exception,blocks.logger。
  • core/ widgets:此app的通用的模块。
  • features/:app的功能模块。

CSS Architecture

  • 命名规范使用 BEM.
  • css 预处理器使用 Less.
  • 字体单位使用 REM, 其他元素使用px.

Sass Directory Structure

// todo

css coding style

// todo

How to use

  1. 克隆本代码仓库
  2. 安装sass(安装Ruby, 运行gem update --system && gem install compass)
  3. npm install
  4. bower install
  5. 普通开发使用grunt命令;发布使用grunt dist

Automation

  1. 自动注入Bower文件:grunt-wiredep
  2. javascript 代码检查 :grunt-eslint
  3. css 代码检查:grunt-stylelint
  4. 图片优化:grunt-image
  5. caching your HTML templates with $templateCache。:grunt-angular-templates
  6. 合并css/javascript文件:grunt-contrib-concat
  7. angular自动注入依赖:grunt-ng-annotate
  8. css后处理:grunt-postcss
  9. css压缩:grunt-contrib-cssmin
  10. javascript 压缩:grunt-contrib-uglify
  11. 组合concat/cssmin/uglify,为它们自动生成配置,并在最后替换index.html里的对应代码块为优化后的css/js文件:grunt-usemin

More

angularjs-sample's People

Contributors

qw8880000 avatar

Stargazers

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