Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE: #30 - Migrate client-admin to Webpack #31

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bugs

- [#30](https://github.com/DFE-Digital/polis-whitelabel/issues/30) Migrated client-admin from Gulp 3 to Webpack
- [#5](https://github.com/DFE-Digital/polis-whitelabel/issues/5) Restored Docker build process
- [#1](https://github.com/DFE-Digital/polis-whitelabel/issues/1) Fixed `authorUid is undefined` crash in `server`
- [#3](https://github.com/DFE-Digital/polis-whitelabel/issues/3) Fixed crash when `.headersJson` file not present for `file-server`
Expand Down
2 changes: 1 addition & 1 deletion client-admin/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }],
["@babel/plugin-proposal-class-properties"],
"lodash",
"@babel/plugin-transform-runtime"
]
Expand Down
6 changes: 0 additions & 6 deletions client-admin/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,9 @@ Desktop.ini
$RECYCLE.BIN/

# App specific
build
dist
coverage
node_modules
bower_components
.tmp
lib
npm-debug.log
.polis_s3_creds_client.json
.env_dev

# VCS
Expand Down
2 changes: 0 additions & 2 deletions client-admin/.eslintignore

This file was deleted.

7 changes: 4 additions & 3 deletions client-admin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.polis_s3_creds_client.json
.tmp
build
coverage
dist
lib
node_modules
npm-debug.log
.env_dev
polis.config.js
68 changes: 24 additions & 44 deletions client-admin/README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,48 @@
# polis-client-admin
# Polis Admin Console

Polis Admin Console.
This is the front-end code for the administrators.

## Dependencies

* node `11.15.0`
* npm `7.0.15`
* node `18.12.1`
* npm `8.19.2`

## Setup

```sh
n 11.15.0
npm install -g npm@7.0
n 18.12.1
npm install
cp polis.config.template.js polis.config.js
npm run build:prod
```

## Common Problems
From here go to `file-server` and run `make` to copy the built files across.

If you having troubles with npm dependencies try run the commands below:
You can run `npm run build:dev` to get an unminified version which makes for easier in-browser debugging.

```sh
npm cache clear
npm install
```

## Building and Deploying for Production

To build static assets for a production deployment, run:
## Running Application

```sh
gulp dist
nvm use 14.14.0
npm start
```

As a convenience, the `npm deploy:prod` is provided for deploying to AWS S3 or
via SCP to a static file server. For S3 deployment, place your AWS credentials
in a JSON file at `.polis_s3_creds_client.json` that looks like this:

```json
{"key": "XXXXXXX", "secret": "YYYYYYY"}
```
## Running Tests

## QA Steps
We aspire to use the Jest Testing Framework. We welcome contributors to help us write tests!

### Static, outide

- User can see home page at `/home`
- User is redirected to `/home` if not logged in
- User can sign in at `/signin`
- User can reset password at `/pwreset`
- User can `/createuser` and make a new account, login
- User can see `/privacy` policy
- User can see `/tos`
- User can see `/cookies`
- User can see `/accessibility`
```sh
# Doesn't work right now. Will need to reinstall jest.
npm test
```

### After login
## Building for Production

- User can get `/integrate` embed code for whole site
- User can see social linkage at `/account`
- User can see all of their conversations
To build static assets into `dist/` for a production deployment, run

## Icons from the Noun Project
```sh
npm run build:prod
```

* Checklist by David Courey from the Noun Project
* AI by mungang kim from the Noun Project
* Science by Akriti Bhusal from the Noun Project
* Success File by Ben Davis from the Noun Project
Deployment is currently performed via Docker, and so no other deployment scripts are provided.
79 changes: 0 additions & 79 deletions client-admin/dev-server.js

This file was deleted.

Loading