Skip to content

Commit

Permalink
rename extension name from .postcss to .pcss (#469)
Browse files Browse the repository at this point in the history
* rename extension name from .postcss to .pcss

* add changeset

---------

Co-authored-by: Davis SHYAKA <[email protected]>
Co-authored-by: Hunter Johnston <[email protected]>
  • Loading branch information
3 people authored Nov 22, 2023
1 parent 07502ab commit 9660a09
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-cows-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn-svelte": patch
---

rename extension name from .postcss to .pcss
2 changes: 1 addition & 1 deletion apps/www/src/content/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You will be asked a few questions to configure `components.json`:
```txt showLineNumbers
Which style would you like to use? › Default
Which color would you like to use as base color? › Slate
Where is your global CSS file? › src/app.postcss
Where is your global CSS file? › src/app.pcss
Where is your tailwind.config.[cjs|js|ts] located? › tailwind.config.js
Configure the import alias for components: › $lib/components
Configure the import alias for utils: › $lib/utils
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/content/components-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Path to the CSS file that imports Tailwind CSS into your project.
```json title="components.json"
{
"tailwind": {
"css": "src/app.postcss"
"css": "src/app.pcss"
}
}
```
Expand Down
12 changes: 6 additions & 6 deletions apps/www/src/content/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ You will be asked a few questions to configure `components.json`:
```txt showLineNumbers
Which style would you like to use? › Default
Which color would you like to use as base color? › Slate
Where is your global CSS file? › src/app.postcss
Where is your global CSS file? › src/app.pcss
Where is your tailwind.config.[cjs|js|ts] located? › tailwind.config.js
Configure the import alias for components: › $lib/components
Configure the import alias for utils: › $lib/utils
Expand Down Expand Up @@ -200,9 +200,9 @@ Feel free to add or modify as needed to suit your project.

### Configure styles

Add the following to your `src/app.postcss` file. You can learn more about using CSS variables for theming in the [theming section](/docs/theming).
Add the following to your `src/app.pcss` file. You can learn more about using CSS variables for theming in the [theming section](/docs/theming).

```css title="src/app.postcss"
```css title="src/app.pcss"
@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down Expand Up @@ -369,7 +369,7 @@ Create `src/routes/+layout.svelte` and import the styles:

```svelte title="src/routes/+layout.svelte"
<script lang="ts">
import "../app.postcss";
import "../app.pcss";
</script>
<slot />
Expand Down Expand Up @@ -404,12 +404,12 @@ src
├── routes
│ ├── +page.svelte
│ └── +layout.svelte
├── app.postcss
├── app.pcss
```

- Place the UI components in the `lib/components/ui` folder.
- The rest of the components such as `<PageHeader />` and `<Navigation />` are placed in the `lib/components` folder.
- The `lib/utils.ts` file is where you can define the `cn` helper.
- The `app.postcss` file contains the global CSS.
- The `app.pcss` file contains the global CSS.

That's it. You can now start adding components to your project.
2 changes: 1 addition & 1 deletion apps/www/src/content/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Here's the list of variables available for customization:

The following is the default color palette used by the components.

```css title="src/app.postcss"
```css title="src/app.pcss"
@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const init = new Command()
type: "confirm",
name: "proceed",
message:
"Running this command will install dependencies and overwrite your existing tailwind.config.[cjs|js|ts] & app.postcss file. Proceed?",
"Running this command will install dependencies and overwrite your existing tailwind.config.[cjs|js|ts] & app.pcss file. Proceed?",
initial: true
}
]);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { resolveImport } from "./resolve-imports";
export const DEFAULT_STYLE = "default";
export const DEFAULT_COMPONENTS = "$lib/components";
export const DEFAULT_UTILS = "$lib/utils";
export const DEFAULT_TAILWIND_CSS = "src/app.postcss";
export const DEFAULT_TAILWIND_CSS = "src/app.pcss";
export const DEFAULT_TAILWIND_CONFIG = "tailwind.config.cjs";
export const DEFAULT_TAILWIND_BASE_COLOR = "slate";

Expand Down

1 comment on commit 9660a09

@vercel
Copy link

@vercel vercel bot commented on 9660a09 Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.