2.0.0 • Published 6 months ago

js-css-migration v2.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

js-css-migration

🎨 Migrate your project from Styled Components to CSS Modules.

npm-version

Features

  • Changes all styles.js files to styles.module.css.
  • Creates a custom class inside styles.module.css for each Styled Component.
  • Refactors the component's return statement with appropriate class names and HTML elements.
  • Removes Styled Component imports and transfers any necessary import statements to the index.js file.

Before You Install

To be able to use command line,

you can either download the package globally or you can add the following command to your package.json file:

  "scripts": {
    ...
    "migrate": "js-css-migration migrate"
  },

Installation

Global Installation

$ npm i js-css-migration -g
$ yarn global add js-css-migration

Normal Installation

$ npm i js-css-migration
$ yarn install js-css-migration

Basic usage

To migrate a specific folder path such as: /src/components/common

$ js-css-migration migrate <folder_path>

To migrate all components under the directory: /src/components/

$ js-css-migration migrate

If you added a script instead of downloading globally, you can use it like this:

$ npm migrate
$ yarn migrate <folder_path>

Documentation

Upcoming.

2.0.0

6 months ago

1.1.6

6 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago