-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDPA-2181] Upgrade Ripple storybook to v5 (#415)
* Move jest config to root * Update storybook to latest, add to project at /src, remove ripple-ui-components package * WIP on story conversion * Adds all component stories * Storybook 5 upgrade * Storybook 5 upgrade * Fix babel config for jest * Fix corejs issue * Fixes to get storyshots tests working. * Add mock for moment timezone * Update dockerfile * fix babel path * fix build-storybook command * require svg-sprite-loader in storybook package * Add babel dependencies to example project * Added lagoon build env * Remove storybook-readme plugin - add a11y and viewport * Update snapshots * Fix issues with imports and update snapshots * Remove template components and stories * Add TODO on RplDivider removal
- Loading branch information
1 parent
f268352
commit 3b0a3fd
Showing
659 changed files
with
22,026 additions
and
84,735 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ storybook-static | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
/src/public | ||
|
||
# tests | ||
coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const moment = require('moment-timezone') | ||
jest.doMock('moment', () => { | ||
moment.tz.setDefault('Australia/Melbourne') | ||
return moment | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import registerRequireContextHook from 'babel-plugin-require-context-hook/register' | ||
registerRequireContextHook() |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,4 @@ Run `yarn run start:example` | |
|
||
## Running Storybook | ||
|
||
Run `yarn run start:storybook` | ||
Run `yarn run start:storybook` |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current' | ||
} | ||
} | ||
] | ||
], | ||
plugins: [ | ||
'@babel/plugin-syntax-dynamic-import', | ||
'transform-vue-jsx', | ||
'@babel/plugin-transform-runtime' | ||
], | ||
env: { | ||
test: { | ||
presets: [['@babel/preset-env', { targets: { node: 'current' } }]], | ||
plugins: ['require-context-hook', 'dynamic-import-node'] | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
module.exports = { | ||
'verbose': true, | ||
'testURL': 'http://localhost', | ||
'collectCoverage': true, | ||
'testMatch': ['**/unit/**/*.test.js'], | ||
'moduleFileExtensions': [ | ||
'js', | ||
'json', | ||
'vue' | ||
], | ||
'transform': { | ||
'^.+\\.js$': '<rootDir>/node_modules/babel-jest' | ||
verbose: true, | ||
testURL: 'http://localhost', | ||
collectCoverage: true, | ||
testMatch: ['**/unit/**/*.test.js', '**/*.test.js'], | ||
moduleFileExtensions: ['js', 'json', 'vue'], | ||
setupFiles: ['<rootDir>/.jest/register-context.js', 'jest-canvas-mock'], | ||
setupFilesAfterEnv: ['<rootDir>/.jest/moment.js'], | ||
transform: { | ||
'^.+\\.js$': '<rootDir>/node_modules/babel-jest', | ||
'.*\\.(vue)$': '<rootDir>/node_modules/jest-vue-preprocessor', | ||
'^.+\\.md?$': 'markdown-loader-jest' | ||
}, | ||
'transformIgnorePatterns': ['node_modules/(?!(@dpc-sdp*)/)'] | ||
transformIgnorePatterns: [ | ||
'node_modules/(?!(@dpc-sdp*|ol|ol-ext|storybook-addon-vue-info|@storybook*)/)' | ||
], | ||
moduleNameMapper: { | ||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|svg)$': | ||
'<rootDir>/__mocks__/fileMock.js', | ||
'\\.(css|scss)$': '<rootDir>/__mocks__/styleMock.js' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.