@bigcommerce/stencil-styles

中文文档
6.2.7发布于 2025/11/13BSD-4-ClauseCommonJS近 30 天下载 9603

Compiles SCSS for the Stencil Framework

原始使用文档

Stencil Styles

Compiles SCSS On-The-Fly for the Stencil Framework

Usage

This is assuming you are using Glue and have added stencil-styles to your manifest file

const StencilStyles = require('@bigcommerce/stencil-styles');

const stencilStyles = new StencilStyles;

stencilStyles.compile(compiler, {
    data: '', //Initial SCSS content,
    files: {}, //An object of all files needed to compile using key as the path name and val as the content
    dest: '', // `dest` option for SCSS
    themeSettings: {}, // Flat object of arbitrary settings that can be used by the stencil sass functions
    autoprefixerOptions: { // Autoprefixer Options
        cascade: true,
        browsers: ["> 5% in US"]
    }
}, (err, css) => {
    // `css` will be the compiled SCSS
});

License

Copyright (c) 2015-present, Bigcommerce Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Bigcommerce Inc.
  4. Neither the name of Bigcommerce Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY BIGCOMMERCE INC ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BIGCOMMERCE INC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

版本与发布记录

@bigcommerce/stencil-styles 共发布 35 个版本,首次发布于 2016/03/08;过去 12 个月发布了 2 个版本。

版本发布日期距今
6.2.7latest2025/11/1311 个月前
6.2.62025/11/1311 个月前
6.2.52025/11/041 年前
6.2.42025/11/041 年前
6.2.32025/10/311 年前
6.2.22025/10/131.1 年前

关于 @bigcommerce/stencil-styles 的常见问题

@bigcommerce/stencil-styles 是什么?

Compiles SCSS for the Stencil Framework

如何安装 @bigcommerce/stencil-styles?

在项目目录运行 npm install @bigcommerce/stencil-styles,或使用 pnpm add / yarn add / bun add。

@bigcommerce/stencil-styles 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bigcommerce__stencil-styles 是否存在。

@bigcommerce/stencil-styles 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bigcommerce/stencil-styles 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bigcommerce/stencil-styles 可以商用吗?

@bigcommerce/stencil-styles 使用 BSD-4-Clause 许可。声明的许可为 BSD-4-Clause,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@bigcommerce/stencil-styles 的下载量有多少?

根据 npm 官方下载统计,@bigcommerce/stencil-styles 在 2026/10/08 – 2026/11/06 这 30 天内被下载 9,603 次,日均约 320 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bigcommerce/stencil-styles 还在维护吗?

最新版本 6.2.7 发布于 2025/11/13(11 个月前);至今共发布 35 个版本,其中过去 12 个月发布了 2 个;首次发布于 2016/03/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。