@sweetui/sweet-mobile-sdk
Sweet Mobile SDK. Mobile end building package based on Vue.js 2
Last updated 5 months ago by zdliuccit .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @sweetui/sweet-mobile-sdk 
SYNC missed versions from official npm registry.

@sweet-mobile-sdk 文档

基于webpack@4.10.2 Vue.js@2.5.16的移动端构建sdk

目录

  • --- config // 配置文件目录
    • --- koa2-middle // koa2中间件
      • --- errorMiddleWare.js // 错误处理
      • --- fileMiddle.js // 处理请求访问本地文件(开发模式)
      • --- proxyMiddleWare.js // 处理开发环境代理转发
    • --- logger
      • --- koa-logger.js // koa2服务log
      • --- vue-logger.js // .vue中log
    • --- utils
      • --- env.js // 环境变量判断
      • --- responsiveDesign.js // 响应式js
      • --- StringUtils.js // 公共方法
    • --- eslintrc.conf.js // eslint 规则配置
    • --- koa-dev-server.js // koa2 开发服务配置
    • --- manifest.js // h5离线缓存文件生成脚本
    • --- vue-loader.conf.js // vue loader 配置
    • --- webpack.config.base.js // webpack 基础配置
    • --- webpack.config.dev.js // webpack 开发配置
    • --- webpack.config.dll.js // webpack dll配置 单独打包第三方库
    • --- webpack.config.prod.js // webpack生产配置
  • --- .gitignore
  • --- index.js // 入口文件
  • --- package.json
  • --- README.md

webpack配置

  • webpack.config.base.js
  • webpack.config.dev.js
  • webpack.config.dll.js
  • webpack.config.prod.js

koa2

暂时只作为开发服务

eslint规则

/**
 * eslint规则配置,用于被业务工程引用
 * Created by liuzhengdong on 2018/4/3.
 */
module.exports = {
  root: true,
  env: {
    // 环境定义了预定义的全局变量。
    browser: true,
    node: true,
    es6: true,
    mocha: true
  },
  parser: 'babel-eslint', //使用babel-eslint来作为eslint的解析器
  parserOptions: {
    // ECMAScript 版本
    ecmaVersion: 6,
    sourceType: 'module',
    // // 想使用的额外的语言特性:
    ecmaFeatures: {
      experimentalObjectRestSpread: true,
    }
  },
  extends: 'standard',
  plugins: [
    'html',
    'import',
    'promise',
  ],
  // add your custom rules here
  rules: {
    // 禁止条件表达式中出现赋值操作符
    'no-cond-assign': 2,
    // 允许console语句
    'no-console': 1,
    // 允许 debugger
    'no-debugger': 0,
    // 禁止 function 定义中出现重名参数
    'no-dupe-args': 2,
    // var声明
    'no-var': 1,
    // 分号;
    'semi': [
      0,
      'always'
    ],
    // 使用 === 替代 == allow-null允许null和undefined==
    'eqeqeq': [
      2,
      'allow-null'
    ],
    // 禁用 alert、confirm 和 prompt
    'no-alert': 2,
    // 禁用 eval()
    'no-eval': 2,
    // 禁用 with 语句
    'no-with': 2,
    // 要求或禁止使用严格模式指令
    'strict': 2,
    //////////////
    // 要求或禁止 var 声明中的初始化(初值)
    'init-declarations': 2,
    // 不允许 catch 子句的参数与外层作用域中的变量同名
    'no-catch-shadow': 0,
    // 禁止删除变量
    'no-delete-var': 2,
    // 不允许标签与变量同名
    'no-label-var': 2,
    // 禁用特定的全局变量
    'no-restricted-globals': 0,
    // 禁止 var 声明 与外层作用域的变量同名
    'no-shadow': 0,
    // 禁止覆盖受限制的标识符
    'no-shadow-restricted-names': 2,
    // 禁用未声明的变量,除非它们在 /*global */ 注释中被提到
    'no-undef': 2,
    // 禁止将变量初始化为 undefined
    'no-undef-init': 2,
    // 禁止将 undefined 作为标识符
    'no-undefined': 0,
    // 禁止出现未使用过的变量
    'no-unused-vars': [
      0,
      {
        'vars': 'all',
        'args': 'none'
      }
    ],
    // 不允许在变量定义之前使用它们
    'no-use-before-define': 0,
    // 强制一行的最大长度
    'max-len': [
      1,
      200
    ],
    // 文件末尾强制换行
    'eol-last': 0,
    // 强制使用一致的反勾号、双引号或单引号
    'quotes': [
      2,
      'single'
    ],
    // 禁止修改 const 声明的变量
    'no-const-assign': 2,
    // 禁止标识符中有悬空下划线_bar
    'no-underscore-dangle': 0,
    // 禁用行尾空格
    'no-trailing-spaces': 2,
    // 禁用不必要的嵌套块
    'no-lone-blocks': 2,
    // 强制在 JSX 属性中一致地使用双引号或单引号
    'jsx-quotes': 0,
    // 函数定义时括号前面要不要有空格 这里忽略
    'space-before-function-paren': [0, `always`],
    //对象字面量项尾不能有逗号 这里忽略
    'comma-dangle': [0, 'always'],
  },
}

Current Tags

  • 1.6.7                                ...           latest (5 months ago)

71 Versions

  • 1.6.7                                ...           5 months ago
  • 1.6.6                                ...           6 months ago
  • 1.6.5                                ...           6 months ago
  • 1.6.4                                ...           6 months ago
  • 1.6.3                                ...           7 months ago
  • 1.6.2                                ...           7 months ago
  • 1.6.1                                ...           7 months ago
  • 1.6.0                                ...           7 months ago
  • 1.5.3                                ...           7 months ago
  • 1.5.2                                ...           7 months ago
  • 1.5.1                                ...           8 months ago
  • 1.5.0                                ...           8 months ago
  • 1.4.9                                ...           9 months ago
  • 1.4.8                                ...           10 months ago
  • 1.4.7                                ...           10 months ago
  • 1.4.6                                ...           10 months ago
  • 1.4.5                                ...           10 months ago
  • 1.4.4                                ...           10 months ago
  • 1.4.3                                ...           10 months ago
  • 1.4.2                                ...           10 months ago
  • 1.4.1                                ...           10 months ago
  • 1.4.0                                ...           a year ago
  • 1.3.9                                ...           a year ago
  • 1.3.8                                ...           a year ago
  • 1.3.7                                ...           a year ago
  • 1.3.6                                ...           a year ago
  • 1.3.5                                ...           a year ago
  • 1.3.4                                ...           a year ago
  • 1.3.3                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.9                                ...           a year ago
  • 1.2.8                                ...           a year ago
  • 1.2.7                                ...           a year ago
  • 1.2.6                                ...           a year ago
  • 1.2.5                                ...           a year ago
  • 1.2.4                                ...           a year ago
  • 1.2.3                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.9                                ...           a year ago
  • 1.1.8                                ...           a year ago
  • 1.1.7                                ...           a year ago
  • 1.1.6                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4                                ...           a year ago
  • 1.1.3                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.9                                ...           a year ago
  • 1.0.8                                ...           a year ago
  • 1.0.7                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Downloads
Today 0
This Week 72
This Month 74
Last Day 1
Last Week 0
Last Month 4
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |