Skip to content

Commit

Permalink
new(gatsby-plugin-vanilla-extract): add to repo (#148)
Browse files Browse the repository at this point in the history
* add new package

* Update packages/gatsby-plugin-vanilla-extract/README.md

Co-authored-by: Lennart <lekoarts@gmail.com>

* Update packages/gatsby-plugin-vanilla-extract/README.md

Co-authored-by: Lennart <lekoarts@gmail.com>

* Update packages/gatsby-plugin-vanilla-extract/README.md

Co-authored-by: Lennart <lekoarts@gmail.com>

* Update packages/gatsby-plugin-vanilla-extract/README.md

Co-authored-by: Lennart <lekoarts@gmail.com>

* Update packages/gatsby-plugin-vanilla-extract/README.md

Co-authored-by: Lennart <lekoarts@gmail.com>

* update package.json

* remove renovate.json file

* Update packages/gatsby-plugin-vanilla-extract/README.md

Co-authored-by: Lennart <lekoarts@gmail.com>

* update lock file

* use old version number

* add changeset

* remove useless files

* format code

* docs: add @KyleAMathews as a contributor

* docs: add @marvinjude as a contributor

* Update packages/gatsby-plugin-vanilla-extract/package.json

Co-authored-by: Lennart <lekoarts@gmail.com>

* fix: remove bad tets

* Update .changeset/big-coins-smoke.md

Co-authored-by: Lennart <lekoarts@gmail.com>

Co-authored-by: Lennart <lekoarts@gmail.com>
Co-authored-by: Alex Moon <alex.jared.moon@gmail.com>
  • Loading branch information
3 people committed Feb 1, 2022
1 parent a654620 commit 732226d
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/71047?v=4",
"profile": "https://www.bricolage.io/",
"contributions": [
"doc"
"doc",
"plugin"
]
},
{
Expand All @@ -53,6 +54,15 @@
"doc"
]
},
{
"login": "marvinjude",
"name": "Jude Agboola",
"avatar_url": "https://avatars.githubusercontent.com/u/17142206?v=4",
"profile": "https://marvinjude.dev/",
"contributions": [
"code"
]
},
{
"login": "robinmetral",
"name": "Robin Métral",
Expand Down
13 changes: 13 additions & 0 deletions .changeset/big-coins-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"gatsby-plugin-vanilla-extract": major
---

This moves the repository from [KyleAMathews/gatsby-plugin-vanilla-extract](https://github.com/KyleAMathews/gatsby-plugin-vanilla-extract) to [gatsby-uc/plugins](https://github.com/gatsby-uc/plugins) to help with better maintenance on the plugin itself.

There was also a breaking change made to the plugin: The `vanilla-extract` dependencies are now marked as `peerDependencies` and not bundled with the plugin anymore.

In order to migrate, run the following in your terminal:

```shell
npm install gatsby-plugin-vanilla-extract@latest @vanilla-extract/babel-plugin @vanilla-extract/css @vanilla-extract/webpack-plugin
```
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center"><a href="https://github.com/moonmeister"><img src="https://avatars.githubusercontent.com/u/2730871?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alex Moon</b></sub></a><br /><a href="https://github.com/gatsby-uc/plugins/commits?author=moonmeister" title="Code">💻</a> <a href="https://github.com/gatsby-uc/plugins/commits?author=moonmeister" title="Documentation">📖</a> <a href="#ideas-moonmeister" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-moonmeister" title="Maintenance">🚧</a> <a href="#plugin-moonmeister" title="Plugin/utility libraries">🔌</a> <a href="#projectManagement-moonmeister" title="Project Management">📆</a> <a href="#tool-moonmeister" title="Tools">🔧</a></td>
<td align="center"><a href="http://everfund.co.uk/"><img src="https://avatars.githubusercontent.com/u/15834048?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Christopher Burns</b></sub></a><br /><a href="#plugin-Burnsy" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/gatsby-uc/plugins/commits?author=Burnsy" title="Code">💻</a></td>
<td align="center"><a href="https://www.bricolage.io/"><img src="https://avatars.githubusercontent.com/u/71047?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kyle Mathews</b></sub></a><br /><a href="https://github.com/gatsby-uc/plugins/commits?author=KyleAMathews" title="Documentation">📖</a></td>
<td align="center"><a href="https://www.bricolage.io/"><img src="https://avatars.githubusercontent.com/u/71047?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kyle Mathews</b></sub></a><br /><a href="https://github.com/gatsby-uc/plugins/commits?author=KyleAMathews" title="Documentation">📖</a> <a href="#plugin-KyleAMathews" title="Plugin/utility libraries">🔌</a></td>
<td align="center"><a href="http://www.davejudd.com/"><img src="https://avatars.githubusercontent.com/u/12941979?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dave Judd</b></sub></a><br /><a href="https://github.com/gatsby-uc/plugins/commits?author=SirDaev" title="Documentation">📖</a></td>
<td align="center"><a href="https://marvinjude.dev/"><img src="https://avatars.githubusercontent.com/u/17142206?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jude Agboola</b></sub></a><br /><a href="https://github.com/gatsby-uc/plugins/commits?author=marvinjude" title="Code">💻</a></td>
<td align="center"><a href="https://robinmetral.com/"><img src="https://avatars.githubusercontent.com/u/35560568?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Robin Métral</b></sub></a><br /><a href="#plugin-robinmetral" title="Plugin/utility libraries">🔌</a></td>
</tr>
</table>
Expand Down
66 changes: 66 additions & 0 deletions packages/gatsby-plugin-vanilla-extract/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# gatsby-plugin-vanilla-extract

Gatsby plugin which wraps the [vanilla-extract](https://vanilla-extract.style/) project for easy use in Gatsby.

## Setup

```shell
npm install gatsby-plugin-vanilla-extract @vanilla-extract/babel-plugin @vanilla-extract/css @vanilla-extract/webpack-plugin
```

Add to your site's `gatsby-config.js`.

```js
module.exports = {
plugins: [`gatsby-plugin-vanilla-extract`],
};
```

You can also pass any [vanilla-extract configuration object](https://vanilla-extract.style/documentation/setup/#configuration) to the plugin.

```js
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-vanilla-extract`,
options: {
identifiers: `short`,
},
},
],
};
```

## How to use

See the [vanilla-extract website](https://vanilla-extract.style/) for full documentation.

`src/pages/index.tsx`:

```tsx
import * as React from "react";

import { className } from "../styles/index.css.ts";

export default function Index() {
return <div className={className}>Pizza</div>;
}
```

`src/styles/index.css.ts`:

```ts
import { style } from "@vanilla-extract/css";

export const className = style({
background: "red",
});
```

### Example Project

Kick off your project using Gatsby's [example project](TODO)

## Useful Links

- [TypeScript & Gatsby](https://www.gatsbyjs.com/docs/how-to/custom-configuration/typescript/)
13 changes: 13 additions & 0 deletions packages/gatsby-plugin-vanilla-extract/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { VanillaExtractPlugin } = require("@vanilla-extract/webpack-plugin");

exports.onCreateBabelConfig = ({ actions }, pluginOptions) => {
actions.setBabelPlugin({
name: require.resolve(`@vanilla-extract/babel-plugin`),
});
};

exports.onCreateWebpackConfig = ({ actions }, pluginOptions) => {
actions.setWebpackConfig({
plugins: [new VanillaExtractPlugin(pluginOptions)],
});
};
1 change: 1 addition & 0 deletions packages/gatsby-plugin-vanilla-extract/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop
27 changes: 27 additions & 0 deletions packages/gatsby-plugin-vanilla-extract/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "gatsby-plugin-vanilla-extract",
"version": "1.0.6",
"description": "Gatsby plugin which wraps the vanilla-extract package for easy use",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/gatsby-uc/plugins.git",
"directory": "packages/gatsby-plugin-vanilla-extract"
},
"keywords": [
"gatsby",
"gatsby-plugin"
],
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/gatsby-uc/plugins/issues"
},
"homepage": "https://github.com/gatsby-uc/plugins/tree/main/packages/gatsby-plugin-vanilla-extract#readme",
"peerDependencies": {
"@vanilla-extract/babel-plugin": "^1.0.0",
"@vanilla-extract/css": "^1.0.0",
"@vanilla-extract/webpack-plugin": "^2.0.0",
"gatsby": "^3.0.0 || ^4.0.0"
}
}
1 change: 1 addition & 0 deletions templates/saved-replies.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Old Repo Issue Response

When archiving a repo that's been transfered to the GUC issues that could still be implemented need to be responded to if not transfered to the GUC issues. Here is the recomended response:

```markdown
Expand Down
11 changes: 11 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10986,6 +10986,17 @@ __metadata:
languageName: node
linkType: hard

"gatsby-plugin-vanilla-extract@workspace:packages/gatsby-plugin-vanilla-extract":
version: 0.0.0-use.local
resolution: "gatsby-plugin-vanilla-extract@workspace:packages/gatsby-plugin-vanilla-extract"
peerDependencies:
"@vanilla-extract/babel-plugin": ^1.0.0
"@vanilla-extract/css": ^1.0.0
"@vanilla-extract/webpack-plugin": ^2.0.0
gatsby: ^3.0.0 || ^4.0.0
languageName: unknown
linkType: soft

"gatsby-react-router-scroll@npm:^4.14.0":
version: 4.14.0
resolution: "gatsby-react-router-scroll@npm:4.14.0"
Expand Down

0 comments on commit 732226d

Please sign in to comment.