Skip to content

Commit 5dac8aa

Browse files
authored
fix(readme): fix type, update pf deps, add oob support for bookmarkable urls with surge deployments (#81)
allow network access in dev mode use importHelpers tsconfig setting specify supported environments
1 parent e612456 commit 5dac8aa

File tree

10 files changed

+184
-408
lines changed

10 files changed

+184
-408
lines changed

.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,9 @@
4545
"import/no-unresolved": "off",
4646
"import/extensions": "off",
4747
"react/prop-types": "off"
48+
},
49+
"env": {
50+
"browser": true,
51+
"node": true
4852
}
4953
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Out of the box you'll get an app layout with chrome (header/sidebar), routing, b
1111
git clone https://github.com/patternfly/patternfly-react-seed # clone the project
1212
cd patternfly-react-seed # navigate into the project directory
1313
npm install # install patternfly-react-seed dependencies
14-
npm run start # start the development server
14+
npm run start:dev # start the development server
1515
```
1616
## Development Scripts
1717

dr-surge.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
const indexPath = path.resolve(__dirname, 'dist/index.html');
4+
const targetFilePath = path.resolve(__dirname, 'dist/200.html');
5+
// ensure we have bookmarkable url's when publishing to surge
6+
// https://surge.sh/help/adding-a-200-page-for-client-side-routing
7+
fs.createReadStream(indexPath).pipe(fs.createWriteStream(targetFilePath));

jest.config.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ module.exports = {
1717
"<rootDir>/src"
1818
],
1919

20-
// An array of file extensions your modules use
21-
moduleFileExtensions: [
22-
"ts",
23-
"tsx",
24-
"js"
25-
],
26-
2720
// A map from regular expressions to module names that allow to stub out resources with a single module
2821
moduleNameMapper: {
2922
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
@@ -43,13 +36,4 @@ module.exports = {
4336
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
4437
snapshotSerializers: ['enzyme-to-json/serializer'],
4538

46-
// The glob patterns Jest uses to detect test files
47-
testMatch: [
48-
"**/*.test.(ts|tsx)"
49-
],
50-
51-
// A map from regular expressions to paths to transformers
52-
transform: {
53-
"^.+\\.(ts|tsx)$": "ts-jest"
54-
}
5539
};

0 commit comments

Comments
 (0)