postcss-modules-parser

WebJar for postcss-modules-parser

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

postcss-modules-parser
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

postcss-modules-parser
WebJar for postcss-modules-parser
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/css-modules/postcss-icss

Download postcss-modules-parser

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/postcss-modules-parser/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>postcss-modules-parser</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-modules-parser/
implementation 'org.webjars.npm:postcss-modules-parser:1.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-modules-parser/
implementation ("org.webjars.npm:postcss-modules-parser:1.1.1")
'org.webjars.npm:postcss-modules-parser:jar:1.1.1'
<dependency org="org.webjars.npm" name="postcss-modules-parser" rev="1.1.1">
  <artifact name="postcss-modules-parser" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='postcss-modules-parser', version='1.1.1')
)
libraryDependencies += "org.webjars.npm" % "postcss-modules-parser" % "1.1.1"
[org.webjars.npm/postcss-modules-parser "1.1.1"]

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.npm : icss-replace-symbols jar [1.0.2,2)
org.webjars.npm : lodash.foreach jar [3.0.3,4)
org.webjars.npm : postcss jar [5.0.10,6)

Project Modules

There are no modules declared in this project.

postcss-icss

A CSS Modules parser to extract tokens from the css file. Provides opportunity to process multiple files.

API

In order to use it you should provide a fetch function which should load contents of files and process it with the PostCSS instance. fetch function should return promise object which will resolve into tokens.

const ICSS = require('postcss-icss');

function fetch(importee, importerDir, processor) {
  // load content
  return processor.process(css, { from: filename })
    .then(result => result.messages.find(d => d.type === "icss").exportTokens);
}

postcss([ ICSS({ fetch }) ]);
org.webjars.npm

Versions

Version
1.1.1