Update README, CI scripts, and fix Search location issue
This commit is contained in:
parent
d73e6ce678
commit
0c675969c5
|
@ -3,21 +3,21 @@ name: Node CI
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8.x, 10.x, 12.x]
|
||||
steps:
|
||||
- name: Clone source code
|
||||
uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install dependencies and build
|
||||
run: |
|
||||
npm install
|
||||
npm run build --if-present
|
||||
env:
|
||||
CI: true
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x, 12.x]
|
||||
steps:
|
||||
- name: Clone source code
|
||||
uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install dependencies and build
|
||||
run: |
|
||||
npm install
|
||||
npm run build --if-present
|
||||
env:
|
||||
CI: true
|
||||
|
|
24
README.md
24
README.md
|
@ -39,7 +39,7 @@ Looking for the Mac App Store version? [Read more ›](https://hyperspace.m
|
|||
|
||||
To develop Hyperspace, you'll need the following tools and packages:
|
||||
|
||||
- Node.js 8 or later
|
||||
- Node.js v10 or later
|
||||
|
||||
### Installing dependencies
|
||||
|
||||
|
@ -57,25 +57,19 @@ npm install
|
|||
|
||||
### Testing changes
|
||||
|
||||
Before testing Hyperspace, you'll need to modify the `location` key in `public/config.json`. For example:
|
||||
|
||||
```json
|
||||
"location": "https://localhost:3000"
|
||||
```
|
||||
|
||||
> Note: Since v1.1.0-beta4, this is no longer necessary since Hyperspace will automatically do this for you when running it through `npm start`.
|
||||
|
||||
The `location` key can take the following values during testing:
|
||||
|
||||
- **https://localhost:3000**: Most suitable for running `npm start` or running via `react-scripts`.
|
||||
- **desktop**: Most suitable for when testing the desktop application.
|
||||
|
||||
After changing this setting, run any of the following scripts to test:
|
||||
Run any of the following scripts to test:
|
||||
|
||||
- `npm start` - Starts a local server hosted at https://localhost:3000.
|
||||
- `npm run electrify` - Builds a copy of the source code and then runs the app through Electron. Ensure that the `location` key in `config.json` points to `"desktop"` before running this.
|
||||
- `npm run electrify-nobuild` - Similar to `electrify` but doesn't build the project before running.
|
||||
|
||||
The `location` key in `config.json` can take the following values during testing:
|
||||
|
||||
- **https://localhost:3000**: Most suitable for running `npm start` or running via `react-scripts`.
|
||||
- **desktop**: Most suitable for when testing the desktop application.
|
||||
|
||||
> Note: Hyperspace v1.1.0-beta3 and older versions require the location field to be changed to `"https://localhost:3000"` before running.
|
||||
|
||||
### Building a release
|
||||
|
||||
To build a release, run the following command:
|
||||
|
|
|
@ -90,7 +90,7 @@ class SearchPage extends Component<any, ISearchPageState> {
|
|||
if (newLocation !== undefined && typeof newLocation === "string") {
|
||||
searchParams = newLocation.replace("#/search", "");
|
||||
} else {
|
||||
searchParams = location.hash.replace("#/search", "");
|
||||
searchParams = this.props.location.hash.replace("#/search", "");
|
||||
}
|
||||
return parseParams(searchParams);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue