From b8e02dc4c6f7d58727dfbfadfb829e23deb7f306 Mon Sep 17 00:00:00 2001 From: Tiphaine Date: Fri, 5 Jul 2024 16:02:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 35d41fa..3673663 100644 --- a/README.md +++ b/README.md @@ -3,24 +3,46 @@ A template for starting all your Webflow projects requiring code. Looks like the one of [finsweet](https://github.com/finsweet/developer-starter) but it's easily customable. +## Requirements + +Install pnpm on you computer +```bash +npm i -g pnpm +``` + +Got a npm token (named NPM_TOKEN) : [How to do](https://docs.npmjs.com/creating-and-viewing-access-tokens) + ## Installation 1. Click on Use this template > [Create a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template) -2. In your editor +2. Change some settings in your repository + +```Settings > Actions > General > Workflow Permissions``` + +- Read and write permissions. +- Allow GitHub Actions to create and approve pull requests. + +```Settings > Secrets and variables > Actions > New repository secret ``` +- Name : NPM_TOKEN +- Secret : you token +3. Install dependencies ```bash pnpm install ``` -Run dev + +You can start your project ! Here two usefull script + +Dev mode (with live reload) ```bash pnpm dev ``` -Run build (for production) +Build (for production) ```bash pnpm build ``` -3. Write your code in src/index.ts (don't touch Webflow.push but you should remove console.log) +4. Write your code in src/index.ts (don't touch Webflow.push but you should remove console.log) ```typescript Webflow.push(() => {