1.0.14 • Published 2 years ago

wix-tpa-style-loader v1.0.14

Weekly downloads
878
License
MIT
Repository
github
Last release
2 years ago

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)

1.0.14

2 years ago

0.0.0

3 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago