wix-tpa-style-loader

1.0.14 • Public • Published

Wix TPA style loader Build Status

Webpack loader that handles Wix TPA style params.

Installation

npm install wix-tpa-style-loader

Usage

scss file that contains TPA style params

.foo {
	color: unquote("{{color-1}}");
	font: unquote("; {{body-m}}");
	font-size: 16px;
}

If you are using Yoshi, just specify tpaStyle: true, it will invoke this loader as part of scss requires and it will pass the remain part.

// remain
.foo {
	font-size: 16px;
}

If you want to put a style tag with the TPA params you need to require SCSS file with wix-tpa-style?mode=inline.

require('!wix-tpa-style-loader?mode=inline!scss!./style.scss');

This require will generate code in your bundle that on runtime will put style tag with wix-style attr to the head and the inline part in it.

// inline
.foo {
	color: {{color-1}};
	font: ; {{body-m}};
}

Documentation: Using loaders

License

MIT (http://www.opensource.org/licenses/mit-license.php)

/wix-tpa-style-loader/

    Package Sidebar

    Install

    npm i wix-tpa-style-loader

    Weekly Downloads

    8

    Version

    1.0.14

    License

    MIT

    Unpacked Size

    8.45 kB

    Total Files

    6

    Last publish

    Collaborators

    • arielh
    • falconci
    • yurynix
    • itai.benda
    • wix-ci
    • wix-ambassador
    • shahata
    • netanelgilad
    • wix-ci-publisher
    • wix-bi-publisher