You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/_workflow-samples/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This workflow gets triggered with every push to the main branch, and doesn't ver
12
12
```
13
13
- create an IAM with a policy that provides it with programmatic access to the bucket
14
14
- add the AWS Access Key and Secret from the IAM [as encrypted secrets to the project repository](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository). Use `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY`
15
-
- add the bucket name as an evironemnt variable (`DEPLOY_BUCKET`) to the deploy workflow. Omit `s3://` from the bucket name.
15
+
- add the bucket name as an environment variable (`DEPLOY_BUCKET`) to the deploy workflow. Omit `s3://` from the bucket name.
16
16
17
17
## Serving site from sub-path
18
18
This workflow assumes that the site is served from the root of the URL (eg. devseed.com). To support a URL served from a sub-path (eg. devseed.com/explorer), add the following step:
Copy file name to clipboardExpand all lines: README.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# project-seed v7
1
+
# project-seed v8
2
2
3
3
A basic starting point for web projects that uses parcel as a Build System.
4
4
@@ -18,22 +18,24 @@ Steps to follow as soon as you download this structure to start a project:
18
18
It's better to do this straight away so no traces of project-seed are ever pushed to github and just looks more professional.
19
19
The values that are not immediately know should be left blank and filled ASAP.
20
20
21
-
## Parcel for building, node to orchestrate
21
+
## Vite for building
22
22
23
-
[Parcel](https://parceljs.org/) is used to bundle all the needed assets for the application, but there are some edge cases in some projects that parcel can't handle very well. Anything that must happen outside the final bundle, parcel can't deal with properly. For example, [parcel's static file plugin](https://github.com/elwin013/parcel-reporter-static-files-copy) will just copy the files to the dist folder, [without watching them](https://github.com/elwin013/parcel-reporter-static-files-copy#flaws-and-problems) for changes.
23
+
[Vite](https://vite.dev/) is used to bundle all the needed assets for the application.
24
+
There are two commands, both run via `pnpm`
24
25
25
-
To solve this problem, some node glue code is used to orchestrate tasks. With it, tasks can be setup to do all that is needed, and then parcel is executed to bundle the app.
26
+
-`pnpm build` - clean & build everything and put it into dist folder
27
+
-`pnpm serve` - serve the pages and utilize live reload on changes to fonts, images, scripts and HTML.
26
28
27
-
There are two commands, both run via `npm`
29
+
## Chakra UI for styling
28
30
29
-
-`npm run build` - clean & build everything and put it into dist folder
30
-
-`npm run serve` - serve the pages and utilize live reload on changes to fonts, images, scripts and HTML.
31
+
Project Seed uses [Chakra UI](https://chakra-ui.com/) for styling as a UI framework. It is a component library that provides a set of accessible and reusable components facilitating the development of web applications.
31
32
33
+
If you don't want it, you just need to remove the `@chakra-ui/react` dependency from the `package.json` and remove the import from the `main.tsx` file.
32
34
33
35
### Configurations and environment variables
34
36
35
37
At times, it may be necessary to include options/variables specific to `production`, `staging` or `local` in the code. To handle this, there you can use `.env` files.
36
-
See Parcel documentation on [env variables](https://parceljs.org/features/node-emulation/#environment-variables).
38
+
See Vite's documentation on [env variables](https://vite.dev/guide/env-and-mode.html#env-variables-and-modes).
37
39
38
40
## Github Actions for CI
39
41
Testing and deployment is taken care of by Github Actions. It is set up to:
Copy file name to clipboardExpand all lines: _README.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,8 @@ The steps below will walk you through setting up your own instance of the projec
8
8
### Install Project Dependencies
9
9
To set up the development environment for this website, you'll need to install the following on your system:
10
10
11
-
-[Node](http://nodejs.org/) v20 (To manage multiple node versions we recommend [nvm](https://github.com/creationix/nvm))
11
+
-[Node](http://nodejs.org/) v22 (To manage multiple node versions we recommend [nvm](https://github.com/creationix/nvm))
12
+
-[pnpm](https://pnpm.io/) Install using corepack (`corepack enable pnpm`)
12
13
13
14
### Install Application Dependencies
14
15
@@ -21,7 +22,7 @@ nvm install
21
22
Install Node modules:
22
23
23
24
```
24
-
npm install
25
+
pnpm install
25
26
```
26
27
27
28
## Usage
@@ -40,7 +41,7 @@ Run the project locally by copying the `.env` to `.env.local` and setting the fo
40
41
### Starting the app
41
42
42
43
```
43
-
yarn serve
44
+
pnpm serve
44
45
```
45
46
Compiles the sass files, javascript, and launches the server making the site available at `http://localhost:9000/`
46
47
The system will watch files and execute tasks whenever one of them changes.
@@ -50,18 +51,13 @@ The site will automatically refresh since it is bundled with livereload.
50
51
To prepare the app for deployment run:
51
52
52
53
```
53
-
npm run build
54
+
pnpm build
54
55
```
55
56
or
56
57
```
57
-
npm run stage
58
+
pnpm stage
58
59
```
59
60
This will package the app and place all the contents in the `dist` directory.
60
61
The app can then be run by any web server.
61
62
62
-
**When building the site for deployment provide the base url trough the `PUBLIC_URL` environment variable. Omit the leading slash. (E.g. https://example.com)**
63
-
64
-
If you want to use any other parcel feature it is also possible. Example:
65
-
```
66
-
PARCEL_BUNDLE_ANALYZER=true npm run parcel build app/index.html
67
-
```
63
+
**When building the site for deployment provide the base url trough the `BASE_URL` environment variable. Omit the leading slash. (E.g. https://example.com)**
0 commit comments