mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-12-03 09:41:17 +00:00
parent
6a309d39d1
commit
929103ad12
32 changed files with 196 additions and 194 deletions
6
.babelrc
6
.babelrc
|
@ -10,11 +10,11 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
["@babel/typescript", {"isTSX": true, "allExtensions": true}]
|
||||
["@babel/typescript", { "isTSX": true, "allExtensions": true }]
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-runtime",
|
||||
["babel-plugin-inferno", { "imports": true }],
|
||||
["@babel/plugin-proposal-class-properties", { "loose": true }],
|
||||
["babel-plugin-inferno", { "imports": true }],
|
||||
["@babel/plugin-proposal-class-properties", { "loose": true }]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -3,13 +3,8 @@
|
|||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json",
|
||||
|
|
|
@ -13,6 +13,11 @@ pipeline:
|
|||
- git submodule init
|
||||
- git submodule update --recursive --remote
|
||||
|
||||
prettier_markdown_check:
|
||||
image: tmknom/prettier
|
||||
commands:
|
||||
- prettier -c . "!dist" "!lemmy-docs" "!lemmy-translations" "!joinlemmy-translations" "!lemmy-js-client" "!lemmy-stats-crawler"
|
||||
|
||||
yarn:
|
||||
image: node:14-alpine
|
||||
commands:
|
||||
|
@ -76,7 +81,7 @@ pipeline:
|
|||
|
||||
notify_on_failure:
|
||||
image: alpine:3
|
||||
commands:
|
||||
commands:
|
||||
- apk add curl
|
||||
- "curl -d'joinlemmy-site build failed: ${DRONE_BUILD_LINK}' ntfy.sh/lemmy_drone_ci"
|
||||
when:
|
||||
|
@ -85,7 +90,7 @@ pipeline:
|
|||
|
||||
notify_on_tag_deploy:
|
||||
image: alpine:3
|
||||
commands:
|
||||
commands:
|
||||
- apk add curl
|
||||
- "curl -d'joinlemmy-site:${DRONE_TAG} deployed' ntfy.sh/lemmy_drone_ci"
|
||||
when:
|
||||
|
|
29
README.md
29
README.md
|
@ -1,15 +1,14 @@
|
|||
# JoinLemmy-site
|
||||
|
||||
## Requirements
|
||||
|
||||
- Docker
|
||||
|
||||
## Running
|
||||
|
||||
```
|
||||
docker build . -t joinlemmy-site
|
||||
docker run -p 3000:1234 joinlemmy-site
|
||||
```
|
||||
|
||||
and goto http://localhost:3000
|
||||
|
||||
# JoinLemmy-site
|
||||
|
||||
## Requirements
|
||||
|
||||
- Docker
|
||||
|
||||
## Running
|
||||
|
||||
```
|
||||
docker build . -t joinlemmy-site
|
||||
docker run -p 3000:1234 joinlemmy-site
|
||||
```
|
||||
|
||||
and goto http://localhost:3000
|
||||
|
|
58
crawl.mjs
58
crawl.mjs
|
@ -1,7 +1,7 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { exit } from 'process';
|
||||
import { spawn } from 'child_process';
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { exit } from "process";
|
||||
import { spawn } from "child_process";
|
||||
|
||||
const outDir = "src/shared/translations/";
|
||||
const recommendationsFile = "recommended-instances.json";
|
||||
|
@ -11,45 +11,57 @@ fs.mkdirSync(outDir, { recursive: true });
|
|||
|
||||
// crawl instance stats
|
||||
try {
|
||||
const recommended_instances = JSON.parse(fs.readFileSync(recommendationsFile, "utf8"));
|
||||
const recommended_instances = JSON.parse(
|
||||
fs.readFileSync(recommendationsFile, "utf8")
|
||||
);
|
||||
var all_recommended = [];
|
||||
for (var k in recommended_instances) {
|
||||
if (k != "exclude") {
|
||||
all_recommended.push(...recommended_instances[k]);
|
||||
}
|
||||
}
|
||||
const run = spawn("cargo",
|
||||
["run", "--", "--json", "--start-instances", all_recommended,
|
||||
"--exclude-instances", recommended_instances.exclude], {
|
||||
cwd: "lemmy-stats-crawler",
|
||||
encoding : 'utf8'
|
||||
});
|
||||
let savedOutput = '';
|
||||
const run = spawn(
|
||||
"cargo",
|
||||
[
|
||||
"run",
|
||||
"--",
|
||||
"--json",
|
||||
"--start-instances",
|
||||
all_recommended,
|
||||
"--exclude-instances",
|
||||
recommended_instances.exclude,
|
||||
],
|
||||
{
|
||||
cwd: "lemmy-stats-crawler",
|
||||
encoding: "utf8",
|
||||
}
|
||||
);
|
||||
let savedOutput = "";
|
||||
|
||||
run.stdout.on('data', data => {
|
||||
const strData = data.toString();
|
||||
process.stdout.write(strData);
|
||||
savedOutput += strData;
|
||||
run.stdout.on("data", data => {
|
||||
const strData = data.toString();
|
||||
process.stdout.write(strData);
|
||||
savedOutput += strData;
|
||||
});
|
||||
|
||||
run.stderr.on('data', data => {
|
||||
const strData = data.toString();
|
||||
process.stdout.write(strData);
|
||||
run.stderr.on("data", data => {
|
||||
const strData = data.toString();
|
||||
process.stdout.write(strData);
|
||||
});
|
||||
|
||||
run.on('close', exitCode => {
|
||||
run.on("close", exitCode => {
|
||||
const stats = JSON.parse(savedOutput);
|
||||
|
||||
let stats2 = {
|
||||
stats: stats,
|
||||
recommended: recommended_instances
|
||||
}
|
||||
recommended: recommended_instances,
|
||||
};
|
||||
|
||||
let data = `export const instance_stats = \n `;
|
||||
data += JSON.stringify(stats2, null, 2) + ";";
|
||||
fs.writeFileSync(instanceStatsFile, data);
|
||||
});
|
||||
run.await;
|
||||
run.await;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
const translationDir = "joinlemmy-translations/translations/";
|
||||
const outDir = "src/shared/translations/";
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
{
|
||||
"en": ["sopuli.xyz", "beehaw.org", "lemmy.world", "sh.itjust.works"],
|
||||
"fr": ["sh.itjust.works"],
|
||||
"da": ["feddit.dk"],
|
||||
"de": ["feddit.de", "discuss.tchncs.de"],
|
||||
"nl": ["feddit.nl"],
|
||||
"pt": ["lemmy.pt"],
|
||||
"pt-PT": ["lemmy.pt"],
|
||||
"pt-BR": ["lemmy.pt"],
|
||||
"eu": ["lemmy.eus"],
|
||||
"ja": ["tabinezumi.net", "lm.korako.me"],
|
||||
"it": ["feddit.it"],
|
||||
"exclude": ["lemmy.glasgow.social","ds9.lemmy.ml","voyager.lemmy.ml","enterprise.lemmy.ml","nrsk.no"]
|
||||
"en": ["sopuli.xyz", "beehaw.org", "lemmy.world", "sh.itjust.works"],
|
||||
"fr": ["sh.itjust.works"],
|
||||
"da": ["feddit.dk"],
|
||||
"de": ["feddit.de", "discuss.tchncs.de"],
|
||||
"nl": ["feddit.nl"],
|
||||
"pt": ["lemmy.pt"],
|
||||
"pt-PT": ["lemmy.pt"],
|
||||
"pt-BR": ["lemmy.pt"],
|
||||
"eu": ["lemmy.eus"],
|
||||
"ja": ["tabinezumi.net", "lm.korako.me"],
|
||||
"it": ["feddit.it"],
|
||||
"exclude": [
|
||||
"lemmy.glasgow.social",
|
||||
"ds9.lemmy.ml",
|
||||
"voyager.lemmy.ml",
|
||||
"enterprise.lemmy.ml",
|
||||
"nrsk.no"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Emojis, Usable Search urls, mod actions on post creators, UI Tweak
|
||||
|
||||
*Written by @dessalines, 2019-09-06*
|
||||
_Written by @dessalines, 2019-09-06_
|
||||
|
||||
[Issue list on Github](https://github.com/dessalines/lemmy/milestone/10?closed=1)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Image Uploads, Stickied Posts, Online Users count, View Source button
|
||||
|
||||
*Written by @dessalines, 2019-09-19*
|
||||
_Written by @dessalines, 2019-09-19_
|
||||
|
||||
[Issue list on Github](https://github.com/LemmyNet/lemmy/milestone/11?closed=1)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Themes, Auto-Updating front page, perma-deletes, custom rate limits
|
||||
|
||||
*Written by @dessalines, 2019-10-15*
|
||||
_Written by @dessalines, 2019-10-15_
|
||||
|
||||
[Closed issues here.](https://github.com/dessalines/lemmy/milestone/12?closed=1)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Username mentions, Default sorts, Vaporwave theme, Password Recovery, Arm64
|
||||
|
||||
*Written by @dessalines, 2019-11-02*
|
||||
_Written by @dessalines, 2019-11-02_
|
||||
|
||||
[Lemmy Release v0.4.0](https://github.com/dessalines/lemmy/releases/tag/v0.4.0) - Username mentions, Default sorts, Vaporwave theme, Password Recovery, Arm64 support.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# RSS feeds, custom language, url archiving, lots of bugs fixed
|
||||
|
||||
*Written by @dessalines, 2019-12-09*
|
||||
_Written by @dessalines, 2019-12-09_
|
||||
|
||||
Special thanks to @felix@radical.town for the RSS work!
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Avatars, email notifications, and a whole lot more
|
||||
|
||||
*Written by @dessalines, 2020-01-16*
|
||||
_Written by @dessalines, 2020-01-16_
|
||||
|
||||
`v0.6.0` is here, and we've closed [41 issues!](https://github.com/dessalines/lemmy/milestone/15?closed=1)
|
||||
`v0.6.0` is here, and we've closed [41 issues!](https://github.com/dessalines/lemmy/milestone/15?closed=1)
|
||||
|
||||
This is the biggest release by far:
|
||||
|
||||
|
@ -12,7 +12,7 @@ This is the biggest release by far:
|
|||
- Can set a custom language.
|
||||
- Lemmy-wide settings to disable downvotes, and close registration.
|
||||
- A better documentation system, hosted in lemmy itself.
|
||||
- [Huge DB performance gains](https://github.com/dessalines/lemmy/issues/411) (everthing down to < `30ms`) by using materialized views.
|
||||
- [Huge DB performance gains](https://github.com/dessalines/lemmy/issues/411) (everthing down to < `30ms`) by using materialized views.
|
||||
- Fixed major issue with similar post URL and title searching.
|
||||
- Upgraded to Actix `2.0`
|
||||
- Faster comment / post voting.
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
# NLnet funding, and Lemmy v0.7.0 with new image hosting!
|
||||
|
||||
*Written by @dessalines and @nutomic, 2020-06-23*
|
||||
_Written by @dessalines and @nutomic, 2020-06-23_
|
||||
|
||||
Let's start with the biggest news first: Lemmy is receiving funding from the [NLnet foundation](https://nlnet.nl/)! The funding is for a total amount of 45.000 €, which will allow [/u/dessalines](/u/dessalines) and me ([/u/nutomic](/u/nutomic) ) to work on Lemmy full-time for at least half a year.
|
||||
Let's start with the biggest news first: Lemmy is receiving funding from the [NLnet foundation](https://nlnet.nl/)! The funding is for a total amount of 45.000 €, which will allow [/u/dessalines](/u/dessalines) and me ([/u/nutomic](/u/nutomic) ) to work on Lemmy full-time for at least half a year.
|
||||
|
||||
We have created various milestones for the work we are planning to do. Most of them are about getting ActivityPub federation ready for production. In addition, we will work on:
|
||||
|
||||
- better accessibility
|
||||
- private communities and instances
|
||||
- reworking search
|
||||
- creating a `joinlemmy.ml` type site
|
||||
- the option to block other users or communities
|
||||
- the option to block other users or communities
|
||||
|
||||
The details of the milestones will be posted on our github issue tracker soon.
|
||||
|
||||
We're very excited about this opportunity, and can't wait to finish federation.
|
||||
|
||||
We're very excited about this opportunity, and can't wait to finish federation.
|
||||
|
||||
In other news, we have just released [Lemmy v0.7.0.](https://github.com/LemmyNet/lemmy/blob/master/RELEASES.md#lemmy-v070-release-2020-06-2x) Most importantly, this update switches to [Pict-rs](https://git.asonix.dog/asonix/pict-rs/) for image hosting, due to various performance-related issues with Pictshare. Pict-rs was coded from scratch in Rust by the amazing @asonix, who also created the ActivityPub library for Rust. We can't thank him enough for all the work he is doing for Lemmy!
|
||||
|
||||
|
@ -30,4 +30,4 @@ Other than that, since v0.6.0 in January [we've closed over 100 issues](https://
|
|||
|
||||
[You can find the full changelog and upgrade instructions here](https://github.com/LemmyNet/lemmy/blob/master/RELEASES.md#lemmy-v070-release-2020-06-2x).
|
||||
|
||||
Edit: [Here are the milestones for the funding](https://dev.lemmy.ml/post/35612)
|
||||
Edit: [Here are the milestones for the funding](https://dev.lemmy.ml/post/35612)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# Lemmy Release v0.8.0 - Federation beta!
|
||||
|
||||
*Written by @dessalines and @nutomic, 2020-10-20*
|
||||
_Written by @dessalines and @nutomic, 2020-10-20_
|
||||
|
||||
## Changes
|
||||
|
||||
We've been working at warp speed since our `v0.7.0` release in June, adding over [870 commits](https://github.com/LemmyNet/lemmy/compare/v0.7.0...main) since then. :sweat:
|
||||
We've been working at warp speed since our `v0.7.0` release in June, adding over [870 commits](https://github.com/LemmyNet/lemmy/compare/v0.7.0...main) since then. :sweat:
|
||||
|
||||
Here are some of the bigger changes:
|
||||
|
||||
|
@ -19,7 +19,7 @@ Here are some of the bigger changes:
|
|||
|
||||
#### Federation
|
||||
|
||||
- The first **federation public beta release**, woohoo :fireworks:
|
||||
- The first **federation public beta release**, woohoo :fireworks:
|
||||
- All Lemmy functionality now works over ActivityPub (except turning remote users into mods/admins)
|
||||
- Instance allowlist and blocklist
|
||||
- Documentation for [admins](https://dev.lemmy.ml/docs/administration_federation.html) and [devs](https://dev.lemmy.ml/docs/contributing_federation_overview.html) on how federation works
|
||||
|
@ -33,7 +33,7 @@ Here are some of the bigger changes:
|
|||
### User Interface
|
||||
|
||||
- Separated the UI from the server code, in [lemmy-ui](https://github.com/LemmyNet/lemmy-ui).
|
||||
- The UI can now read with javascript disabled!
|
||||
- The UI can now read with javascript disabled!
|
||||
- It's now a fully isomorphic application using [inferno-isomorphic](https://infernojs.org/docs/guides/isomorphic). This means that page loads are now much faster, as the server does the work.
|
||||
- The UI now also supports open-graph and twitter cards! Linking to lemmy posts (from whatever platform you use) looks pretty now: ![](https://i.imgur.com/6TZ2v7s.png)
|
||||
- Improved the search page ( more features incoming ).
|
||||
|
@ -56,7 +56,7 @@ Here are some of the bigger changes:
|
|||
|
||||
## Contributors
|
||||
|
||||
We'd also like to thank both the [NLnet foundation](https://nlnet.nl/) for their support in allowing us to work full-time on Lemmy ( as well as their support for [other important open-source projects](https://nlnet.nl/project/current.html) ), [those who sponsor us](https://dev.lemmy.ml/sponsors), and those who [help translate Lemmy](https://weblate.yerbamate.dev/projects/lemmy/). Every little bit does help. We remain committed to never allowing advertisements, monetizing, or venture-capital in Lemmy; software should be communal, and should benefit humanity, not a small group of company owners.
|
||||
We'd also like to thank both the [NLnet foundation](https://nlnet.nl/) for their support in allowing us to work full-time on Lemmy ( as well as their support for [other important open-source projects](https://nlnet.nl/project/current.html) ), [those who sponsor us](https://dev.lemmy.ml/sponsors), and those who [help translate Lemmy](https://weblate.yerbamate.dev/projects/lemmy/). Every little bit does help. We remain committed to never allowing advertisements, monetizing, or venture-capital in Lemmy; software should be communal, and should benefit humanity, not a small group of company owners.
|
||||
|
||||
## Upgrading
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy Release v0.9.0
|
||||
|
||||
*Written by @dessalines and @nutomic, 2021-01-25*
|
||||
_Written by @dessalines and @nutomic, 2021-01-25_
|
||||
|
||||
## Changes
|
||||
|
||||
|
@ -48,7 +48,6 @@ None of these are breaking changes, so federation between 0.9.0 and 0.8.11 will
|
|||
- Community Titles are now used instead of names.
|
||||
- Various other bug fixes.
|
||||
|
||||
|
||||
### Lemmy Docs
|
||||
|
||||
- We moved documentation into a separate git repository, and support translation for the docs now!
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy v0.10.0 Release
|
||||
|
||||
*Written by @dessalines and @nutomic, 2021-04-05*
|
||||
_Written by @dessalines and @nutomic, 2021-04-05_
|
||||
|
||||
## Changes
|
||||
|
||||
|
@ -11,7 +11,7 @@ Since our last release in February, we've had [~150](https://github.com/LemmyNet
|
|||
#### General
|
||||
|
||||
- Rewrote config implementation, finally allowing us to use newer Rust versions.
|
||||
- Removed categories.
|
||||
- Removed categories.
|
||||
- Various refactors.
|
||||
|
||||
#### API
|
||||
|
@ -25,7 +25,7 @@ Since our last release in February, we've had [~150](https://github.com/LemmyNet
|
|||
- Federating Matrix ID.
|
||||
- Many changes for better compatibility with ActivityPub standard.
|
||||
|
||||
#### Database
|
||||
#### Database
|
||||
|
||||
- Split the `user_` into `person` and `local_user` tables.
|
||||
- Strictly typed commonly used ID columns, to prevent DB errors using `i32` as ids.
|
||||
|
@ -57,8 +57,8 @@ Since our last release in February, we've had [~150](https://github.com/LemmyNet
|
|||
|
||||
- Configuration via environment variables is not supported anymore, you must have all your config in the [lemmy.hjson](https://github.com/LemmyNet/lemmy/blob/main/ansible/templates/config.hjson) file ( except for `LEMMY_CONFIG_LOCATION` ).
|
||||
- The config format for `allowed_instances` and `blocked_instances` has changed, and you need to adjust your config file manually:
|
||||
- before: `allowed_instances: ds9.lemmy.ml,enterprise.lemmy.ml`
|
||||
- now: `allowed_instances: ["ds9.lemmy.ml", "enterprise.lemmy.ml"]` , and only one of the `allowed_instances` or `blocked_instances` blocks can be set.
|
||||
- before: `allowed_instances: ds9.lemmy.ml,enterprise.lemmy.ml`
|
||||
- now: `allowed_instances: ["ds9.lemmy.ml", "enterprise.lemmy.ml"]` , and only one of the `allowed_instances` or `blocked_instances` blocks can be set.
|
||||
- The API has been upgraded from `v2` to `v3`, so all clients need to be updated: [lemmy-js-client: 0.9.9 -> 0.10.0](https://github.com/LemmyNet/lemmy-js-client/compare/0.9.9...0.10.0-rc.13) .
|
||||
|
||||
If you'd like to make a DB backup before upgrading, follow [this guide](https://join.lemmy.ml/docs/en/administration/backup_and_restore.html).
|
||||
|
@ -68,13 +68,12 @@ To upgrade your instance to `v0.10.0`, simply follow the instructions in the doc
|
|||
- [Upgrade with manual Docker installation](https://join.lemmy.ml/docs/en/administration/install_docker.html#updating)
|
||||
- [Upgrade with Ansible installation](https://join.lemmy.ml/docs/en/administration/install_ansible.html)
|
||||
|
||||
|
||||
## Compilation time
|
||||
|
||||
|| v0.9.0 (Rust 1.47) | v0.10.0 (Rust 1.47) | v0.10.0 (Rust 1.51) |
|
||||
|-| -------- | -------- | -------- |
|
||||
|Clean | 140s | 146s | 119s |
|
||||
| Incremental | 28s | 22s | 19s |
|
||||
| | v0.9.0 (Rust 1.47) | v0.10.0 (Rust 1.47) | v0.10.0 (Rust 1.51) |
|
||||
| ----------- | ------------------ | ------------------- | ------------------- |
|
||||
| Clean | 140s | 146s | 119s |
|
||||
| Incremental | 28s | 22s | 19s |
|
||||
|
||||
Despite ongoing efforts to speed up compilation, it has actually gotten slower when comparing with the same Rust version. Only thanks to improvements in newer Rust versions has our build process gotten faster. This could be simply because we added more code, while Lemmy v0.9.0 had 22.4k lines of Rust, v0.10.0 has 23.8k (an increase of 6%).
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy Release v0.11.0
|
||||
|
||||
*Written by @dessalines and @nutomic, 2021-04-27*
|
||||
_Written by @dessalines and @nutomic, 2021-04-27_
|
||||
|
||||
Since our last release this month, we've had [~60](https://github.com/LemmyNet/lemmy/compare/0.10.0...main) commits to Lemmy.
|
||||
|
||||
|
@ -8,11 +8,11 @@ Since our last release this month, we've had [~60](https://github.com/LemmyNet/l
|
|||
|
||||
#### Major Changes
|
||||
|
||||
- Add option to disable strict allowlist ( [#1486](https://github.com/LemmyNet/lemmy/issues/1486)) [documentation](https://join.lemmy.ml/docs/en/federation/administration.html)
|
||||
- Add option to disable strict allowlist ( [#1486](https://github.com/LemmyNet/lemmy/issues/1486)) [documentation](https://join.lemmy.ml/docs/en/federation/administration.html)
|
||||
- Add option to limit community creation to admins only ([#1587](https://github.com/LemmyNet/lemmy/issues/1587))
|
||||
- Many search improvements:
|
||||
- Don't search for communities or users when the id is included.
|
||||
- Add creator id to search.
|
||||
- Don't search for communities or users when the id is included.
|
||||
- Add creator id to search.
|
||||
|
||||
#### General
|
||||
|
||||
|
@ -49,7 +49,6 @@ Since our last release this month, we've had [~60](https://github.com/LemmyNet/l
|
|||
- Fix html notif bug. Fixes [#254](https://github.com/LemmyNet/lemmy-ui/issues/254)
|
||||
- Fixing issue with debounce. Fixes [#236](https://github.com/LemmyNet/lemmy-ui/issues/236)
|
||||
|
||||
|
||||
## Upgrade notes
|
||||
|
||||
### Servers
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Promoting Lemmy
|
||||
|
||||
*Written by @nutomic, 2021-08-09*
|
||||
_Written by @nutomic, 2021-08-09_
|
||||
|
||||
I think most of us agree that the main problem which Lemmy has today is its lack of users. This is not for technical reasons, as we know it is quite stable and usable. The main cause is that the project is not widely known yet. In this post I will propose what we can do to change that.
|
||||
|
||||
|
@ -11,7 +11,7 @@ First, lets clarify why we should promote Lemmy. Clearly there are many differen
|
|||
- Allow communities to manage themselves, instead of being controlled by corporations
|
||||
- Making Lemmy more active, particularly if you would like to see more discussions on certain topics
|
||||
|
||||
So how can we promote Lemmy?
|
||||
So how can we promote Lemmy?
|
||||
|
||||
I think one of the most effective thing we can do at this point is to post about Lemmy in other communities where we are active. This has the benefit that other people already trust us to some degree. Open source projects looking to setup a forum might also be a good target. When doing this, we should consider which aspects of the project would be most important to the target audience, and emphasize those.
|
||||
|
||||
|
@ -19,15 +19,16 @@ Another option is to contact bloggers, video creators, podcasters or others, and
|
|||
|
||||
In both cases, we should avoid doing anything that might be perceived as spam. It is better to create one or two high-quality messages, which will give a good impression of the project, rather than a dozen generic ones that tarnish the reputation.
|
||||
|
||||
It is worth noting that some important features are still missing in Lemmy, particularly mod tools (we are going to implement them in the next ~12 months). There also aren't many different instances yet.
|
||||
It is worth noting that some important features are still missing in Lemmy, particularly mod tools (we are going to implement them in the next ~12 months). There also aren't many different instances yet.
|
||||
|
||||
When promoting Lemmy like this, please avoid linking to lemmy.ml directly. This instance is already too big relative to other instances, and it is not meant to be a "flagship instance" ([What is lemmy.ml?](https://lemmy.ml/post/70280)). Instead you should try to find an appropriate instance on [join-lemmy.org](https://join-lemmy.org/instances) and link to it, or link to the joinlemmy site directly. You can also explicitly encourage the creation of new instances.
|
||||
|
||||
On a side note, it might be worth mentioning the many ways that people can contribute to Lemmy (again depending on the audience). There are the obvious ones, like writing code for lemmy and lemmy-ui, writing documentation or translating. There are also multiple interesting options to create new projects, such as:
|
||||
|
||||
- Create an [alternative frontend](https://join-lemmy.org/docs/en/client_development/custom_frontend.html): nojs frontend like [lemmy-lite](https://github.com/IronOxidizer/lemmy-lite), a traditional forum frontend or something like stackoverflow
|
||||
- Create a new client, be it for mobile, desktop or terminal.
|
||||
- Gather instance statistics using [lemmy-stats-crawler](https://yerbamate.ml/LemmyNet/lemmy-stats-crawler), and build some nice graphs.
|
||||
|
||||
By the way, Lemmy is not just a Reddit alternative, so there is no reason to limit the promotion to Reddit.
|
||||
By the way, Lemmy is not just a Reddit alternative, so there is no reason to limit the promotion to Reddit.
|
||||
|
||||
To help with these promotion efforts, [@dessalines](https://lemmy.ml/u/dessalines) and I would be happy to give interviews via email (in English, German or Spanish). For that, they can get in touch by mailing contact@lemmy.ml.
|
||||
To help with these promotion efforts, [@dessalines](https://lemmy.ml/u/dessalines) and I would be happy to give interviews via email (in English, German or Spanish). For that, they can get in touch by mailing contact@lemmy.ml.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy Release v0.12.0. User and Community blocking, lean federation, and a whole lot more
|
||||
|
||||
*Written by @dessalines and @nutomic, 2021-09-03*
|
||||
_Written by @dessalines and @nutomic, 2021-09-03_
|
||||
|
||||
Since our last release in April, we've had [~80](https://github.com/LemmyNet/lemmy/compare/0.11.0...main) commits to Lemmy.
|
||||
|
||||
|
@ -8,7 +8,7 @@ Since our last release in April, we've had [~80](https://github.com/LemmyNet/lem
|
|||
|
||||
#### Major Changes
|
||||
|
||||
*Note: Issue links are below.*
|
||||
_Note: Issue links are below._
|
||||
|
||||
- @nutomic did a major rewrite of the federation code. It is much simpler now, and reduced from 8000 lines of code to 6400. Functionality is mostly the same, but future changes will be much easier.
|
||||
- You can now block users and communities, and their posts / comments won't show up in your feed.
|
||||
|
@ -59,7 +59,6 @@ Since our last release in April, we've had [~80](https://github.com/LemmyNet/lem
|
|||
- Migrate comment inReplyTo field to single value (ref [#1454](https://github.com/LemmyNet/lemmy/issues/1454))
|
||||
- Fix issue with protocol string in actor id generation ([#1668](https://github.com/LemmyNet/lemmy/issues/1668))
|
||||
|
||||
|
||||
### Lemmy UI
|
||||
|
||||
- Integrating resolve_user into search. ([#377](https://github.com/LemmyNet/lemmy-ui/issues/377))
|
||||
|
@ -119,4 +118,3 @@ To upgrade your instance to `v0.12.0`, simply follow the instructions in the doc
|
|||
### Clients / Apps
|
||||
|
||||
- A full list of the API changes can be seen on this diff of [lemmy-js-client: 0.11.0 -> 0.12.0](https://github.com/LemmyNet/lemmy-js-client/compare/0.11.0...0.12.0-rc.1) .
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Lemmy.ml now uses open federation
|
||||
|
||||
*Written by @dessalines, 2021-09-04*
|
||||
_Written by @dessalines, 2021-09-04_
|
||||
|
||||
You no longer have to ask us to add you manually, you can subscribe and interact without the approval process.
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# Lemmy Release v0.13.0: Comment and Post reporting are here!
|
||||
|
||||
*Written by @dessalines and @nutomic, 2021-09-30*
|
||||
_Written by @dessalines and @nutomic, 2021-09-30_
|
||||
|
||||
Since our last release earlier this month, we've had [~30](https://github.com/LemmyNet/lemmy/compare/0.12.0...main) commits to Lemmy.
|
||||
|
||||
## Major Changes
|
||||
|
||||
- Added comment and post reporting in the front end, and cleaned up the reporting API.
|
||||
- *Note: these are local-only currently, reports are not yet federated.*
|
||||
- The JWT secret is now auto-generated by the database.
|
||||
- *Note: this will log out all users, so users will have to log in again.*
|
||||
- Added comment and post reporting in the front end, and cleaned up the reporting API.
|
||||
- _Note: these are local-only currently, reports are not yet federated._
|
||||
- The JWT secret is now auto-generated by the database.
|
||||
- _Note: this will log out all users, so users will have to log in again._
|
||||
- Lots of smaller UI fixes listed below.
|
||||
|
||||
## Upgrade notes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy Release v0.14.0: Federation with Mastodon and Pleroma
|
||||
|
||||
*Written by @dessalines and @nutomic, 2021-11-17*
|
||||
_Written by @dessalines and @nutomic, 2021-11-17_
|
||||
|
||||
Today is an exciting day for the Lemmy project.
|
||||
|
||||
|
@ -16,7 +16,7 @@ It took a lot of work to make this possible, so big thanks to [NLnet](https://nl
|
|||
|
||||
### Federation code rewrite
|
||||
|
||||
The rewrite of the federation code started by @nutomic in August is now mostly complete. As a result, the code is much cleaner, and has tests to guarantee no breaking changes between Lemmy versions. As a side effect of this rewrite, it was now relatively easy to enable federation with other projects.
|
||||
The rewrite of the federation code started by @nutomic in August is now mostly complete. As a result, the code is much cleaner, and has tests to guarantee no breaking changes between Lemmy versions. As a side effect of this rewrite, it was now relatively easy to enable federation with other projects.
|
||||
|
||||
Mastodon and Pleroma users can:
|
||||
|
||||
|
@ -26,7 +26,7 @@ Mastodon and Pleroma users can:
|
|||
|
||||
In addition, Pleroma users can exchange private messages with Lemmy users.
|
||||
|
||||
Note that Pleroma and Mastodon rely on a compatibility mode in Lemmy, which means that they won't receive events like Deletes or Votes. Other projects whose federation works similar to Pleroma/Mastodon will likely also federate.
|
||||
Note that Pleroma and Mastodon rely on a compatibility mode in Lemmy, which means that they won't receive events like Deletes or Votes. Other projects whose federation works similar to Pleroma/Mastodon will likely also federate.
|
||||
|
||||
### Hardcoded slur filter removed
|
||||
|
||||
|
@ -84,7 +84,7 @@ We've now separated our ansible install method (the preferred way to deploy Lemm
|
|||
- Format config/defaults.hjson before committing ([#1860](https://github.com/LemmyNet/Lemmy/issues/1860))
|
||||
- Breaking apub changes ([#1859](https://github.com/LemmyNet/Lemmy/issues/1859))
|
||||
- Pleroma federation2 ([#1855](https://github.com/LemmyNet/Lemmy/issues/1855))
|
||||
- Create a custom pre-commit hook, generates config/defaults.hjson ([#1857](https://github.com/LemmyNet/Lemmy/issues/1857))
|
||||
- Create a custom pre-commit hook, generates config/defaults.hjson ([#1857](https://github.com/LemmyNet/Lemmy/issues/1857))
|
||||
- Add cargo metadata to all crates ([#1853](https://github.com/LemmyNet/Lemmy/issues/1853))
|
||||
- Add both (De)Serialize to all models ([#1851](https://github.com/LemmyNet/Lemmy/issues/1851))
|
||||
- Adding GetUnreadCount to the API. Fixes [#1794](https://github.com/LemmyNet/Lemmy/issues/1794) ([#1842](https://github.com/LemmyNet/Lemmy/issues/1842))
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
# Lemmy Release v0.15.1: Private instances, New User Registrations, Email Verification, and Temporary Bans
|
||||
|
||||
*Written by @dessalines and @nutomic, 2022-01-12*
|
||||
_Written by @dessalines and @nutomic, 2022-01-12_
|
||||
|
||||
Lemmy now has private instances, optional registration applications, optional email verification, and temporary bans! These are described in detail below.
|
||||
|
||||
Special thanks to @asonix for adding [tokio-console](https://github.com/LemmyNet/Lemmy/issues/2003) and [Jaeger + opentelemetry](https://github.com/LemmyNet/Lemmy/issues/1992) to our dev setups, so we can better identify performance bottlenecks.
|
||||
|
||||
|
||||
## What is Lemmy?
|
||||
|
||||
[Lemmy](https://join-lemmy.org/) is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to communities you're interested in, post links and discussions, then vote and comment on them. Lemmy isn't just a reddit alternative; its a network of interconnected communities ran by different people and organizations, all combining to create a single, personalized front page of your favorite news, articles, and memes.
|
||||
|
@ -21,11 +20,11 @@ Admins can turn this on, and new users will need to verify their emails. Current
|
|||
|
||||
Admins can now optionally make new users fill out an application to join your server. There is a new panel in their top bar where they can approve or deny pending applications.
|
||||
|
||||
This works in conjunction with the *require_email* field. If that is also turned on, the application will only be shown after their email has been verified. The user will receive an email when they have been accepted.
|
||||
This works in conjunction with the _require_email_ field. If that is also turned on, the application will only be shown after their email has been verified. The user will receive an email when they have been accepted.
|
||||
|
||||
### Closed / Private instances
|
||||
|
||||
The instance settings now includes a *private instance* option, which if turned on, will only let logged in users view your site. Private instances was one of our first issues, and it was a large effort, so its great to finally have this completed.
|
||||
The instance settings now includes a _private instance_ option, which if turned on, will only let logged in users view your site. Private instances was one of our first issues, and it was a large effort, so its great to finally have this completed.
|
||||
|
||||
### Temporary Bans
|
||||
|
||||
|
@ -122,4 +121,4 @@ There is a new rate limit for creating new comments in the [config.hjson](https:
|
|||
- Fix comment scroll bug. Fixes [#492](https://github.com/LemmyNet/lemmy-ui/issues/492)
|
||||
- Fixing error for null person_block. Fixes [#491](https://github.com/LemmyNet/lemmy-ui/issues/491)
|
||||
- Trying to catch promise and json parse errors. [#489](https://github.com/LemmyNet/lemmy-ui/issues/489) ([#490](https://github.com/LemmyNet/lemmy-ui/issues/490))
|
||||
-
|
||||
-
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy v0.16.0 Release: Theming and Federation improvements (2022-03-08)
|
||||
|
||||
*Written by @dessalines and @nutomic, 2022-03-08*
|
||||
_Written by @dessalines and @nutomic, 2022-03-08_
|
||||
|
||||
## What is Lemmy?
|
||||
|
||||
|
@ -31,8 +31,9 @@ Until now, only community bans were federated, and the "Remove content" option d
|
|||
### Hide communities
|
||||
|
||||
@dayinjing implemented a funcionality for instance admins to hide controversial communities. A hidden community is only visible to those users who subscribe to it. This represents a milder alternative to removing a community. This functionality is not implemented in lemmy-ui yet, but admins can hide a community like this via command line:
|
||||
|
||||
```
|
||||
curl -X PUT https://example.com/api/v3/community/hide \
|
||||
curl -X PUT https://example.com/api/v3/community/hide \
|
||||
-H "Content-Type: application/json" \
|
||||
-d \
|
||||
'{"community_id":3,"hidden":true,"reason":"*reason for mod log*","auth":"*admin jwt token*"}'
|
||||
|
@ -40,12 +41,11 @@ curl -X PUT https://example.com/api/v3/community/hide \
|
|||
|
||||
### Jerboa: a new android app
|
||||
|
||||
To help adoption, and since most people use social media through their smartphones nowadays, @dessalines has been working on a native android app for Lemmy called [Jerboa](https://github.com/dessalines/jerboa), which is now on [F-Droid](https://f-droid.org/packages/com.jerboa) and [Google Play](https://play.google.com/store/apps/details?id=com.jerboa).
|
||||
To help adoption, and since most people use social media through their smartphones nowadays, @dessalines has been working on a native android app for Lemmy called [Jerboa](https://github.com/dessalines/jerboa), which is now on [F-Droid](https://f-droid.org/packages/com.jerboa) and [Google Play](https://play.google.com/store/apps/details?id=com.jerboa).
|
||||
|
||||
It is still at an alpha level, but is very usable. We'd love to have experienced android developers contribute to it.
|
||||
|
||||
This now makes three smartphone apps for Lemmy: [Lemmur and Jerboa for Android, and Remmel for iOS](https://join-lemmy.org/apps).
|
||||
|
||||
This now makes three smartphone apps for Lemmy: [Lemmur and Jerboa for Android, and Remmel for iOS](https://join-lemmy.org/apps).
|
||||
|
||||
## Upgrade notes
|
||||
|
||||
|
@ -95,10 +95,9 @@ If you'd like to support development, and make sure that we will always be avail
|
|||
- Alpha-ordering community follows. Fixes [#2062](https://github.com/LemmyNet/lemmy/issues/2062) ([#2079](https://github.com/LemmyNet/lemmy/issues/2079))
|
||||
- Add federation tests for Friendica, improve parsing of source field (fixes [#2057](https://github.com/LemmyNet/lemmy/issues/2057)) ([#2070](https://github.com/LemmyNet/lemmy/issues/2070))
|
||||
|
||||
|
||||
### Lemmy UI
|
||||
|
||||
- Rename theme files from *.min.css to *.css ([#590](https://github.com/LemmyNet/lemmy-ui/issues/590))
|
||||
- Rename theme files from _.min.css to _.css ([#590](https://github.com/LemmyNet/lemmy-ui/issues/590))
|
||||
- Custom themes ([#584](https://github.com/LemmyNet/lemmy-ui/issues/584))
|
||||
- Add option to set site default theme (fixes [#559](https://github.com/LemmyNet/lemmy-ui/issues/559))
|
||||
- Adding nofollow to links. Fixes [#542](https://github.com/LemmyNet/lemmy-ui/issues/542) ([#543](https://github.com/LemmyNet/lemmy-ui/issues/543))
|
||||
|
@ -113,6 +112,3 @@ If you'd like to support development, and make sure that we will always be avail
|
|||
- Fix report page bugs. Fixes [#558](https://github.com/LemmyNet/lemmy-ui/issues/558) ([#568](https://github.com/LemmyNet/lemmy-ui/issues/568))
|
||||
- Fix post title link bug. Fixes [#547](https://github.com/LemmyNet/lemmy-ui/issues/547) ([#563](https://github.com/LemmyNet/lemmy-ui/issues/563))
|
||||
- Add markdown footnotes. Fixes [#561](https://github.com/LemmyNet/lemmy-ui/issues/561) ([#562](https://github.com/LemmyNet/lemmy-ui/issues/562))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Free Lemmy instance hosting
|
||||
|
||||
*Written by @nutomic, 2022-03-17*
|
||||
_Written by @nutomic, 2022-03-17_
|
||||
|
||||
## What is Lemmy?
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy v0.16.3 Release: Federation Bug Fixes (2022-04-08)
|
||||
|
||||
*Written by @dessalines and @nutomic, 2022-04-08*
|
||||
_Written by @dessalines and @nutomic, 2022-04-08_
|
||||
|
||||
## What is Lemmy?
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy Release v0.16.4 - Peertube federation, Rust API and other improvements (2022-05-27)
|
||||
|
||||
*Written by @dessalines and @nutomic, 2022-05-27*
|
||||
_Written by @dessalines and @nutomic, 2022-05-27_
|
||||
|
||||
## What is Lemmy?
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lemmy v0.16.6 Release : bug fixes (2022-07-19)
|
||||
|
||||
*Written by @dessalines and @nutomic, 2022-07-19*
|
||||
_Written by @dessalines and @nutomic, 2022-07-19_
|
||||
|
||||
A few bug fixes:
|
||||
|
||||
|
@ -11,4 +11,3 @@ A few bug fixes:
|
|||
- Fix length of post_report.original_post_name db field (fixes [#2311](https://github.com/LemmyNet/lemmy/issues/2311)) ([#2315](https://github.com/LemmyNet/lemmy/issues/2315))
|
||||
- Add pub use for db crates in api_common ([#2305](https://github.com/LemmyNet/lemmy/issues/2305))
|
||||
- Accept private like ([#1968](https://github.com/LemmyNet/lemmy/issues/1968)) ([#2301](https://github.com/LemmyNet/lemmy/issues/2301))
|
||||
|
||||
|
|
|
@ -16,4 +16,4 @@ There are still many things to work on, and some missing features need to be add
|
|||
|
||||
LemmyBB can also serve as an example of Lemmy's potential as a generic backend for social media platforms. Instead of starting a project from scratch to write an API, database logic, authentication, federation etc, you could create a frontend for Lemmy. This can be written in your language of choice, and only needs to render HTML, and use the [Lemmy API](https://join-lemmy.org/api/index.html). This doesn't have to be a forum, a blogging platform or image gallery would also be possible.
|
||||
|
||||
To be clear, lemmyBB is not meant to replace phpBB and it will never have all the same features. It was simply much easier to use this approach for someone like me who doesn't know much about frontend development. In that sense, I want to give a big thanks to the phpBB developers for publishing their work as open source, and making this project possible!
|
||||
To be clear, lemmyBB is not meant to replace phpBB and it will never have all the same features. It was simply much easier to use this approach for someone like me who doesn't know much about frontend development. In that sense, I want to give a big thanks to the phpBB developers for publishing their work as open source, and making this project possible!
|
||||
|
|
|
@ -1,27 +1,22 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"pretty": true,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": true,
|
||||
"moduleResolution": "node",
|
||||
"lib": ["es2017", "dom"],
|
||||
"types": [
|
||||
"inferno"
|
||||
],
|
||||
"jsx": "preserve",
|
||||
"noUnusedLocals": true,
|
||||
"baseUrl": "./src",
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"node_modules/inferno/dist/index.d.ts",
|
||||
]
|
||||
}
|
||||
{
|
||||
"compilerOptions": {
|
||||
"pretty": true,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": true,
|
||||
"moduleResolution": "node",
|
||||
"lib": ["es2017", "dom"],
|
||||
"types": ["inferno"],
|
||||
"jsx": "preserve",
|
||||
"noUnusedLocals": true,
|
||||
"baseUrl": "./src",
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["src/**/*", "node_modules/inferno/dist/index.d.ts"]
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
const webpack = require('webpack');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const RunNodeWebpackPlugin = require('run-node-webpack-plugin');
|
||||
const { merge } = require('lodash');
|
||||
const webpack = require("webpack");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const nodeExternals = require("webpack-node-externals");
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const RunNodeWebpackPlugin = require("run-node-webpack-plugin");
|
||||
const { merge } = require("lodash");
|
||||
|
||||
const banner = `
|
||||
hash:[contentHash], chunkhash:[chunkhash], name:[name], filebase:[base], query:[query], file:[file]
|
||||
|
@ -14,11 +14,11 @@ const banner = `
|
|||
|
||||
const base = {
|
||||
output: {
|
||||
filename: 'js/server.js',
|
||||
publicPath: '/',
|
||||
filename: "js/server.js",
|
||||
publicPath: "/",
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
||||
},
|
||||
performance: {
|
||||
hints: false,
|
||||
|
@ -27,12 +27,12 @@ const base = {
|
|||
rules: [
|
||||
{
|
||||
test: /\.(scss|css)$/i,
|
||||
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
|
||||
use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"],
|
||||
},
|
||||
{
|
||||
test: /\.(js|jsx|tsx|ts)$/, // All ts and tsx files will be process by
|
||||
exclude: /node_modules/, // ignore node_modules
|
||||
loader: 'babel-loader',
|
||||
loader: "babel-loader",
|
||||
},
|
||||
// Due to some weird babel issue: https://github.com/webpack/webpack/issues/11467
|
||||
{
|
||||
|
@ -45,10 +45,10 @@ const base = {
|
|||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'styles/styles.css',
|
||||
filename: "styles/styles.css",
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [{ from: './src/assets', to: './assets' }],
|
||||
patterns: [{ from: "./src/assets", to: "./assets" }],
|
||||
}),
|
||||
new webpack.BannerPlugin({
|
||||
banner,
|
||||
|
@ -59,18 +59,18 @@ const base = {
|
|||
const createServerConfig = (_env, mode) => {
|
||||
const config = merge({}, base, {
|
||||
mode,
|
||||
entry: './src/server/index.tsx',
|
||||
entry: "./src/server/index.tsx",
|
||||
output: {
|
||||
filename: 'js/server.js',
|
||||
filename: "js/server.js",
|
||||
},
|
||||
target: 'node',
|
||||
externals: [nodeExternals(), 'inferno-helmet'],
|
||||
target: "node",
|
||||
externals: [nodeExternals(), "inferno-helmet"],
|
||||
});
|
||||
|
||||
if (mode === 'development') {
|
||||
if (mode === "development") {
|
||||
config.cache = {
|
||||
type: 'filesystem',
|
||||
name: 'server',
|
||||
type: "filesystem",
|
||||
name: "server",
|
||||
};
|
||||
|
||||
config.plugins.push(
|
||||
|
@ -85,16 +85,16 @@ const createServerConfig = (_env, mode) => {
|
|||
const createClientConfig = (_env, mode) => {
|
||||
const config = merge({}, base, {
|
||||
mode,
|
||||
entry: './src/client/index.tsx',
|
||||
entry: "./src/client/index.tsx",
|
||||
output: {
|
||||
filename: 'js/client.js',
|
||||
filename: "js/client.js",
|
||||
},
|
||||
});
|
||||
|
||||
if (mode === 'development') {
|
||||
if (mode === "development") {
|
||||
config.cache = {
|
||||
type: 'filesystem',
|
||||
name: 'client',
|
||||
type: "filesystem",
|
||||
name: "client",
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,6 @@ const createClientConfig = (_env, mode) => {
|
|||
};
|
||||
|
||||
module.exports = (env, properties) => [
|
||||
createServerConfig(env, properties.mode || 'development'),
|
||||
createClientConfig(env, properties.mode || 'development'),
|
||||
createServerConfig(env, properties.mode || "development"),
|
||||
createClientConfig(env, properties.mode || "development"),
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue