npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sweetui/sweet-mobile-sdk

v1.6.7

Published

Sweet Mobile SDK. Mobile end building package based on Vue.js 2

Downloads

181

Readme

@sweet-mobile-sdk 文档

基于[email protected] [email protected]的移动端构建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'],
  },
}