Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

Commit d6f9554

Browse files
authored
Gatsby spike (#205)
* started process of adding gatsby in via pages directory generated for next have all pages rendering via gatsby with the exception of subexamples. Assets and links are not fixed yet * fixed nav links * replaced next head with react helmet * fixed link button for gatsby * fixed jest config to work with gatsby * fixed switch-link besides complications with relative links * gatsby-node.js added with minor webpack customisations * update react to 16.10.2 to be inline with atlaskit * fix issue with incorrect links on home page * do not get parentId if package is directly specified * update build command to be gatsby * serious attempt to strip out dependencies * removed an unusued package ++ removed unused modules
1 parent 2970e19 commit d6f9554

File tree

81 files changed

+7342
-4190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+7342
-4190
lines changed

.circleci/config.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
version: 2
1+
version: 4
22

33
job-setup: &job-setup
44
docker:
5-
- image: circleci/node:8.11.3-browsers
5+
- image: circleci/node:10.13.0
66
working_directory: ~/repo
77

88
restore-cache: &restore-cache
@@ -82,18 +82,14 @@ jobs:
8282

8383
- run: *install-bolt
8484

85-
- run:
86-
name: Build website (using complete-config-project)
87-
command: bolt build:website:complete
88-
8985
- run:
9086
name: Start up website (using complete-config-project)
9187
command: bolt start:website:complete
9288
background: true
9389

9490
- run:
9591
name: Cypress Suite
96-
command: node_modules/.bin/wait-on http://localhost:3000 && bolt cypress:run
92+
command: node_modules/.bin/wait-on http://localhost:8000 && bolt cypress:run
9793

9894
workflows:
9995
version: 2

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules
22
.next
33
out
4+
brisk-out
45

56
packages/website/pages
67

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
],
1010
"plugins": ["emotion"],
1111
"rules": {
12+
"no-console": "off",
1213
"import/no-unresolved": "off",
1314
"emotion/jsx-import": "error",
1415
"react/jsx-filename-extension": "off",

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,26 @@ node_modules
55
.idea
66
.vscode
77

8+
.cache
9+
*.tgz
10+
811
package-lock.json
912
yarn-error.log
1013

1114
/cypress
1215
**/cypress/screenshots
1316

17+
brisk-out
1418
scratchings.js
1519

1620
/packages/website/pages
1721

1822
/packages/website/data
1923
/packages/website/static/favicon.ico
2024
/packages/website/typings
25+
2126
/packages/**/bundles
27+
/packages/website/public
2228
/packages/**/**/yarn.lock
2329

2430
dist

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
*.json
33
dist
44
/out
5+
brisk-out
6+
.cache
57
/packages/website/pages
68
/cypress

__mocks__/file-mock.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = 'test-file-stub';

cypress.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"baseUrl": "http://localhost:3000",
2+
"baseUrl": "http://localhost:8000",
33
"integrationFolder": "packages/website/cypress/integration",
44
"fixturesFolder": "packages/website/cypress/fixtures",
55
"screenshotsFolder": "packages/website/cypress/screenshots",

docs.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (process.env && process.env.CONTEXT !== 'production') {
3131
module.exports = () => ({
3232
siteName: 'Brisk Docs Docs',
3333
packages: ['./packages/*'],
34-
showSubExamples: true,
34+
showSubExamples: false,
3535
docs,
3636
links,
3737
});

jest-setup.js

+5
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
const Enzyme = require('enzyme');
33
const Adapter = require('enzyme-adapter-react-16');
44

5+
// eslint-disable-next-line no-underscore-dangle
6+
global.___loader = {
7+
enqueue: jest.fn(),
8+
};
9+
510
Enzyme.configure({ adapter: new Adapter() });

jest.config.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
module.exports = {
22
setupFiles: ['./jest-setup.js'],
3-
testPathIgnorePatterns: ['./cypress/', '__fixtures__'],
4-
transformIgnorePatterns: ['node_modules/(?!(@atlaskit)/)'],
3+
testPathIgnorePatterns: ['./cypress/', '__fixtures__', `.cache`, `public`],
4+
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.([tj]sx?)$',
5+
transformIgnorePatterns: ['node_modules/(?!(@atlaskit|gatsby)/)'],
6+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
57
moduleNameMapper: {
68
'\\.(css|less)$': '<rootDir>/__mocks__/style-mock.js',
9+
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': `<rootDir>/__mocks__/file-mock.js`,
10+
},
11+
globals: {
12+
__PATH_PREFIX__: ``,
713
},
814
};

package.json

+62-90
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,23 @@
1010
"cypress:open": "cypress open",
1111
"cypress:run": "cypress run",
1212
"build": "preconstruct build",
13-
"dev:website": "bolt w @brisk-docs/website run dev",
14-
"dev:complete": "bolt w @brisk-docs/website run dev:complete",
15-
"build:website": "bolt w @brisk-docs/website run build:site",
16-
"build:website:complete": "bolt w @brisk-docs/website run build:site:complete",
17-
"start:website": "bolt w @brisk-docs/website run start",
18-
"start:website:complete": "bolt w @brisk-docs/website run start:complete",
1913
"build:docs": "NODE_ENV=production node packages/website/bin.js build",
20-
"export": "node packages/website/bin.js export",
21-
"clean": "yarn delete:modules && yarn delete:caches && yarn delete:dist",
22-
"delete:caches": "rm -rf packages/website/.next && rm -rf packages/website/pages/packages && rm -rf packages/website/pages/docs && rm -rf packages/website/pages/guides",
23-
"delete:dist": "bolt ws exec --parallel -- rm -rf dist",
24-
"delete:modules": "bolt ws exec --parallel -- rm -rf node_modules && rm -rf node_modules",
25-
"docs": "node packages/website/bin.js dev",
26-
"build:pages": "node packages/website/bin.js build-pages",
14+
"clean": "yarn clean:caches && yarn clean:dist && yarn clean:modules",
15+
"clean:caches": "rm -rf packages/website/pages && rm -rf packages/website/.cache",
16+
"clean:dist": "bolt ws exec --parallel -- rm -rf dist",
17+
"clean:modules": "bolt ws exec --parallel -- rm -rf node_modules && rm -rf node_modules",
2718
"prettier": "prettier --write \"**/*.{js,ts,tsx}\"",
2819
"lint": "yarn lint:eslint && yarn lint:prettier && yarn check:types",
2920
"lint:prettier": "prettier --list-different \"**/*.{js,ts,tsx}\"",
3021
"lint:eslint": "yarn eslint . --ext .ts,.tsx,.js",
3122
"check:types": "yarn tsc",
3223
"release": "yarn build && changeset publish",
33-
"prepare:docs": "bolt && yarn build:docs && yarn export",
34-
"postinstall": "preconstruct dev",
35-
"bolt:fix": "bolt-check --fix"
24+
"prepare:docs": "bolt && NODE_ENV=production yarn v-brisk build",
25+
"postinstall": "preconstruct dev && manypkg check",
26+
"bolt:fix": "manypkg fix",
27+
"start:website:complete": "bolt w @brisk-docs/gatsby-generator run start:complete",
28+
"v-brisk": "node packages/website/bin.js",
29+
"quick-pack": "yarn build && cd packages/website && yarn pack"
3630
},
3731
"bolt": {
3832
"version": "^0.23.2",
@@ -48,24 +42,21 @@
4842
]
4943
},
5044
"dependencies": {
51-
"@atlaskit/avatar": "^14.1.8",
52-
"@atlaskit/banner": "^8.0.1",
45+
"@atlaskit/avatar": "^17.1.3",
5346
"@atlaskit/breadcrumbs": "^8.0.0",
5447
"@atlaskit/button": "^8.2.4",
55-
"@atlaskit/calendar": "^8.0.0",
5648
"@atlaskit/checkbox": "^7.0.0",
5749
"@atlaskit/code": "^9.0.0",
5850
"@atlaskit/css-reset": "^3.0.5",
5951
"@atlaskit/drawer": "^2.7.1",
6052
"@atlaskit/dropdown-menu": "^6.1.26",
61-
"@atlaskit/dynamic-table": "^10.0.23",
53+
"@atlaskit/dynamic-table": "^13.5.0",
6254
"@atlaskit/icon": "^16.0.1",
63-
"@atlaskit/logo": "^9.1.0",
6455
"@atlaskit/navigation-next": "^4.1.2",
6556
"@atlaskit/pagination": "^10.0.1",
6657
"@atlaskit/quick-search": "^5.2.5",
67-
"@atlaskit/section-message": "^1.0.17",
68-
"@atlaskit/table-tree": "^5.0.7",
58+
"@atlaskit/section-message": "^4.1.1",
59+
"@atlaskit/table-tree": "^7.1.2",
6960
"@atlaskit/theme": "^6.0.0",
7061
"@atlaskit/toggle": "^7.0.0",
7162
"@atlaskit/tree": "^4.1.11",
@@ -74,126 +65,107 @@
7465
"@babel/core": "^7.2.2",
7566
"@babel/plugin-proposal-class-properties": "^7.3.4",
7667
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
68+
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
7769
"@babel/plugin-transform-runtime": "^7.3.4",
7870
"@babel/preset-env": "^7.3.4",
79-
"@babel/preset-flow": "^7.0.0",
8071
"@babel/preset-react": "^7.0.0",
8172
"@babel/preset-typescript": "^7.3.3",
8273
"@babel/runtime": "^7.4.3",
8374
"@babel/runtime-corejs2": "^7.4.3",
84-
"@changesets/cli": "^2.0.1",
75+
"@changesets/cli": "^2.3.2",
8576
"@emotion/core": "^10.0.9",
8677
"@emotion/styled": "^10.0.9",
8778
"@emotion/styled-base": "^10.0.10",
79+
"@manypkg/cli": "^0.8.1",
8880
"@mdx-js/loader": "^0.17.5",
89-
"@mdx-js/mdx": "^0.15.0",
90-
"@mdx-js/tag": "^0.17.5",
81+
"@mdx-js/mdx": "^1.0.0",
82+
"@mdx-js/react": "^1.5.0",
83+
"@reach/router": "^1.2.1",
9184
"@types/command-line-args": "^5.0.0",
85+
"@types/enzyme": "^2.8.11",
86+
"@types/fs-extra": "^8.0.0",
87+
"@types/jest": "^21.1.2",
9288
"@types/js-yaml": "^3.12.1",
9389
"@types/lodash": "^4.14.123",
9490
"@types/lodash.flatten": "^4.4.6",
9591
"@types/mock-fs": "^3.6.30",
96-
"@types/next": "^8.0.3",
9792
"@types/prismjs": "^1.16.0",
98-
"@zeit/next-bundle-analyzer": "^0.1.2",
99-
"@zeit/next-css": "^1.0.1",
100-
"@zeit/next-mdx": "^1.2.0",
101-
"@zeit/next-typescript": "^1.1.1",
93+
"@types/react": "^16.4.18",
94+
"@types/react-helmet": "^5.0.14",
95+
"@types/semver": "^5.5.0",
96+
"@typescript-eslint/eslint-plugin": "^1.5.0",
97+
"@typescript-eslint/parser": "^1.4.2",
98+
"babel-eslint": "^10.0.1",
10299
"babel-loader": "^8.0.5",
103-
"babel-merge": "^3.0.0",
100+
"babel-plugin-emotion": "^10.0.9",
101+
"babel-plugin-styled-components": "1.10.0",
104102
"babel-plugin-transform-dynamic-import": "^2.1.0",
105103
"babel-plugin-transform-flow-strip-types": "^6.22.0",
106-
"bolt-check": "^0.2.0",
104+
"bolt": "^0.23.2",
107105
"command-line-args": "^5.0.2",
106+
"cypress": "^3.1.5",
108107
"emotion": "^9.1.3",
109108
"emotion-server": "^9.2.12",
109+
"enzyme": "^3.9.0",
110+
"enzyme-adapter-react-16": "^1.9.1",
111+
"eslint": "^5.15.1",
112+
"eslint-config-airbnb": "^17.1.0",
113+
"eslint-config-prettier": "^4.1.0",
114+
"eslint-import-resolver-typescript": "^1.1.1",
115+
"eslint-plugin-cypress": "^2.2.1",
110116
"eslint-plugin-emotion": "^10.0.7",
111-
"express": "^4.16.4",
117+
"eslint-plugin-import": "^2.16.0",
118+
"eslint-plugin-jest": "^22.3.0",
119+
"eslint-plugin-jsx-a11y": "^6.2.1",
120+
"eslint-plugin-react": "^7.12.4",
112121
"extract-react-types-loader": "^0.3.7",
122+
"extracted-loader": "^1.0.7",
113123
"filenamify": "^4.0.0",
114124
"fs-extra": "^7.0.1",
125+
"gatsby": "^2.15.28",
126+
"gatsby-plugin-emotion": "^2.0",
127+
"gatsby-plugin-manifest": "^2.2.26",
128+
"gatsby-plugin-mdx": "^1.0.46",
129+
"gatsby-plugin-page-creator": "^2.1.23",
130+
"gatsby-plugin-react-helmet": "^3.1.10",
131+
"gatsby-plugin-styled-components": "^3.1.8",
132+
"gatsby-plugin-typescript": "^2.1.11",
133+
"gatsby-source-filesystem": "^2.1.28",
115134
"git-url-parse": "^11.1.2",
116135
"glob": "^7.1.3",
136+
"jest": "^24.1.0",
117137
"jest-fixtures": "^0.6.0",
118138
"jest-junit": "^6.4.0",
119139
"js-yaml": "^3.13.1",
120140
"lodash.capitalize": "^4.2.1",
121141
"lodash.debounce": "^4.0.8",
122-
"lodash.flatmap": "^4.5.0",
123142
"lodash.flatten": "^4.4.0",
124143
"lodash.identity": "^3.0.0",
125144
"lodash.snakecase": "^4.1.1",
126-
"next": "^8.0.4",
127-
"next-images": "^1.1.1",
145+
"mock-fs": "^4.10.1",
128146
"outdent": "^0.7.0",
129147
"pkg-dir": "^4.2.0",
130148
"preconstruct": "^0.1.1",
149+
"prettier": "^1.16.4",
131150
"pretty-proptypes": "^0.6.6",
132151
"prismjs": "^1.15.0",
133-
"probot": "^7.2.0",
134152
"prop-types": "^15.6.2",
135153
"raw-loader": "^1.0.0",
136-
"react": "^16.8.4",
154+
"react": "16.10.2",
137155
"react-addons-text-content": "^0.0.4",
138156
"react-dom": "^16.8.4",
157+
"react-helmet": "^5.2.1",
139158
"react-markdown": "^2.5.0",
159+
"react-test-renderer": "^16.0.0",
140160
"remark-frontmatter": "^1.3.2",
141161
"remark-parse": "^6.0.3",
142-
"resolve": "^1.10.0",
143-
"rimraf": "^2.6.3",
144162
"semver": "^5.4.1",
145-
"source-map-loader": "^0.2.2",
146163
"styled-components": "^3.2.6",
147-
"thread-loader": "^2.1.2",
148164
"title-case": "^2.1.1",
165+
"ts-jest": "^24.0.0",
149166
"typescript": "^3.2.1",
150-
"uglify-js": "^3.1.7",
151167
"unified": "^7.1.0",
152168
"unist-util-visit": "^1.3.0",
153-
"wait-on": "^3.2.0",
154-
"webpack": "4.28.4"
155-
},
156-
"devDependencies": {
157-
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
158-
"@types/enzyme": "^2.8.11",
159-
"@types/fs-extra": "^8.0.0",
160-
"@types/jest": "^21.1.2",
161-
"@types/lodash.flatmap": "^4.5.6",
162-
"@types/react": "^16.4.18",
163-
"@types/semver": "^5.5.0",
164-
"@typescript-eslint/eslint-plugin": "^1.5.0",
165-
"@typescript-eslint/parser": "^1.4.2",
166-
"babel-eslint": "^10.0.1",
167-
"babel-plugin-emotion": "^10.0.9",
168-
"babel-plugin-styled-components": "^1.10.0",
169-
"bolt": "^0.23.2",
170-
"css-loader": "^1.0.0",
171-
"cypress": "^3.1.5",
172-
"enzyme": "^3.9.0",
173-
"enzyme-adapter-react-16": "^1.9.1",
174-
"eslint": "^5.15.1",
175-
"eslint-config-airbnb": "^17.1.0",
176-
"eslint-config-prettier": "^4.1.0",
177-
"eslint-import-resolver-typescript": "^1.1.1",
178-
"eslint-plugin-cypress": "^2.2.1",
179-
"eslint-plugin-import": "^2.16.0",
180-
"eslint-plugin-jest": "^22.3.0",
181-
"eslint-plugin-jsx-a11y": "^6.2.1",
182-
"eslint-plugin-react": "^7.12.4",
183-
"extracted-loader": "^1.0.7",
184-
"file-loader": "^2.0.0",
185-
"jest": "^24.1.0",
186-
"json-loader": "^0.5.7",
187-
"mock-fs": "^4.10.1",
188-
"nock": "^10.0.0",
189-
"nodemon": "^1.12.1",
190-
"prettier": "^1.16.4",
191-
"react-test-renderer": "^16.0.0",
192-
"smee-client": "^1.0.2",
193-
"standard": "^12.0.1",
194-
"style-loader": "^0.23.0",
195-
"ts-jest": "^24.0.0",
196-
"ts-loader": "^5.3.3",
197-
"tti-polyfill": "^0.2.2"
169+
"wait-on": "^3.2.0"
198170
}
199171
}

0 commit comments

Comments
 (0)