How to use css-modules-flow-types-printer - 3 common examples

To help you get started, we’ve selected a few css-modules-flow-types-printer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github skovhus / css-modules-flow-types / packages / css-modules-flow-types-loader / index.js View on Github external
module.exports = function cssModulesFlowTypesLoader(content) {
  const tokens = getTokens(content);

  // NOTE: We cannot use .emitFile as people might use this with devServer
  // (e.g. in memory storage).
  const outputPath = this.resourcePath + '.flow';
  fs.writeFile(
    outputPath,
    printFlowDefinition(tokens, getLineSeparator(content)),
    {},
    function() {}
  );

  return content;
};
github skovhus / css-modules-flow-types / packages / css-modules-flow-types-cli / src / converter.js View on Github external
.then(res => {
          if (res) {
            const tokens = Object.keys(res);
            const content = printFlowDefinition(
              tokens,
              this.eol || getLineSeparator(tokens[0])
            );
            resolve(content);
          } else {
            reject(res);
          }
        })
        .catch(err => reject(err));
github skovhus / css-modules-flow-types / packages / css-modules-flow-types-cli / src / converter.js View on Github external
.then(res => {
          if (res) {
            const tokens = Object.keys(res);
            const content = printFlowDefinition(
              tokens,
              this.eol || getLineSeparator(tokens[0])
            );
            resolve(content);
          } else {
            reject(res);
          }
        })
        .catch(err => reject(err));

css-modules-flow-types-printer

Prints CSS Modules tokens as a flow definition

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis