mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-21 17:37:01 +01:00
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.
This commit is contained in:
parent
c7c090d19c
commit
b316dd1c40
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
}
|
@ -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)
|
||||
|
@ -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
Block a user