Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Support for postcss-modules #5

Closed
ezavile opened this issue Apr 26, 2017 · 0 comments
Closed

Support for postcss-modules #5

ezavile opened this issue Apr 26, 2017 · 0 comments
Assignees

Comments

@ezavile
Copy link
Owner

ezavile commented Apr 26, 2017

If you are using postcss-modules the plugin has to be able to create a typescript file with the transformed classes.

postcss([
  require('postcss-modules')({
    getJSON: function(cssFileName, json) {
     require('postcss-typescript-css')({
      cssFileName: cssFileName,
      content: json,
     })();
    }
  })
]);

componentName.ts

export const componentNameStyle = {
   componentName: '_ComponentName_h7423_1',
   componentDescendentName: '_ComponentName-descendentName_h7423_1',
   componentModifierName: '_ComponentName--modifierName_h7423_1',
};
@ezavile ezavile self-assigned this Apr 26, 2017
@ezavile ezavile changed the title Support to postcss-modules Support postcss-modules Apr 27, 2017
@ezavile ezavile changed the title Support postcss-modules Support for postcss-modules Apr 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant