Giter Site home page Giter Site logo

double-first-class's Introduction

南京邮电大学一流学科网页

编译代码运行 ↓ ↓ ↓

npm run build

前端工程化初试水

尝试组件化的**(虽然还是以DOM操作为主的页面控制),就近维护的**,CSS和images置于同一文件夹下,方便关联管理

  • webpack打包

  • prettier + eslint进行格式化和验证

  • husky + lint-staged (哈士奇!)让二哈来进行pre-commit检验


webpack

  • ExtraTextPlugin 提取JS中 CSS文件单独打包

  • CleanWebpackPlugin 每次打包前清除dist中的旧文件

  • HtmlWebpackPlugin 因为js和css等文件打包之后附上了hash值,通过这个插件自动生成相应的HTML文件

  • OptimizeCSSPlugin 压缩提取出来的css, 并解决ExtracttextPlugin分离出的js重复问题

  • UglifyJsPlugin 压缩JS

  • babel-loader 转换es6

  • url-loader 加载图片和字体之类的文件

  • css-loader, style-loader, sass-loader 加载sass文件


prettier + eslint

  • extends: airbnb-base 做标准,prettier 替换 eslint 原本的 eslint 规则

  • plugin: prettier

  • env: es6, node, browser

  • setting: eslint-import-resolver-webpack 加载webpack的alias之类的设置

  • rules: 应用prettier (airbnb插件) 的规则,同时因为windows是CRLF而不是LF,所以linebreak-style检测取消


husky + lint-staged

pre-commit 检验

double-first-class's People

Contributors

gooeynyan avatar

Stargazers

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