1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-08 08:22:48 +00:00

switch from yarn to npm - other minor updates

This commit is contained in:
2018-04-30 20:13:13 -05:00
parent 0b6522f5f2
commit ac7d913e30
10 changed files with 16196 additions and 6767 deletions

View File

@@ -24,8 +24,8 @@ Made with:
## Build the client
- `cd client`
- `yarn install`
- `yarn run dev`
- `npm install`
- `npm run dev`
# Ecto

View File

@@ -1,17 +0,0 @@
# Starter project for React
- [Typescript](https://www.typescriptlang.org/)
- [React 16](https://reactjs.org/)
- [React Router 4](https://reacttraining.com/react-router/)
- [Webpack 3](https://webpack.js.org/)
- [Yarn](https://yarnpkg.com/lang/en/docs/install/)
## Commands
- yarn install
- yarn start
http://localhost:8080
## Note
There is currently a bug with yarn not updating package.json when upgrading packages.
[See more here](https://github.com/yarnpkg/yarn/issues/2042#issuecomment-269601927).
I added the `update-latest` script in package.json for a temporary fix.

View File

@@ -130,7 +130,7 @@ export class Forum extends React.Component<Props, State> {
private onSearch(event: any) {
event.preventDefault();
const threads = filter(cloneDeep(this.state.initialThreads), (t) => {
const threads: any = filter(cloneDeep(this.state.initialThreads), (t) => {
return t.title.toLowerCase().match(this.state.searchText.toLowerCase());
});

View File

@@ -30,7 +30,7 @@ export class Realms extends React.Component<Props, State> {
const realms = chain(res)
.filter({ category: 'realm' })
.orderBy(['title'])
.value();
.value() as CategoryModel[];
this.setState({ realms });
} catch (e) {
console.error(e);

16188
client/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -6,8 +6,7 @@
"build": "webpack -p --progress --colors",
"dev": "webpack --progress --colors --watch",
"c9": "webpack-dev-server --host 0.0.0.0 --port 8080 --inline --history-api-fallback",
"start": "webpack-dev-server --inline --history-api-fallback",
"update-latest": "rm -rf node_modules && rm yarn.lock && ncu --upgrade --upgradeAll && yarn install"
"start": "webpack-dev-server --inline --history-api-fallback"
},
"dependencies": {
"@types/fingerprintjs2": "^1.5.1",

File diff suppressed because it is too large Load Diff

View File

@@ -26,13 +26,6 @@ defmodule MyApp.Data.Reply do
end
# allow user to update reply
defp user_update_changeset(reply, params \\ %{}) do
reply
|> cast(params, [:content])
|> force_change(:edited, true) # set edited flag on update
|> validate_required([:content])
end
@spec insert(map) :: {:ok, map} | {:error, map}
def insert(params) do
{:ok, data} = Repo.transaction(fn ->

View File

@@ -50,10 +50,8 @@ defmodule MyAppWeb.ReplyController do
@spec mod_update(map, map) :: any
def mod_update(conn, params) do
{:ok, _} = Data.Reply.mod_update(params)
conn
|> put_status(200)
|> Response.json("ok")
Data.Reply.mod_update(params)
Response.json(conn, "ok")
end
end

View File

@@ -3,7 +3,7 @@ clean:
rm -rf _build
build-client:
cd client && yarn install && yarn run build
cd client && npm install && npm run build
build-server:
MIX_ENV=prod mix deps.get && MIX_ENV=prod mix release --env=prod