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.feature/default_network_editable
parent
c7c090d19c
commit
b316dd1c40
@ -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', |
||||
} |
||||
} |
@ -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) |
||||
} |
||||
|
@ -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) |
||||
} |
@ -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. |
||||
|
Loading…
Reference in new issue