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]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [8.x, 10.x, 12.x]
|
node-version: [10.x, 12.x]
|
||||||
steps:
|
steps:
|
||||||
- name: Clone source code
|
- name: Clone source code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: Install dependencies and build
|
- name: Install dependencies and build
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm run build --if-present
|
npm run build --if-present
|
||||||
env:
|
env:
|
||||||
CI: true
|
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:
|
To develop Hyperspace, you'll need the following tools and packages:
|
||||||
|
|
||||||
- Node.js 8 or later
|
- Node.js v10 or later
|
||||||
|
|
||||||
### Installing dependencies
|
### Installing dependencies
|
||||||
|
|
||||||
|
@ -57,25 +57,19 @@ npm install
|
||||||
|
|
||||||
### Testing changes
|
### Testing changes
|
||||||
|
|
||||||
Before testing Hyperspace, you'll need to modify the `location` key in `public/config.json`. For example:
|
Run any of the following scripts to test:
|
||||||
|
|
||||||
```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:
|
|
||||||
|
|
||||||
- `npm start` - Starts a local server hosted at https://localhost:3000.
|
- `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` - 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.
|
- `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
|
### Building a release
|
||||||
|
|
||||||
To build a release, run the following command:
|
To build a release, run the following command:
|
||||||
|
|
|
@ -90,7 +90,7 @@ class SearchPage extends Component<any, ISearchPageState> {
|
||||||
if (newLocation !== undefined && typeof newLocation === "string") {
|
if (newLocation !== undefined && typeof newLocation === "string") {
|
||||||
searchParams = newLocation.replace("#/search", "");
|
searchParams = newLocation.replace("#/search", "");
|
||||||
} else {
|
} else {
|
||||||
searchParams = location.hash.replace("#/search", "");
|
searchParams = this.props.location.hash.replace("#/search", "");
|
||||||
}
|
}
|
||||||
return parseParams(searchParams);
|
return parseParams(searchParams);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue