aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Stacey <markjstacey@gmail.com>2019-07-16 01:24:37 +0800
committerGitHub <noreply@github.com>2019-07-16 01:24:37 +0800
commitb316dd1c402d10bf81d401ba679c87b8b9d48ad5 (patch)
tree0f7dfed9046677ccb347204d7cb72a2db8ffb088
parentc7c090d19c333bfcac97ec8f99e2c1518d20870e (diff)
downloadtangerine-wallet-browser-b316dd1c402d10bf81d401ba679c87b8b9d48ad5.tar.gz
tangerine-wallet-browser-b316dd1c402d10bf81d401ba679c87b8b9d48ad5.tar.zst
tangerine-wallet-browser-b316dd1c402d10bf81d401ba679c87b8b9d48ad5.zip
Remove outdated development tools and documentation (#6845)
These files were referencing npm scripts that no longer existed. Notices appear to no longer exist, and the `ui-dev.js` module is no longer actively used. The `mock-dev.js` module is still used for certain integration tests, so I've just removed the reference to the non-existent script.
-rw-r--r--README.md1
-rw-r--r--development/mock-dev.js2
-rw-r--r--development/mockExtension.js44
-rw-r--r--development/notices/.gitkeep0
-rw-r--r--development/ui-dev.js96
-rw-r--r--development/uiStore.js18
-rw-r--r--docs/README.md1
-rw-r--r--docs/notices.md15
8 files changed, 0 insertions, 177 deletions
diff --git a/README.md b/README.md
index 56c921b91..1652e1e7b 100644
--- a/README.md
+++ b/README.md
@@ -68,7 +68,6 @@ To write tests that will be run in the browser using QUnit, add your test files
- [The MetaMask Team](./docs/team.md)
- [How to live reload on local dependency changes](./docs/developing-on-deps.md)
- [How to add new networks to the Provider Menu](./docs/adding-new-networks.md)
-- [How to manage notices that appear when the app starts up](./docs/notices.md)
- [How to port MetaMask to a new platform](./docs/porting_to_new_environment.md)
- [How to use the TREZOR emulator](./docs/trezor-emulator.md)
- [How to generate a visualization of this repository's development](./docs/development-visualization.md)
diff --git a/development/mock-dev.js b/development/mock-dev.js
index 4a3217a06..dafb91266 100644
--- a/development/mock-dev.js
+++ b/development/mock-dev.js
@@ -8,8 +8,6 @@
*
* This is a convenient way to develop and test the plugin
* without having to re-open the plugin or even re-build it.
- *
- * To use, run `npm run mock`.
*/
const render = require('react-dom').render
diff --git a/development/mockExtension.js b/development/mockExtension.js
deleted file mode 100644
index 634d4263a..000000000
--- a/development/mockExtension.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* MockExtension
- *
- * A module for importing the global extension polyfiller
- * and stubbing out all the extension methods with appropriate mocks.
- */
-
-const extension = require('extensionizer')
-const noop = function () {}
-
-const apis = [
- 'alarms',
- 'bookmarks',
- 'browserAction',
- 'commands',
- 'contextMenus',
- 'cookies',
- 'downloads',
- 'events',
- 'extension',
- 'extensionTypes',
- 'history',
- 'i18n',
- 'idle',
- 'notifications',
- 'pageAction',
- 'runtime',
- 'storage',
- 'tabs',
- 'webNavigation',
- 'webRequest',
- 'windows',
-]
-
-apis.forEach(function (api) {
- extension[api] = {}
-})
-
-extension.runtime.reload = noop
-extension.tabs.create = noop
-extension.runtime.getManifest = function () {
- return {
- version: 'development',
- }
-}
diff --git a/development/notices/.gitkeep b/development/notices/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/development/notices/.gitkeep
+++ /dev/null
diff --git a/development/ui-dev.js b/development/ui-dev.js
deleted file mode 100644
index 70f513972..000000000
--- a/development/ui-dev.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* UI DEV
- *
- * This is a utility module.
- * It initializes a minimalist browserifiable project
- * that contains the Metamask UI, with a mocked state.
- *
- * Includes a state menu for switching between different
- * mocked states, along with query param support,
- * so those states are preserved when live-reloading.
- *
- * This is a convenient way to develop on the UI
- * without having to re-enter your password
- * every time the plugin rebuilds.
- *
- * To use, run `npm run ui`.
- */
-
-const render = require('react-dom').render
-const h = require('react-hyperscript')
-const Root = require('../ui/app/pages')
-const configureStore = require('./uiStore')
-const states = require('./states')
-const Selector = require('./selector')
-
-// logger
-const log = require('loglevel')
-window.log = log
-log.setDefaultLevel(1)
-
-// Query String
-const qs = require('qs')
-const queryString = qs.parse(window.location.href.split('#')[1])
-let selectedView = queryString.view || 'first time'
-updateQueryParams(selectedView)
-
-// CSS
-const MetaMaskUiCss = require('../ui/css')
-const injectCss = require('inject-css')
-
-
-function updateQueryParams (newView) {
- queryString.view = newView
- const params = qs.stringify(queryString)
- window.location.href = window.location.href.split('#')[0] + `#${params}`
-}
-
-const actions = {
- _setBackgroundConnection () {},
- update: function (stateName) {
- selectedView = stateName
- updateQueryParams(stateName)
- const newState = states[selectedView]
- return {
- type: 'GLOBAL_FORCE_UPDATE',
- value: newState,
- }
- },
-}
-
-var css = MetaMaskUiCss()
-injectCss(css)
-
-// parse opts
-var store = configureStore(states[selectedView])
-
-// start app
-startApp()
-
-function startApp () {
- const body = document.body
- const container = document.createElement('div')
- container.id = 'test-container'
- body.appendChild(container)
-
- render(
- h('.super-dev-container', [
-
- h(Selector, { actions, selectedKey: selectedView, states, store }),
-
- h('#app-content', {
- style: {
- height: '500px',
- width: '360px',
- boxShadow: 'grey 0px 2px 9px',
- margin: '20px',
- },
- }, [
- h(Root, {
- store: store,
- }),
- ]),
-
- ]
- ), container)
-}
-
diff --git a/development/uiStore.js b/development/uiStore.js
deleted file mode 100644
index bfec8f5e4..000000000
--- a/development/uiStore.js
+++ /dev/null
@@ -1,18 +0,0 @@
-const createStore = require('redux').createStore
-const applyMiddleware = require('redux').applyMiddleware
-const thunkMiddleware = require('redux-thunk').default
-const createLogger = require('redux-logger').createLogger
-const rootReducer = require('../ui/app/ducks')
-
-module.exports = configureStore
-
-const loggerMiddleware = createLogger()
-
-const createStoreWithMiddleware = applyMiddleware(
- thunkMiddleware,
- loggerMiddleware
-)(createStore)
-
-function configureStore (initialState) {
- return createStoreWithMiddleware(rootReducer, initialState)
-}
diff --git a/docs/README.md b/docs/README.md
index 3c9bc0b4a..6c54c98cf 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -15,7 +15,6 @@ To learn how to develop MetaMask-compatible applications, visit our [Developer D
- [Publishing Guide](./publishing.md)
- [How to live reload on local dependency changes](./developing-on-deps.md)
- [How to add new networks to the Provider Menu](./adding-new-networks.md)
-- [How to manage notices that appear when the app starts up](./notices.md)
- [How to port MetaMask to a new platform](./porting_to_new_environment.md)
- [How to generate a visualization of this repository's development](./development-visualization.md)
- [How to add a feature behind a secret feature flag](./secret-preferences.md)
diff --git a/docs/notices.md b/docs/notices.md
deleted file mode 100644
index 826e6e84e..000000000
--- a/docs/notices.md
+++ /dev/null
@@ -1,15 +0,0 @@
-## Generating Notices
-
-To add a notice:
-```
-npm run generateNotice
-```
-Enter the body of your notice into the text editor that pops up, without including the body. Be sure to save the file before closing the window!
-Afterwards, enter the title of the notice in the command line and press enter. Afterwards, add and commit the new changes made.
-
-To delete a notice:
-```
-npm run deleteNotice
-```
-A list of active notices will pop up. Enter the corresponding id in the command line prompt and add and commit the new changes afterwards.
-