|
1 | | -# `lib-quickstart-template` - Quickstart Template |
| 1 | +# Dax Patterns |
2 | 2 |
|
3 | | -A ready-to-use template containing everything you need to start developing your own DAX Lib library. |
4 | | - |
5 | | -## 🚀 Getting Started |
6 | | - |
7 | | -### 1. Create a New Repository from this Template |
8 | | - |
9 | | -- Click [](https://github.com/daxlib/lib-quickstart-template/generate) to create your new repository based on this template. |
10 | | -- Enter a repository name that reflects the name of the library you want to develop. |
11 | | - |
12 | | -> [!TIP] |
13 | | -> Need to develop more libraries? Simply reuse this template and generate a new repository for each one. |
14 | | -
|
15 | | -### 2. Fork the DAX Lib repository |
16 | | - |
17 | | -- If you already created a fork of the [DAX Lib](https://github.com/daxlib/daxlib) repository, you can skip this step. |
18 | | -- Click [](https://github.com/daxlib/daxlib/fork) to create a fork of the official [DAX Lib](https://github.com/daxlib/daxlib) repository |
19 | | -- Your fork will be created in your GitHub account |
20 | | - |
21 | | -> [!NOTE] |
22 | | -> A fork is required to create a pull request from your repository to the official [DAX Lib](https://github.com/daxlib/daxlib) repository. We recommend keeping the fork name as `daxlib` to simplify configuration. If you choose a different name, make sure to update the `DAXLIBFORK_NAME` variable in the workflow file `.github/workflows/publish-package.yml`. |
23 | | -
|
24 | | -## ⚙️ Repository Setup |
25 | | - |
26 | | -Follow these steps to configure your new repository: |
27 | | - |
28 | | -### 1. Create a Personal Access Token (PAT) |
29 | | - |
30 | | -- Go to [GitHub PAT settings](https://github.com/settings/personal-access-tokens/) in your GitHub account and click **Generate new token** |
31 | | -- Configure the token with these settings: |
32 | | - - **Token name**: `DAXLIBFORK_PAT` |
33 | | - - **Description**: `Token for pushing changes to my DAX Lib fork` (or any description you prefer) |
34 | | - - **Resource owner**: your GitHub account |
35 | | - - **Expiration**: choose `No expiration` or set a date (remember to renew before expiry) |
36 | | - - **Repository access**: select `Only select repositories`, then chose your forked `daxlib` repository |
37 | | -- Set permissions: |
38 | | - - Click `+ Add permissions` |
39 | | - - Select `Contents` |
40 | | - - Change access level from `Read-only` to `Read and write` |
41 | | -- Click **Generate token** |
42 | | -- Copy the token (PAT) and store it securely - you won't be able to see it again once you leave the page |
43 | | - |
44 | | -### 2. Add the Token to Your Repository |
45 | | - |
46 | | -- Open the **Settings** tab of your new repository (the one created from this template) |
47 | | -- Navigate to **Secrets and variables** → **Actions** in the left sidebar |
48 | | -- Click **New repository secret** |
49 | | -- Add the secret: |
50 | | - - **Name**: `DAXLIBFORK_PAT` |
51 | | - - **Secret**: Paste the Personal Access Token (PAT) you created earlier |
52 | | -- Click **Add secret** |
53 | | - |
54 | | -## 🧩 Customize Your Library |
55 | | - |
56 | | -The template includes a boilerplate library called `Contoso.Sample`. Customize it for your needs: |
57 | | - |
58 | | -- Update library metadata: edit `src/manifest.daxlib` to set your library's name, version and other metadata |
59 | | -- Add your functions: edit `src/lib/functions.tmld` to define your library's functions |
60 | | - |
61 | | -## 📦 Publish Your Library |
62 | | - |
63 | | -Once your code is ready, you can publish a new version: |
64 | | - |
65 | | -- Go to the **Actions** tab in your repository |
66 | | -- Select the `publish-package` workflow from the left sidebar |
67 | | -- Click **Run workflow** and confirm |
68 | | -- Wait for the workflow to complete |
69 | | -- After completion, a summary will appear with a link to create a Pull Request to the official DAX Lib repository |
70 | | -- Click the link to open your Pull Request, add a description, and submit it for review |
71 | | -- If you make further changes, re-run the workflow to update the branch and the Pull Request automatically |
72 | | - |
73 | | -> [!TIP] |
74 | | -> You can iterate on your changes as many times as needed before the pull request is merged. Just keep the same library version in `manifest.daxlib`, and each workflow run will update the same pull request. |
75 | | -## 📚 Resources |
76 | | - |
77 | | -- [DAX Lib documentation](https://docs.daxlib.org/) |
78 | | -- [DAX Lib repository](https://github.com/daxlib/daxlib) |
| 3 | +This is the repository for the libraries of all [DAX Patterns](https://www.daxpatterns.com/). Each pattern has a corresponding library, which is one folder of this repository. |
0 commit comments