Skip to content

Commit

Permalink
fix/tailwind templates (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pmejna authored Dec 5, 2024
1 parent a357704 commit f804a6b
Show file tree
Hide file tree
Showing 11 changed files with 438 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"warm-gorillas-yawn",
"warm-peas-behave",
"wild-crabs-check",
"witty-months-give"
"witty-months-give",
"yellow-jokes-jam"
]
}
5 changes: 5 additions & 0 deletions .changeset/yellow-jokes-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'stplr': patch
---

Add template files
6 changes: 6 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# stplr

## 0.1.0-alpha.41

### Patch Changes

- Add template files

## 0.1.0-alpha.40

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stplr",
"version": "0.1.0-alpha.40",
"version": "0.1.0-alpha.41",
"main": "./dist/index.mjs",
"bin": {
"stplr": "./dist/index.mjs"
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/templates/homepage/files/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
31 changes: 31 additions & 0 deletions packages/cli/templates/homepage/files/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { Metadata } from 'next';
import { Roboto, Playfair_Display } from 'next/font/google';
import './globals.css';

const roboto = Roboto({
subsets: ['latin'],
weight: ['400', '700'],
variable: '--font-roboto',
});

const playfair = Playfair_Display({
subsets: ['latin'],
variable: '--font-playfair',
});

export const metadata: Metadata = {
title: 'Welcome to Stapler',
description: 'Experience the future of organization with Stapler',
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en" className={`${roboto.variable} ${playfair.variable}`}>
<body className="font-sans">{children}</body>
</html>
);
}
358 changes: 358 additions & 0 deletions packages/cli/templates/homepage/files/page.tsx

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions packages/cli/templates/homepage/installConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const homepageFiles = [
{
path: 'apps/web/app/',
files: ['page.tsx', 'layout.tsx', 'globals.css'],
},
];
6 changes: 6 additions & 0 deletions packages/cli/templates/tailwind/files/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
14 changes: 14 additions & 0 deletions packages/cli/templates/tailwind/files/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Config } from 'tailwindcss';
import { fontFamily } from 'tailwindcss/defaultTheme';

export default {
content: ['app/**/*.{ts,tsx}'],
theme: {
extend: {
fontFamily: {
sans: ['var(--font-roboto)', ...fontFamily.sans],
mono: ['var(--font-playfair)', ...fontFamily.mono],
},
},
},
} satisfies Config;
6 changes: 6 additions & 0 deletions packages/cli/templates/tailwind/installConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const tailwindFiles = [
{
path: 'apps/web/',
files: ['postcss.config.cjs', 'tailwind.config.ts'],
},
];

0 comments on commit f804a6b

Please sign in to comment.