Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Housekeeping module name references #1414

Merged
merged 6 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ComponentName
```
✔ ++ faststore/packages/ui/src/atoms/ComponentName/ComponentName.tsx
✔ ++ faststore/packages/ui/src/atoms/ComponentName/index.tsx
✔ ++ faststore/themes/theme-b2c-tailwind/src/atoms/component-name.css
✔ ++ faststore/packages/styles/src/atoms/component-name.css
✔ ++ faststore/packages/ui/src/atoms/ComponentName/ComponentName.test.tsx
✔ ++ faststore/packages/ui/src/atoms/ComponentName/stories/ComponentName.stories.tsx
✔ ++ faststore/packages/ui/src/atoms/ComponentName/stories/ComponentName.mdx
Expand Down
7 changes: 1 addition & 6 deletions apps/docs/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ FastStore encapsulates the following three main packages:
Besides these three main libraries, FastStore also counts with the following packages:

- **`graphql-utils`** - Extracts and processes GraphQL queries.
- **`lighthouse-config`** - An ecommerce focused [Lighthouse](https://developers.google.com/web/tools/lighthouse/) CI configuration.
- **`renovate-config`** - Configuration of [Renovate](https://github.com/renovatebot/renovate), a bot responsible for updating dependencies automatically.

:::caution
If you check FastStore repository on GitHub, you'll also find some Gatsby-specific plugins (`@vtex/gatsby-plugin-cms`, `@vtex/gatsby-plugin-nginx`, `@vtex/gatsby-source-store`, `@vtex/gatsby-source-vtex`. We aim to provide Gatsby-agnostic solutions for these plugins soon.
:::
- **`lighthouse`** - An ecommerce focused [Lighthouse](https://developers.google.com/web/tools/lighthouse/) CI configuration.

## Get involved

Expand Down
2 changes: 1 addition & 1 deletion generators/plopfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default (plop: NodePlopAPI) => {
},
{
type: 'add',
path: '../themes/theme-b2c-tailwind/src/{{atomicGroup}}/{{kebabCase name}}.css',
path: '../packages/styles/src/{{atomicGroup}}/{{kebabCase name}}.css',
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool! I thought about it yesteday ~ and now it's updated 💯

Copy link
Contributor

Choose a reason for hiding this comment

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

🐜 mind reader 👁️

templateFile: 'templates/style.css.hbs',
},
{
Expand Down
14 changes: 7 additions & 7 deletions packages/graphql-utils/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @vtex/graphql-utils
# @faststore/graphql-utils

GraphQL utilities to use GraphQL over HTTP with ZERO bundle sizes

Expand Down Expand Up @@ -31,7 +31,7 @@ Installing this plugin may vary depending on your setup. The instructions below
To install, just

```sh
$ yarn add @vtex/graphql-utils
$ yarn add @faststore/graphql-utils
```

> Note. Also make sure to install [graphql codegen cli](https://www.graphql-code-generator.com/docs/getting-started/installation)
Expand All @@ -44,7 +44,7 @@ To generate the persisted query file, add this plugin to your codegen config. If
generates:
path/to/persisted.json:
plugins:
- @vtex/graphql-utils/codegen
- @faststore/graphql-utils/codegen
```

Now, open your terminal and run:
Expand All @@ -63,7 +63,7 @@ To use it on Gatsby, we need to setup the babel plugin. To do this, we can use G
// ...
exports.onCreateBabelConfig = ({ actions }) => {
actions.setBabelPlugin({
name: `@vtex/graphql-utils/babel`,
name: `@faststore/graphql-utils/babel`,
options: {},
})
}
Expand All @@ -76,7 +76,7 @@ Now you should be good to go and create your queries.
Now that you have successfully installed and configured both babel and codegen plugins, you can start writing your queries. Let's start by declaring the following code:

```tsx
import { gql, request } from '@vtex/graphql-utils'
import { gql, request } from '@faststore/graphql-utils'

const MyQuery = gql`
query MyQuery { ... }
Expand All @@ -95,7 +95,7 @@ That's it! you can use this in most GraphQL Clients, like Apollo Client, SWR, an
For instance, to use it with SWR, you can declare a useQuery hook:

```tsx
import { request } from '@vtex/graphql-utils'
import { request } from '@faststore/graphql-utils'

const useQuery = ({ operationName, variables }) =>
useSWR(`/graphql/${operationName}::${JSON.stringify(variables)}`, {
Expand All @@ -106,7 +106,7 @@ const useQuery = ({ operationName, variables }) =>
and use it on your code like:

```tsx
import { gql } from '@vtex/graphql-utils'
import { gql } from '@faststore/graphql-utils'

const MyQuery = qql`
query MyQuery { ... }
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ module.exports = {
'@storybook/addon-a11y',
'storybook-addon-themes',
],
staticDirs: ['../../../themes'],
staticDirs: ['../../styles'],
}
2 changes: 1 addition & 1 deletion packages/ui/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<link rel="stylesheet" type="text/css" href="./theme-b2c-tailwind/dist/index.css" />
<link rel="stylesheet" type="text/css" href="./dist/index.css" />
8 changes: 4 additions & 4 deletions packages/ui/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ export const parameters = {
},
themes: {
clearable: false,
default: 'theme-b2c-tailwind',
default: 'styles',
list: [
{ name: 'none', class: 'no-theme', color: '#FFFFFF' },
{
name: 'theme-b2c-tailwind',
class: 'theme-b2c-tailwind',
name: 'styles',
class: 'styles',
color: '#999999',
},
],
Expand All @@ -39,7 +39,7 @@ export const parameters = {
var theme = document.createElement('link')
theme.rel = 'stylesheet'
theme.type = 'text/css'
theme.href = `./${themeName}/dist/index.css`
theme.href = `./dist/index.css`

document
.getElementById('storybook-preview-iframe')
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
"@types/jest-axe": "^3.5.3",
"@types/tabbable": "^3.1.1",
"@types/testing-library__jest-dom": "^5.9.5",
"@vtex/theme-b2c-tailwind": "^1.8.42",
"@vtex/tsconfig": "^0.5.0",
"@faststore/styles": "^1.10.18",
"chalk": "^5.0.0",
"jest-axe": "^5.0.1",
"jest-matcher-utils": "^27.4.2",
Expand Down
14 changes: 0 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8454,18 +8454,6 @@
"@typescript-eslint/types" "5.28.0"
eslint-visitor-keys "^3.3.0"

"@vtex/theme-b2c-tailwind@^1.8.42":
version "1.8.42"
resolved "https://registry.yarnpkg.com/@vtex/theme-b2c-tailwind/-/theme-b2c-tailwind-1.8.42.tgz#593a1eb9d7d03d1553203e4c10deb0f7ceb08a2c"
integrity sha512-JbgYXWvJM+tQ92rEnHbrGdH3gqQFnBBQXzKz2RjWtntvSiWR7K93xbeAQ4rVPrwUP3cp82aOlVFGtNz8QYF9lg==
dependencies:
postcss-cli "^8.3.1"

"@vtex/tsconfig@^0.5.0":
version "0.5.6"
resolved "https://registry.yarnpkg.com/@vtex/tsconfig/-/tsconfig-0.5.6.tgz#c0eb4222a75d1b8a4fefb1d85bbd9349880ddbe5"
integrity sha512-3pdtp0QiUjW3YqyA+2YPV3AsAJ68wHWELrg7JMlr7ULHNb4mUfmTBx31zbWG94K3OWp0KJFfF3ytQ+I68foqKA==

"@webassemblyjs/ast@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7"
Expand Down Expand Up @@ -24345,8 +24333,6 @@ ssri@^6.0.0, ssri@^6.0.1:
version "6.0.2"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5"
integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==
dependencies:
figgy-pudding "^3.5.1"

ssri@^8.0.1:
version "8.0.1"
Expand Down