Skip to content

Commit

Permalink
feat($styled): make $styled work in every integration; tests; prepare…
Browse files Browse the repository at this point in the history
… for v1-beta
  • Loading branch information
Tahul committed Oct 15, 2023
1 parent 565dee2 commit 2cf97dd
Show file tree
Hide file tree
Showing 162 changed files with 3,452 additions and 1,524 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,6 @@ packages/*/dist

# vite-plugin-inspect
.vite-inspect

# vite
vite.config.ts.timestamp-*
24 changes: 24 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
1 change: 1 addition & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
75 changes: 75 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Nuxt 3 Minimal Starter

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install the dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm run build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
5 changes: 5 additions & 0 deletions docs/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div>
<NuxtWelcome />
</div>
</template>
50 changes: 48 additions & 2 deletions docs/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,55 @@
import { createResolver } from '@nuxt/kit'
import { defineNuxtConfig } from 'nuxt/config'

const resolve = (p: string) => createResolver(import.meta.url).resolve(p)

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
css: [
'~/main.postcss',
app: {
head: {
link: [
{
rel: 'icon',
type: 'image/png',
href: '/favicon.png',
},
{
rel: 'icon',
type: 'image/svg+xml',
href: '/favicon.svg',
},
],
},
},

devtools: { enabled: true },

typescript: {
includeWorkspace: false,
},

modules: [
'@nuxt/content',
'@pinceau/nuxt',
],

pinceau: {
debug: 2,
style: {
excludes: [
resolve('../../packages'),
],
},
theme: {
buildDir: resolve('./node_modules/.pinceau'),
layers: [
{
path: resolve('../../packages/palette/'),
},
],
},
},

content: {
highlight: {
theme: {
Expand Down
19 changes: 14 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
{
"name": "@pinceau/docs",
"private": true,
"packageManager": "[email protected]",
"type": "module",
"scripts": {
"dev": "nuxi dev",
"build": "nuxi generate",
"prepare": "nuxi prepare"
"build": "nuxt build",
"stub": "nuxt prepare",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview"
},
"devDependencies": {
"@nuxt/content": "^2.8.5",
"@nuxt/devtools": "latest",
"@pinceau/nuxt": "workspace:*",
"@vueuse/motion": "^2.0.0"
"@pinceau/palette": "workspace:*",
"@vueuse/motion": "^2.0.0",
"nuxt": "^3.7.4",
"nuxt-icon": "^0.5.0",
"vue": "^3.3.4",
"vue-router": "^4.2.5"
}
}
Binary file added docs/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions docs/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../.nuxt/tsconfig.server.json"
}
1 change: 1 addition & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
File renamed without changes.
File renamed without changes.
Empty file added docs_old/app.vue
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions docs_old/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
css: [
'~/main.postcss',
],
content: {
highlight: {
theme: {
default: 'github-light',
dark: 'github-dark',
},
},
},
})
14 changes: 14 additions & 0 deletions docs_old/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@pinceau/docs",
"private": true,
"packageManager": "[email protected]",
"scripts": {
"dev": "nuxi dev",
"build": "nuxi generate",
"prepare": "nuxi prepare"
},
"devDependencies": {
"@pinceau/nuxt": "workspace:*",
"@vueuse/motion": "^2.0.0"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
3 changes: 3 additions & 0 deletions docs_old/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./.nuxt/tsconfig.json"
}
2 changes: 1 addition & 1 deletion examples/astro-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@pinceau/astro": "workspace:*",
"@pinceau/configs": "workspace:*",
"@pinceau/svelte": "workspace:*",
"astro": "^3.2.4"
"astro": "^3.3.0"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/astro-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@pinceau/astro": "workspace:*",
"@pinceau/configs": "workspace:*",
"@pinceau/vue": "workspace:*",
"astro": "^3.2.4"
"astro": "^3.3.0"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@pinceau/astro": "workspace:*",
"astro": "^3.2.4",
"astro": "^3.3.0",
"canvas-confetti": "^1.9.0"
},
"stackblitz": {
Expand Down
1 change: 1 addition & 0 deletions examples/nuxt/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { defineNuxtConfig } from 'nuxt/config'
import { createResolver } from '@nuxt/kit'

const { resolve } = createResolver(import.meta.url)
Expand Down
7 changes: 7 additions & 0 deletions examples/shared/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@pinceau/examples-shared",
"private": "true",
"devDependencies": {
"@pinceau/configs": "workspace:*"
}
}
3 changes: 3 additions & 0 deletions examples/shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@pinceau/configs/tsconfig.base.json"
}
2 changes: 1 addition & 1 deletion examples/vite-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"devDependencies": {
"@pinceau/configs": "workspace:*",
"@pinceau/react": "workspace:*",
"@types/node": "20.8.4",
"@types/node": "20.8.5",
"@types/react": "latest",
"@types/react-dom": "latest",
"@vitejs/plugin-react": "^4.1.0",
Expand Down
21 changes: 21 additions & 0 deletions examples/vite-svelte/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,32 @@
padding: '2em',
margin: '0 auto',
minHeight: '100%',
color: '$color.red.1'
},
},
})
const main = styled({})
const TestComponent = $styled.a({ color: 'green'}).withVariants({
size: {
md: {
padding: '$space.32'
},
options: {
default: 'md'
}
}
})
console.log(TestComponent)
</script>


<div>
<main class={main}>Hello world</main>

<TestComponent color="blue">
hello
</TestComponent>
</div>
1 change: 0 additions & 1 deletion examples/vite-svelte/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default defineConfig({
},
plugins: [
Pinceau({
vue: false,
debug: 2,
style: {
excludes: [
Expand Down
Loading

0 comments on commit 2cf97dd

Please sign in to comment.