npm install @bigcommerce/stencil-styles

Compiles SCSS for the Stencil Framework

About @bigcommerce/stencil-styles

The npm package @bigcommerce/stencil-styles is an essential tool for developers working with the BigCommerce Stencil framework, particularly for those looking to seamlessly compile SCSS files. This node module enhances the development process by providing on-the-fly compilation of SCSS, allowing developers to see immediate changes and streamline their workflow. By using @bigcommerce/stencil-styles, developers can maintain a smooth and efficient pipeline from development to production, ensuring that their storefronts are both visually appealing and performant. The key benefit of this package lies in its ability to integrate directly into the Stencil framework, making it a specialized tool that maximizes the framework’s capabilities.

To get started with this powerful tool, developers can simply run the command `npm install @bigcommerce/stencil-styles` in their project environment. This installation process integrates the module into the Stencil project, setting up developers for immediate success in compiling their custom SCSS. The ease of installation and setup means that developers can quickly begin enhancing their site aesthetics with robust, custom styles tailored to their specific needs. Additionally, @bigcommerce/stencil-styles supports the latest SCSS features and syntax, ensuring that developers are always at the cutting edge of web design technologies. This capability allows for the creation of dynamic, responsive, and visually intricate designs that can adapt across different devices and platforms.

The module not only boosts the visual aspects of an e-commerce site but also contributes to better site performance through optimized style sheets. This optimization reduces the load times and enhances the user experience, which is crucial for maintaining customer satisfaction and improving conversion rates. By leveraging the @bigcommerce/stencil-styles package, developers can achieve a higher level of control and quality over the appearance and feel of their online stores, directly contributing to the brand's success and visibility online.

More from bigcommerce

bigcommerce npm packages

Find the best node modules for your project.

Search npm

@bigcommerce/request-sender

HTTP request client for...

Read more
,

@bigcommerce/script-loader

A library for loading JavaScript files...

Read more
,

node-bigcommerce

A node module for authentication and use with the BigCommerce...

Read more
,

@bigcommerce/checkout-sdk

BigCommerce Checkout JavaScript...

Read more
,

@bigcommerce/stencil-styles

Compiles SCSS for the Stencil...

Read more
,

@bigcommerce/stencil-cli

CLI tool to run BigCommerce Stores locally for theme development...

Read more
,

@bigcommerce/eslint-config

Default ESLint configuration used at...

Read more
,

@bigcommerce/eslint-plugin

This plugin contains a few custom eslint rules we use at BigCommerce...

Read more
,

@bigcommerce/bigpay-client

JavaScript client for...

Read more
,

@bigcommerce/stencil-paper-handlebars

A paper plugin to render pages using Handlebars...

Read more
,

@bigcommerce/citadel

A SASS Library based on Foundation with opinionated naming...

Read more
,

@bigcommerce/handlebars-v4

A simple wrapper for handlebars...

Read more

Dependencies

Core dependencies of this npm package and its dev dependencies.

autoprefixer, cheerio, lodash, node-sass, postcss, recursive-readdir, sass, @hapi/code, @hapi/lab, eslint, sinon

Documentation

A README file for the @bigcommerce/stencil-styles code repository. View Code

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.