@kkt/stylus-modules
npm i @kkt/stylus-modules

@kkt/stylus-modules

Create React apps with no build configuration, Cli tool for creating react apps.

by kktjs

7.2.0 (see all)License:MITTypeScript:Built-In
npm i @kkt/stylus-modules
Readme

@kkt/stylus-modules

npm version

Use create-react-app to build react libraries. Support for regular styl files and *.module.styl files. This package contains a plugin for using stylus with kkt.

Installation

yarn add --dev @kkt/stylus-modules
# or use npm if you don't have yarn yet
npm install --save-dev @kkt/stylus-modules

Usage

In the .kktrc.js or .kktrc.ts you created for kkt add this code:

import stylusModules from '@kkt/stylus-modules';

export default (conf, evn, options) => {
  conf = stylusModules(conf, evn, options);
  return conf;
}

In package.json, add a separate npm script to build library

{
  "scripts": {
    ...
    "bundle": "kkt build --bundle",
    "bundle:min": "kkt build --bundle --mini",
    ...
  }
}

And you can now use CRA to build your library

Configurations

import stylusModules from '@kkt/stylus-modules';

export default (conf, evn, options) => {

  // with loaderOptions
  conf = stylusModules.withLoaderOptions({
    stylusOptions: {
      // Specify the path. where to find files
      paths: ["node_modules/vars"],
    },
  })(conf, env, options);

  return conf;
}

License

Licensed under the MIT License

Downloads/wk

54

GitHub Stars

40

LAST COMMIT

4mos ago

MAINTAINERS

1

CONTRIBUTORS

7

OPEN ISSUES

2

OPEN PRs

10
VersionTagPublished
7.2.0
latest
11d ago
No alternatives found
No tutorials found
Add a tutorial