*Summary* - This PR adds storybook into the mobile repo, and adds a sample story for the existing "loading" component. - In the root of the repo run `npm run storybook`. This step automatically scans and loads all stories. A new browser tab will open with the storybook interface. You can configure the storybook host url by updating the .env file in the root of the repo. This might be required if you're using a real device. When running in an emulator, the code tries to use the default network values. - Then run the usual `npm run android` (or `npm run ios`) and `npm run start` commands - Storybook has been integrated into the react-native-dev-menu. When the app is running in the emulator press CTRL+M or CMD+M to open the dev menu and select "Storybook". If running on a real device, shaking the device will bring up the react-native dev menu. You can also press d in the terminal where you ran npm run start to get the app running. - The storybook interface will open in the mobile app. The stories can be controlled either through the desktop browser storybook UI or the mobile browser storybook UI. Both will render the component on the device. *Ticket Link* https://mattermost.atlassian.net/browse/MM-28845 *Device Information* This PR was tested on: Iphone 11 emulator running ios 13.7 Pixel 3XL emulator running Android 10
202 lines
7.7 KiB
JSON
202 lines
7.7 KiB
JSON
{
|
|
"name": "mattermost-mobile",
|
|
"version": "1.37.0",
|
|
"description": "Mattermost Mobile with React Native",
|
|
"repository": "git@github.com:mattermost/mattermost-mobile.git",
|
|
"author": "Mattermost, Inc.",
|
|
"license": "Apache 2.0",
|
|
"private": true,
|
|
"dependencies": {
|
|
"@babel/runtime": "7.12.1",
|
|
"@react-native-community/async-storage": "1.12.1",
|
|
"@react-native-community/cameraroll": "4.0.1",
|
|
"@react-native-community/clipboard": "1.5.0",
|
|
"@react-native-community/masked-view": "0.1.10",
|
|
"@react-native-community/netinfo": "5.9.7",
|
|
"@react-navigation/native": "5.7.6",
|
|
"@react-navigation/stack": "5.9.3",
|
|
"@rudderstack/rudder-sdk-react-native": "1.0.3",
|
|
"@sentry/react-native": "1.9.0",
|
|
"analytics-react-native": "1.2.0",
|
|
"commonmark": "github:mattermost/commonmark.js#f6ab98dede6ce4b4e7adea140ac77249bfb2d6ce",
|
|
"commonmark-react-renderer": "github:mattermost/commonmark-react-renderer#3a2ac19cab725ad28b170fdc1d397dddedcf87eb",
|
|
"core-js": "3.6.5",
|
|
"deep-equal": "2.0.4",
|
|
"deepmerge": "4.2.2",
|
|
"emoji-regex": "9.2.0",
|
|
"form-data": "3.0.0",
|
|
"fuse.js": "6.4.2",
|
|
"intl": "1.2.5",
|
|
"jail-monkey": "2.3.3",
|
|
"mime-db": "1.45.0",
|
|
"moment-timezone": "0.5.31",
|
|
"prop-types": "15.7.2",
|
|
"react": "16.13.1",
|
|
"react-intl": "2.8.0",
|
|
"react-native": "0.63.3",
|
|
"react-native-android-open-settings": "1.3.0",
|
|
"react-native-animatable": "1.3.3",
|
|
"react-native-button": "3.0.1",
|
|
"react-native-calendars": "1.403.0",
|
|
"react-native-circular-progress": "1.3.6",
|
|
"react-native-cookies": "github:mattermost/react-native-cookies#b35bafc388ae09c83bd875e887daf6a0755e0b40",
|
|
"react-native-device-info": "7.0.2",
|
|
"react-native-document-picker": "4.0.0",
|
|
"react-native-elements": "2.3.2",
|
|
"react-native-exception-handler": "2.10.8",
|
|
"react-native-fast-image": "8.3.2",
|
|
"react-native-file-viewer": "2.1.4",
|
|
"react-native-gesture-handler": "1.8.0",
|
|
"react-native-haptic-feedback": "1.11.0",
|
|
"react-native-hw-keyboard-event": "0.0.4",
|
|
"react-native-image-gallery": "github:mattermost/react-native-image-gallery#c1a9f7118e90cc87d47620bc0584c9cac4b0cf38",
|
|
"react-native-image-picker": "2.3.4",
|
|
"react-native-keyboard-aware-scrollview": "2.1.0",
|
|
"react-native-keyboard-tracking-view": "5.7.0",
|
|
"react-native-keychain": "4.0.5",
|
|
"react-native-linear-gradient": "2.5.6",
|
|
"react-native-local-auth": "1.6.0",
|
|
"react-native-localize": "1.4.2",
|
|
"react-native-mmkv-storage": "0.3.7",
|
|
"react-native-navigation": "6.12.2",
|
|
"react-native-notifications": "2.1.7",
|
|
"react-native-passcode-status": "1.1.2",
|
|
"react-native-permissions": "2.2.2",
|
|
"react-native-reanimated": "1.13.1",
|
|
"react-native-safe-area": "0.5.1",
|
|
"react-native-safe-area-context": "3.1.8",
|
|
"react-native-screens": "2.11.0",
|
|
"react-native-section-list-get-item-layout": "2.2.3",
|
|
"react-native-slider": "0.11.0",
|
|
"react-native-status-bar-size": "0.3.3",
|
|
"react-native-svg": "12.1.0",
|
|
"react-native-vector-icons": "7.1.0",
|
|
"react-native-video": "5.1.0-alpha8",
|
|
"react-native-webview": "github:mattermost/react-native-webview#b5e22940a613869d3999feac9451ee65352f4fbe",
|
|
"react-native-youtube": "2.0.1",
|
|
"react-redux": "7.2.1",
|
|
"redux": "4.0.5",
|
|
"redux-action-buffer": "1.2.0",
|
|
"redux-batched-actions": "0.5.0",
|
|
"redux-persist": "6.0.0",
|
|
"redux-persist-transform-filter": "0.0.20",
|
|
"redux-thunk": "2.3.0",
|
|
"reselect": "4.0.0",
|
|
"rn-fetch-blob": "0.12.0",
|
|
"rn-placeholder": "3.0.3",
|
|
"semver": "7.3.2",
|
|
"serialize-error": "7.0.1",
|
|
"shallow-equals": "1.0.0",
|
|
"tinycolor2": "1.4.2",
|
|
"url-parse": "1.4.7"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/cli": "7.12.1",
|
|
"@babel/core": "7.12.3",
|
|
"@babel/plugin-transform-runtime": "7.12.1",
|
|
"@babel/preset-env": "7.12.1",
|
|
"@babel/register": "7.12.1",
|
|
"@react-native-community/eslint-config": "2.0.0",
|
|
"@storybook/addon-knobs": "6.0.26",
|
|
"@storybook/addon-ondevice-knobs": "5.3.23",
|
|
"@storybook/react-native": "5.3.23",
|
|
"@storybook/react-native-server": "5.3.23",
|
|
"@testing-library/react-native": "7.1.0",
|
|
"@types/enzyme": "3.10.7",
|
|
"@types/enzyme-adapter-react-16": "1.0.6",
|
|
"@types/jest": "26.0.15",
|
|
"@types/moment-timezone": "0.5.30",
|
|
"@types/react": "16.9.53",
|
|
"@types/react-native": "0.63.30",
|
|
"@types/react-native-video": "5.0.3",
|
|
"@types/react-redux": "7.1.9",
|
|
"@types/shallow-equals": "1.0.0",
|
|
"@typescript-eslint/eslint-plugin": "3.10.1",
|
|
"@typescript-eslint/parser": "3.10.1",
|
|
"babel-eslint": "10.1.0",
|
|
"babel-jest": "26.6.1",
|
|
"babel-loader": "8.1.0",
|
|
"babel-plugin-module-resolver": "4.0.0",
|
|
"babel-plugin-transform-remove-console": "6.9.4",
|
|
"deep-freeze": "0.0.1",
|
|
"detox": "17.10.3",
|
|
"enzyme": "3.11.0",
|
|
"enzyme-adapter-react-16": "1.15.5",
|
|
"enzyme-to-json": "3.6.1",
|
|
"eslint": "7.11.0",
|
|
"eslint-plugin-header": "3.1.0",
|
|
"eslint-plugin-jest": "24.1.0",
|
|
"eslint-plugin-mattermost": "github:mattermost/eslint-plugin-mattermost#070ce792d105482ffb2b27cfc0b7e78b3d20acee",
|
|
"eslint-plugin-react": "7.21.5",
|
|
"harmony-reflect": "1.6.1",
|
|
"husky": "4.3.0",
|
|
"isomorphic-fetch": "3.0.0",
|
|
"jest": "26.6.1",
|
|
"jest-cli": "26.6.1",
|
|
"jest-enzyme": "7.1.2",
|
|
"jetifier": "1.6.6",
|
|
"jsdom-global": "3.0.2",
|
|
"metro-react-native-babel-preset": "0.63.0",
|
|
"mmjstool": "github:mattermost/mattermost-utilities#519b99a4e51e6c67a0dbd46a6efdff27dc835aaa",
|
|
"mock-async-storage": "2.2.0",
|
|
"mock-socket": "9.0.3",
|
|
"nock": "13.0.4",
|
|
"nyc": "15.1.0",
|
|
"patch-package": "6.2.2",
|
|
"react-dom": "16.13.1",
|
|
"react-native-dev-menu": "4.0.2",
|
|
"react-native-dotenv": "2.4.2",
|
|
"react-native-storybook-loader": "2.0.2",
|
|
"redux-mock-store": "1.5.4",
|
|
"redux-persist-node-storage": "2.0.0",
|
|
"socketcluster": "16.0.1",
|
|
"ts-jest": "26.4.1",
|
|
"typescript": "4.0.3",
|
|
"underscore": "1.11.0",
|
|
"util": "0.12.3"
|
|
},
|
|
"husky": {
|
|
"hooks": {
|
|
"pre-commit": "sh ./scripts/pre-commit.sh"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"android": "react-native run-android",
|
|
"ios": "react-native run-ios",
|
|
"start": "react-native start",
|
|
"check": "npm run lint && npm run tsc",
|
|
"clean": "./scripts/clean.sh",
|
|
"ios-gems": "cd ios && bundle install",
|
|
"fix": "npm run lint -- --fix",
|
|
"lint": "eslint --ignore-path .gitignore --ignore-pattern node_modules --quiet .",
|
|
"pod-install": "cd ios && bundle exec pod install",
|
|
"postinstall": "patch-package && ./scripts/postinstall.sh",
|
|
"tsc": "NODE_OPTIONS=--max_old_space_size=12000 tsc --noEmit",
|
|
"test": "jest --forceExit --runInBand --detectOpenHandles",
|
|
"test:watch": "npm test -- --watch",
|
|
"test:coverage": "jest --coverage",
|
|
"updatesnapshot": "jest --updateSnapshot",
|
|
"mmjstool": "mmjstool",
|
|
"i18n-extract": "npm run mmjstool -- i18n extract-mobile",
|
|
"i18n-clean-empty": "npm run mmjstool -- i18n clean-empty --mobile-dir .",
|
|
"e2e:android": "cd detox && npm run e2e:android-build && npm run e2e:android-test && cd ..",
|
|
"e2e:ios": "cd detox && npm run e2e:ios-test && cd ..",
|
|
"build:ios": "./scripts/build.sh ipa",
|
|
"build:ios-unsigned": "./scripts/build.sh ipa unsigned",
|
|
"build:ios-sim": "./scripts/build.sh ipa simulator",
|
|
"build:android": "./scripts/build.sh apk",
|
|
"build:android-unsigned": "./scripts/build.sh apk unsigned",
|
|
"build-storybook": "build-storybook",
|
|
"prestorybook": "rnstl",
|
|
"storybook": "start-storybook -p 7007"
|
|
},
|
|
"config": {
|
|
"react-native-storybook-loader": {
|
|
"searchDir": [
|
|
"./app/components"
|
|
],
|
|
"pattern": "**/*.stories.@(js|jsx|ts|tsx)",
|
|
"outputFile": "./storybook/storyLoader.js"
|
|
}
|
|
}
|
|
}
|