Socket
Socket
Sign inDemoInstall

seller-base-service

Package Overview
Dependencies
6
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

seller-base-service

Seller Centre Base Service


Version published
Maintainers
1
0

Weekly downloads

Readme

Source

seller-base-service

安装

npm install seller-base-service --save

使用

import { CommonServiceWithSip } from 'seller-base-service';
console.log(CommonServiceWithSip);

按需引入

安装babel-plugin-import,在babel的plugin中加入这段配置

[require('seller-base-service/dist/babel-config-for-main-project')]

Seller Center 按需引入

Seller Center 由于是多模块模式,因此需要使用的模块需要修改构建配置

{
  externals: [Object.assign(config.getExternalsConfig(), {
    'seller-base': config.getExternalsConfig(['@/framework'])['@/framework']
  })],
  babelPlugin: config.mode === 'production' ? [require('seller-base-service/dist/babel-config-for-main-project')] : []
}

注意

  1. 不要修改删除.gitignore中已有部分
  2. 不要在本项目local.config.js加入个人定制的开发环境代码
  3. 开发一个模块MyService需要创建src/modules/my-service/index.tssrc/modules/my-service/service.ts至少两个文件,src/modules/my-service/index.ts不能有默认导出。
  4. 跨模块引入只能从其他模块入口index.ts,不能从其他模块的其他文件引入。
  5. Constants 作为 MyService 的静态属性,不要额外导出。
  6. src/modules/index.ts代码不能重命名导入。

开发

开发执行

  1. CLI准备,参考CLI文档安装部分
  2. 初始化项目(scc init -d)
  3. yarn start

构建

构建执行

  1. CLI准备,参考CLI文档安装部分
  2. 初始化项目(scc init -b)
  3. yarn build

FAQs

Last updated on 07 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc