Skip to content

Commit

Permalink
feat(schematics): add additional version options
Browse files Browse the repository at this point in the history
* pin postcss-import default to 12.0.1
  • Loading branch information
marcjulian committed Oct 23, 2020
1 parent f54c8f3 commit ef07ab9
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 168 deletions.
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,45 @@ ng add @garygrossgarten/ngx-tailwind
ng add @garygrossgarten/ngx-tailwind --project <MY_PROJECT>
```

Example output

```bash
CREATE webpack.config.js (428 bytes)
UPDATE package.json (1458 bytes)
UPDATE src/styles.scss (272 bytes)
UPDATE angular.json (3828 bytes)
✔ Packages installed successfully.
✔ Packages installed successfully.
Initialized Tailwind
```

> **Note** `postcss-import` in version `13.0.0` breaks currently the build, thus it is pinned to `12.0.1`.
## Additional options

You can pass additional flags to customize the schematic. For example, if you want to install a different version for **Tailwind** use `--tailwindVersion` flag:

```bash
ng add @garygrossgarten/ngx-tailwind --tailwindVersion 1.6.2
ng add @garygrossgarten/ngx-tailwind --tailwindVersion 1.9.5
```

All available flags:

| Flag |  Description | Type |  Default |
| ------------------- | -------------------------------------------- | --------- | ------------------------- |
|  `project` | The project to initialize with Tailwind CSS. | `string` | **First** Angular project |
|  `skipTailwindInit` | Skip initializing Tailwind. | `boolean` | `false` |
|  `tailwindVersion` | The Tailwind version to be installed. | `string` | `latest` |
| Flag |  Description | Type |  Default |
| ----------------------- | -------------------------------------------- | --------- | ------------------------- |
|  `ngxBuildPlusVersion` | The ngx-build-plus version to be installed. | `string` | `latest` |
|  `project` | The project to initialize with Tailwind CSS. | `string` | **First** Angular project |
|  `postcssImportVersion` | The postcss-import version to be installed. | `string` | `12.0.1` |
|  `postcssLoaderVersion` | The postcss-loader version to be installed. | `string` | `latest` |
|  `postcssScssVersion` | The postcss-scss version to be installed. | `string` | `latest` |
|  `skipTailwindInit` | Skip initializing Tailwind. | `boolean` | `false` |
|  `tailwindVersion` | The Tailwind version to be installed. | `string` | `latest` |

Advanced usage

```bash
ng add @garygrossgarten/ngx-tailwind --tailwindVersion 1.9.5 --ngxBuildPlusVersion 10.1.1 --postcssImportVersion 12.0.1 --postcssLoaderVersion 4.0.4 --postcssScssVersion 3.0.2
```

## Developing

Expand Down
Loading

0 comments on commit ef07ab9

Please sign in to comment.