diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-02-27 15:10:46 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-03-01 16:22:24 +0100 |
| commit | 6d8f294f21a39a9c3d4d4899ff2b4083718c28ea (patch) | |
| tree | 0c00cfe2168a42edcd12b298a11bd79e49f47db1 /gui | |
| parent | 2610bd23035901ba0e25824629d3768b4430a708 (diff) | |
| download | mullvadvpn-6d8f294f21a39a9c3d4d4899ff2b4083718c28ea.tar.xz mullvadvpn-6d8f294f21a39a9c3d4d4899ff2b4083718c28ea.zip | |
Remove mobile and yarn-fixes workspaces
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/packages/mobile/.babelrc | 3 | ||||
| -rw-r--r-- | gui/packages/mobile/.flowconfig | 67 | ||||
| -rw-r--r-- | gui/packages/mobile/.gitattributes | 1 | ||||
| -rw-r--r-- | gui/packages/mobile/.gitignore | 56 | ||||
| -rw-r--r-- | gui/packages/mobile/App.js | 41 | ||||
| -rw-r--r-- | gui/packages/mobile/app.json | 4 | ||||
| -rw-r--r-- | gui/packages/mobile/index.js | 8 | ||||
| -rw-r--r-- | gui/packages/mobile/package.json | 31 | ||||
| -rw-r--r-- | gui/packages/mobile/postinstall.js | 33 | ||||
| -rw-r--r-- | gui/packages/yarn-fixes/package.json | 8 | ||||
| -rw-r--r-- | gui/packages/yarn-fixes/patch-yarn.js | 31 |
11 files changed, 0 insertions, 283 deletions
diff --git a/gui/packages/mobile/.babelrc b/gui/packages/mobile/.babelrc deleted file mode 100644 index a9ce1369e6..0000000000 --- a/gui/packages/mobile/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["react-native"] -} diff --git a/gui/packages/mobile/.flowconfig b/gui/packages/mobile/.flowconfig deleted file mode 100644 index fc7e2123ad..0000000000 --- a/gui/packages/mobile/.flowconfig +++ /dev/null @@ -1,67 +0,0 @@ -[ignore] -; We fork some components by platform -.*/*[.]android.js - -; Ignore "BUCK" generated dirs -<PROJECT_ROOT>/\.buckd/ - -; Ignore unexpected extra "@providesModule" -.*/node_modules/.*/node_modules/fbjs/.* - -; Ignore duplicate module providers -; For RN Apps installed via npm, "Libraries" folder is inside -; "node_modules/react-native" but in the source repo it is in the root -.*/Libraries/react-native/React.js - -; Ignore polyfills -.*/Libraries/polyfills/.* - -; Ignore metro -.*/node_modules/metro/.* - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js -node_modules/react-native/flow/ -node_modules/react-native/flow-github/ - -[options] -emoji=true - -module.system=hastez -module.system.haste.use_name_reducers=true -# get basename -module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' -# strip .js or .js.flow suffix -module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' -# strip .ios suffix -module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' -module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' -module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' -module.system.haste.paths.blacklist=.*/__tests__/.* -module.system.haste.paths.blacklist=.*/__mocks__/.* -module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.* -module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.* - -munge_underscores=true - -module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' - -module.file_ext=.js -module.file_ext=.jsx -module.file_ext=.json -module.file_ext=.native.js - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - -[version] -^0.75.0 diff --git a/gui/packages/mobile/.gitattributes b/gui/packages/mobile/.gitattributes deleted file mode 100644 index d42ff18354..0000000000 --- a/gui/packages/mobile/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.pbxproj -text diff --git a/gui/packages/mobile/.gitignore b/gui/packages/mobile/.gitignore deleted file mode 100644 index 5d647565fa..0000000000 --- a/gui/packages/mobile/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace - -# Android/IntelliJ -# -build/ -.idea -.gradle -local.properties -*.iml - -# node.js -# -node_modules/ -npm-debug.log -yarn-error.log - -# BUCK -buck-out/ -\.buckd/ -*.keystore - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/ - -*/fastlane/report.xml -*/fastlane/Preview.html -*/fastlane/screenshots - -# Bundle artifact -*.jsbundle diff --git a/gui/packages/mobile/App.js b/gui/packages/mobile/App.js deleted file mode 100644 index b697fb660d..0000000000 --- a/gui/packages/mobile/App.js +++ /dev/null @@ -1,41 +0,0 @@ -// @flow - -import * as React from 'react'; -import { Component, Text, View, Platform, Styles } from 'reactxp'; - -const instructions = Platform.select({ - ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', - android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu', -}); - -type Props = {}; -export default class App extends Component<Props> { - render() { - return ( - <View style={styles.container}> - <Text style={styles.welcome}>Welcome to React Native!</Text> - <Text style={styles.instructions}>To get started, edit App.js</Text> - <Text style={styles.instructions}>{instructions}</Text> - </View> - ); - } -} - -const styles = { - container: Styles.createViewStyle({ - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', - }), - welcome: Styles.createTextStyle({ - fontSize: 20, - textAlign: 'center', - margin: 10, - }), - instructions: Styles.createTextStyle({ - textAlign: 'center', - color: '#333333', - marginBottom: 5, - }), -}; diff --git a/gui/packages/mobile/app.json b/gui/packages/mobile/app.json deleted file mode 100644 index c6b64bcd1b..0000000000 --- a/gui/packages/mobile/app.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "RXApp", - "displayName": "Mullvad VPN" -} diff --git a/gui/packages/mobile/index.js b/gui/packages/mobile/index.js deleted file mode 100644 index c6546b4989..0000000000 --- a/gui/packages/mobile/index.js +++ /dev/null @@ -1,8 +0,0 @@ -// @flow - -import * as React from 'react'; -import RX from 'reactxp'; -import App from './App'; - -RX.App.initialize(true, true); -RX.UserInterface.setMainView(<App />); diff --git a/gui/packages/mobile/package.json b/gui/packages/mobile/package.json deleted file mode 100644 index c864c567e9..0000000000 --- a/gui/packages/mobile/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "mobile", - "version": "0.1.0", - "private": true, - "productName": "Mullvad VPN", - "description": "Mullvad VPN client", - "author": { - "name": "Mullvad VPN", - "email": "support@mullvad.net" - }, - "repository": "https://github.com/mullvad/mullvadvpn-app", - "license": "GPL-3.0", - "dependencies": { - "@mullvad/components": "0.1.0", - "react": "^16.5.0", - "react-native": "^0.56", - "reactxp": "^1.5.0" - }, - "devDependencies": { - "@babel/cli": "^7.1.5", - "@babel/core": "^7.1.5", - "babel-preset-react-native": "^5.0.0" - }, - "scripts": { - "postinstall": "node ./postinstall.js", - "eject": "react-native eject", - "android": "react-native run-android --simulator", - "ios": "react-native run-ios --simulator", - "test": "echo '1' ; exit 1" - } -} diff --git a/gui/packages/mobile/postinstall.js b/gui/packages/mobile/postinstall.js deleted file mode 100644 index 6b5c80664b..0000000000 --- a/gui/packages/mobile/postinstall.js +++ /dev/null @@ -1,33 +0,0 @@ -// -// React-native CLI doesn't function properly in workspace configuration. -// -// Symlinking `/gui/node_modules/react-native` to `/gui/packages/mobile/node_modules/react-native` -// solves this. See rn-cli.config.js for project roots override. -// - -const path = require('path'); -const fs = require('fs'); - -const sourcePath = path.resolve(path.join(__dirname, '../../node_modules/react-native')); -const symlinkPath = path.join(__dirname, 'node_modules/react-native'); - -try { - console.log('Removing a symlink to react-native'); - fs.unlinkSync(symlinkPath); -} catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } -} - -try { - console.log('Adding a symlink to react-native'); - - // Symlinks require elevated permissions on Windows. Use junction instead. - const type = process.platform === 'win32' ? 'junction' : undefined; - - fs.symlinkSync(sourcePath, symlinkPath, type); - console.log('Done'); -} catch (error) { - console.error('Cannot symlink react-native: ' + error.message); -} diff --git a/gui/packages/yarn-fixes/package.json b/gui/packages/yarn-fixes/package.json deleted file mode 100644 index a884f240aa..0000000000 --- a/gui/packages/yarn-fixes/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "private": true, - "name": "yarn-fixes", - "version": "0.1.0", - "scripts": { - "preinstall": "node ./patch-yarn.js" - } -} diff --git a/gui/packages/yarn-fixes/patch-yarn.js b/gui/packages/yarn-fixes/patch-yarn.js deleted file mode 100644 index 4ba6b3fe36..0000000000 --- a/gui/packages/yarn-fixes/patch-yarn.js +++ /dev/null @@ -1,31 +0,0 @@ -// Yarn 1.9.4 has a path lookup bug on Windows, when it looks for the binaries referenced in -// scripts under '\gui\node_modules\node_modules' instead of '\gui\node_modules'. -// This patch adds a junction between those two to keep that house of cards from falling apart. -// GitHub issue: https://github.com/yarnpkg/yarn/issues/4564 - -const path = require('path'); -const fs = require('fs'); - -if (process.platform !== 'win32') { - return; -} - -const sourcePath = path.resolve(path.join(__dirname, '../../node_modules')); -const symlinkPath = path.join(__dirname, '../../node_modules/node_modules'); - -try { - console.log('Removing a symlink to node_modules/node_modules'); - fs.unlinkSync(symlinkPath); -} catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } -} - -try { - console.log('Applying yarn workspaces patch for node_modules/node_modules'); - fs.symlinkSync(sourcePath, symlinkPath, 'junction'); - console.log('Done'); -} catch (error) { - console.error('Cannot symlink node_modules/node_modules: ' + error.message); -} |
