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

svelte-preprocess-cssmodules

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-preprocess-cssmodules - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

3

CHANGELOG.md
# Svelte preprocess CSS Modules, changelog
## 2.0.2 (May 26, 2021)
- Fix Readme
## 2.0.1 (May 6, 2021)

@@ -4,0 +7,0 @@ - Fix shorthand directive breaking regular directive

2

package.json
{
"name": "svelte-preprocess-cssmodules",
"version": "2.0.1",
"version": "2.0.2",
"description": "Svelte preprocessor to generate CSS Modules classname on Svelte components",

@@ -5,0 +5,0 @@ "keywords": [

@@ -21,2 +21,3 @@ # Svelte preprocess CSS Modules

- [Webpack](#webpack)
- [Svelte Preprocess](#svelte-preprocess)
- [Options](#options)

@@ -59,3 +60,3 @@ - [Migrating from v1](#migrating-from-v1)

The mode can be set globally from the preprocessor options or locally to override the global settings per component.
The mode can be **set globally from the preprocessor options** or **locally to override the global settings** per component.

@@ -109,7 +110,7 @@ **Mixed mode**

```html
<script module>
<script>
let isActive = true;
</script>
<style>
<style module>
.bold { font-weight: bold; }

@@ -136,7 +137,7 @@ </style>

```html
<script module>
<script>
let active = true;
</script>
<style>
<style module>
.active { font-weight: bold; }

@@ -186,3 +187,3 @@ </style>

* Not needed rule because of the use of :local()
.secondary strong { font-weight: 700 }
.child strong { font-weight: 700 }
*/

@@ -449,2 +450,7 @@ </style>

Chaining several preprocessors may lead to errors if the svelte parser and walker is being manipulated multiple time. This issue is due to the way svelte runs its preprocessor in two phases. [Read more here](https://github.com/firefish5000/svelte-as-markup-preprocessor#motivation)
In that situation, we recommend the use of the package [`svelte-as-markup-preprocessor`](https://github.com/firefish5000/svelte-as-markup-preprocessor).
```bash

@@ -454,9 +460,16 @@ npm install --save-dev svelte-as-markup-preprocessor

**Example with typescript**
```js
const asMarkupPreprocessor = require('svelte-as-markup-preprocessor');
// import packages
const { typescript } = require('svelte-preprocess');
const { asMarkupPreprocessor } = require('svelte-as-markup-preprocessor');
const cssModules = require('svelte-preprocess-cssmodules');
...
// svelte config
preprocess: [
asMarkupPreprocessor([
sveltePreprocess()
typescript()
]),

@@ -468,4 +481,2 @@ cssModules()

Explanation on why svelte-as-markup-preprocessor is needed: [read here](https://github.com/firefish5000/svelte-as-markup-preprocessor#motivation):
### Options

@@ -472,0 +483,0 @@ Pass an object of the following properties

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