Skip to content

Commit 5afbfb9

Browse files
authored
Merge pull request #133 from dzcode-io/impl/132-use-yarn-workspaces
Impl/132 use yarn workspaces
2 parents 6af921f + 81f2768 commit 5afbfb9

File tree

15 files changed

+2888
-9597
lines changed

15 files changed

+2888
-9597
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
node_modules
12
**.DS_Store
23
.vscode

README.md

Lines changed: 25 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@
44

55
The code for [dzcode.io](https://dzcode.io), a website for Algerian open-source community.
66

7+
## Meta
8+
9+
| env \ Project | Frontend (browser) | Data (static backend) |
10+
| :------------- | :------------------------ | :----------------------------- |
11+
| **Production** | https://dzcode.io | https://data.dzcode.io |
12+
| **Staging** | https://staging.dzcode.io | https://data.staging.dzcode.io |
13+
714
## Table of Content
815

916
- [dzCode.io](#dzcodeio)
17+
- [Meta](#meta)
1018
- [Table of Content](#table-of-content)
1119
- [Get Started](#get-started)
1220
- [Perquisites](#perquisites)
13-
- [Clone the repo](#clone-the-repo)
14-
- [Install dependencies](#install-dependencies)
1521
- [Run it locally](#run-it-locally)
1622
- [Contributing](#contributing)
1723
- [Add Your Own Article](#add-your-own-article)
@@ -24,93 +30,45 @@ The code for [dzcode.io](https://dzcode.io), a website for Algerian open-source
2430

2531
Make sure you have:
2632

27-
- [git](https://git-scm.com/)
28-
- [nodejs](https://nodejs.org/) 10 or higher
29-
- [yarn](https://yarnpkg.com/)
33+
- [Git](https://git-scm.com/)
34+
- [Nodejs](https://nodejs.org/) version 10 or higher
35+
- [Yarn](https://yarnpkg.com/) version 1 or higher
3036

31-
### Clone the repo
37+
### Run it locally
3238

33-
- open terminal and clone the repo:
39+
- Open terminal and clone the repo:
3440

35-
```shell
41+
```sh
3642
git clone https://github.com/dzcode-io/dzcode.io.git
3743
```
3844

3945
- Make **sure** you are in the project **root**:
4046

41-
```shell
47+
```sh
4248
cd dzcode.io
4349
```
4450

45-
### Install dependencies
46-
47-
- Install frontend dependencies:
48-
49-
```shell
50-
cd frontend
51-
yarn
52-
cd ..
53-
```
54-
55-
- Install frontend Firebase dependencies:
56-
57-
```shell
58-
cd frontend/firebase
59-
yarn
60-
cd ../..
61-
```
62-
63-
- Install data dependencies:
64-
65-
```shell
66-
cd data
67-
yarn
68-
cd ..
69-
```
70-
71-
- Install fullstack dependencies:
51+
- Install dependencies:
7252

73-
```shell
74-
cd fullstack
53+
```sh
7554
yarn
76-
cd ..
7755
```
7856

79-
### Run it locally
57+
- Run it locally
8058

81-
- Build fullstack code:
82-
83-
```shell
84-
cd fullstack
85-
yarn build:watch
59+
```sh
60+
yarn start
8661
```
8762

88-
- Open new terminal and Run frontend server:
89-
90-
```shell
91-
cd frontend
92-
yarn dev
93-
```
94-
95-
- Open new terminal and Run data server:
96-
97-
```shell
98-
cd data
99-
yarn build
100-
yarn dev
101-
```
102-
103-
- Open new terminal and Run api emulators:
104-
105-
```shell
106-
107-
cd api/functions && firebase emulators:start
63+
or with the api server (optional)
10864

65+
```sh
66+
yarn start:api
10967
```
11068

11169
- Now, Go to <http://localhost:8080>
11270

113-
- All emulators View status and logs at <http://localhost:4000>
71+
- For api server, all emulators view status and logs at <http://localhost:4000>
11472

11573
## Contributing
11674

@@ -129,7 +87,7 @@ To add new article let's say "Awesome New Article", simply do the following:
12987
- Add two files:
13088
- `info.json` , a json file containing info about your article, like **title**, **description** etc..., see [this file](https://github.com/dzcode-io/dzcode.io/blob/master/data/articles/Welcome_to_dzCode/info.json) as an example.
13189
- `content.md` , a markdown file which contain your Article text, in form of [markdown](https://www.markdownguide.org/).
132-
- Lastly, to make you article visible, modify the content of [`data/articles/list.json`](https://github.com/dzcode-io/dzcode.io/blob/master/data/articles/list.json) and add your article's folder name `Awesome_New_Article` inside the `"items": []` array.
90+
- Lastly, to make your article visible, modify the content of [`data/articles/list.json`](https://github.com/dzcode-io/dzcode.io/blob/master/data/articles/list.json) and add your article's folder name `Awesome_New_Article` inside the `"items": []` array.
13391

13492
To test and see your article locally, make sure to [you are all set](#get-started), after you run dzCode locally go to http://localhost:8080/Articles/Awesome_New_Article, you will see your article, and you can continue editing from there, once you are happy with the result, create a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) against master branch, and we will be happy to merge it 😃.
13593

api/functions/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "functions",
2+
"name": "dzcode.io-api",
33
"scripts": {
44
"build": "tsc",
55
"build:watch": "tsc --watch",
@@ -28,5 +28,6 @@
2828
"firebase-functions-test": "^0.2.0",
2929
"typescript": "^3.8.0"
3030
},
31+
"license": "MIT",
3132
"private": true
3233
}

0 commit comments

Comments
 (0)