Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

build-plugin-at-spa

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-plugin-at-spa

build-scripts for at spa

  • 0.5.12
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

build-plugin-at-spa

build-scripts 插件,支持基于at的业务开发。

使用

"plugins": [
  "build-plugin-ice-app",
  "@ali/build-plugin-ice-def",
  ["build-plugin-at-spa", { "theme": "teambition" }]
]

在项目目录的build.json中配置该插件。

选项

theme为添加的业务类型,可选值为'teambition'(tb),'apsara'(专有云),'infra'(天基),默认值为 'teambition'。

modifyVars可修改scss变量的值,变量详见 https://design.teambition.com/color

对亮暗色均生效:

{
  "modifyVars": {
    "gray-08": "#303040"
  }
}

区分亮暗色生效

{
  "modifyVars": {
    "normal": {
      "gray-08": "#303040"
    },
    "dark": {
      "gray-08": "#404030"
    }
  }
}

commonSassResources,用于设置sass-resources-loaderoptions.resources,可以将一些通用的sass资源(mixin,function等)自动注入到每个scss文件中,避免手动引入。

teamixPrefix,用于业务中 AT 和 @teamix/ui 组件并存,且修改了 @teamix/ui 组件 prefix,并对 @teamix/ui 基础组件做了样式 hack 的情况。用法为:

"plugins": [
  ["build-plugin-at-spa", { "teamixPrefix": "yx-" }]
]

插件会将 teamixPrefix 作为 $teamix-prefix 变量注入,业务组件或业务工程在 hack 基础组件时代码需写成:

$teamix-prefix: 'next-' !default;

.#{$teamix-prefix}btn-text {
  color: var(--color-fill1-6, #8b8b8b) !important;
}

命令行参数

若需要进行暗色模式的开发,build-scripts start --dark,同时修改public/index.htmlteambition.min.cssapsara.min.cssteambition-dark.min.cssapsara-dark.min.css

若要进行亮暗色同时构建, build-scripts build --dm,构建产物中[name].js[name].css为亮色主题对应资源文件,[name]-dark.js[name]-dark.css为暗色色主题对应资源文件。

若需要在start时指定publicPath, build-scripts start --devPublicPath=xxxx

Keywords

FAQs

Package last updated on 10 Aug 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc