Skip to content

Commit

Permalink
docs(picker-starter): add giget instruction (#90)
Browse files Browse the repository at this point in the history
* add giget instruction

* move deploy params from package.json script to workflow

* fix prettier
  • Loading branch information
demetriusfeijoo authored Jan 3, 2024
1 parent b92d46d commit 558bc4b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/picker-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
- name: Deploy
env:
STORYBLOK_PERSONAL_ACCESS_TOKEN: ${{secrets.STORYBLOK_PERSONAL_ACCESS_TOKEN}}
run: yarn workspace picker-starter deploy --skipPrompts
run: yarn workspace picker-starter deploy --skipPrompts --name sb-picker-starter --scope partner-portal
18 changes: 11 additions & 7 deletions picker-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,20 @@ export default defineConfig((options) => {

## Local Development

To start the project locally, from the **repository`s root folder**, run:
To start using this starter locally in your project, just run:

```sh
# copy this starter into your cwd
npx giget@latest gh:storyblok/field-type-examples/picker-starter YOUR-PROJECT-NAME

# open it
cd YOUR-PROJECT-NAME

# install all required dependencies
yarn install

# serve the field plugin
yarn workspace picker-starter dev
# then, serve the field plugin
yarn dev
```

Now open the Sandbox URL printed in your terminal:
Expand All @@ -75,10 +81,8 @@ You should see this:

## Deploy

Deploy the field plugin with the [CLI](https://www.npmjs.com/package/@storyblok/field-plugin-cli). Issue a [personal access token](https://app.storyblok.com/#/me/account?tab=token), rename `.env.local.example` to `.env.example`, open the file, set the value `STORYBLOK_PERSONAL_ACCESS_TOKEN`, and run

From the **repository's root folder**, run the following command:
Deploy your field plugin with the [CLI](https://www.npmjs.com/package/@storyblok/field-plugin-cli). Issue a [personal access token](https://app.storyblok.com/#/me/account?tab=token), rename `.env.local.example` to `.env.example`, open the file, set the value `STORYBLOK_PERSONAL_ACCESS_TOKEN`, and from the **plugin's root folder**, run the following command:

```shell
yarn workspace picker-starter deploy
yarn deploy
```
2 changes: 1 addition & 1 deletion picker-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint": "eslint .",
"check:types": "vue-tsc --noEmit",
"preview": "vite preview",
"deploy": "npm run build && npx @storyblok/field-plugin-cli@latest deploy --name sb-picker-starter --scope partner-portal"
"deploy": "npm run build && npx @storyblok/field-plugin-cli@latest deploy"
},
"dependencies": {
"@storyblok/design-system": "^3.19.3",
Expand Down

1 comment on commit 558bc4b

@vercel
Copy link

@vercel vercel bot commented on 558bc4b Jan 3, 2024

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.