Skip to content

Commit

Permalink
Use yarn, remove home page, lint, cleanup (MetaMask#96)
Browse files Browse the repository at this point in the history
* use yarn; lint; remove landing page, cruft

* rebase fixup
  • Loading branch information
rekmarks authored Apr 28, 2020
1 parent c6a8220 commit a700299
Show file tree
Hide file tree
Showing 26 changed files with 8,160 additions and 12,120 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
.DS_Store
.DS_Store
package-lock.json
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Getting Started
1. Open project in terminal and run `npm install`
2. Once install is finish run `npm run dev` to run locally
1. Open your browser and it should be hosted on `localhost:8080/`

1. Open project in terminal and run `yarn`
2. Once install is finish run `yarn start` to run locally
3. Open your browser and it should be hosted on `localhost:8080/`
18 changes: 15 additions & 3 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { fs, path } = require('@vuepress/shared-utils')

module.exports = ctx => ({
module.exports = _ctx => ({
dest: 'docs/dist',

locales: {
Expand All @@ -10,6 +8,7 @@ module.exports = ctx => ({
description: 'Welcome'
}
},

head: [
['link', { rel: 'icon', href: `/metamask-fox.svg` }],
['link', { rel: 'manifest', href: '/manifest.json' }],
Expand All @@ -21,9 +20,12 @@ module.exports = ctx => ({
['meta', { name: 'msapplication-TileImage', content: '/icons/msapplication-icon-144x144.png' }],
['meta', { name: 'msapplication-TileColor', content: '#000000' }]
],

theme: '@vuepress/vue',

themeConfig: {
repo: 'MetaMask/metamask-docs',
logo: '/metamask-fox.svg',
editLinks: true,
docsDir: 'packages/docs/dist',
locales: {
Expand All @@ -39,6 +41,7 @@ module.exports = ctx => ({
}
}
},

plugins: [
['@vuepress/back-to-top', true],
['@vuepress/pwa', {
Expand All @@ -59,7 +62,16 @@ module.exports = ctx => ({
before: info => `<UpgradePath title="${info}">`,
after: '</UpgradePath>',
}],
['vuepress-plugin-redirect', {
redirectors: [
{
base: '/',
alternative: '/guide/'
},
],
}]
],

extraWatchFiles: [
'.vuepress/nav/en.js',
]
Expand Down
64 changes: 0 additions & 64 deletions docs/.vuepress/nav/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,68 +3,4 @@ module.exports = [
text: 'Guide',
link: '/guide/',
},
// {
// text: 'Config Reference',
// link: '/config/'
// },
// {
// text: 'Plugin',
// link: '/plugin/'
// },
// {
// text: 'Theme',
// link: '/theme/'
// },
// {
// text: 'Learn More',
// items: [
// {
// text: 'API',
// items: [
// {
// text: 'CLI',
// link: '/api/cli.html'
// },
// {
// text: 'Node',
// link: '/api/node.html'
// },
// ]
// },
// {
// text: 'Contributing Guide',
// items: [
// {
// text: 'Design Concepts',
// link: '/miscellaneous/design-concepts.html'
// },
// {
// text: 'FAQ',
// link: '/faq/',
// },
// {
// text: 'Glossary',
// link: '/miscellaneous/glossary.html'
// },
// ]
// },
// {
// text: 'Miscellaneous',
// items: [
// {
// text: 'Migrate from 0.x',
// link: '/miscellaneous/migration-guide.html'
// },
// {
// text: 'Changelog',
// link: 'https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md'
// }
// ]
// }
// ]
// },
// {
// text: 'v7.2.1',
// link: '/'
// },
]
29 changes: 0 additions & 29 deletions docs/README.md

This file was deleted.

21 changes: 12 additions & 9 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Introduction

Welcome to MetaMask’s Developer Documentation. This documentation is for learning to develop applications for MetaMask.
* You can find the latest version of MetaMask on our [official website](https://metamask.io/).
* For help using MetaMask, visit our [User Support Site](https://metamask.zendesk.com/hc/en-us).
* For up to the minute news, follow our [Peepeth](https://peepeth.com/MetaMask/), [Twitter](https://twitter.com/metamask_io) or [Medium](https://medium.com/metamask) pages.
* To learn how to contribute to the MetaMask project itself, visit our [Internal Docs](https://github.com/MetaMask/metamask-extension/tree/develop/docs).

- You can find the latest version of MetaMask on our [official website](https://metamask.io/).
- For help using MetaMask, visit our [User Support Site](https://metamask.zendesk.com/hc/en-us).
- For up to the minute news, follow our [Peepeth](https://peepeth.com/MetaMask/), [Twitter](https://twitter.com/metamask_io) or [Medium](https://medium.com/metamask) pages.
- To learn how to contribute to the MetaMask project itself, visit our [Internal Docs](https://github.com/MetaMask/metamask-extension/tree/develop/docs).

## Why Metamask

MetaMask was created out of the needs of creating more secure and usable Ethereum-based web sites. In particular, it handles account management and connecting the user to the blockchain.

* [Read the full docs of our injected provider](/guide/ethereum-provider.html)
* [Read the full docs of the JSON RPC API](/guide/json-rpc-api.html)
* [Read about other supported APIs](/guide/experimental-apis.html)
- [Get started here](/guide/getting-started.html)
- [Read the full docs of our injected provider](/guide/ethereum-provider.html)
- [Read the full docs of the JSON RPC API](/guide/json-rpc-api.html)
- [Read about other supported APIs](/guide/experimental-apis.html)

## Account Management

Expand All @@ -33,5 +35,6 @@ We’re aware that there are constantly more and more private blockchains that p
MetaMask makes it easy to write user interfaces to blockchain-based smart contract systems. You can accept payments without knowing how to write smart contracts, but you’ll be able to do much more interesting things if you do.

## New Dapp Developers
* [Learning Solidity](https://karl.tech/learning-solidity-part-1-deploy-a-contract/) by karl Floersch
* [CryptoZombies](https://cryptozombies.io/)

- [Learning Solidity](https://karl.tech/learning-solidity-part-1-deploy-a-contract/) by karl Floersch
- [CryptoZombies](https://cryptozombies.io/)
4 changes: 1 addition & 3 deletions docs/guide/accessing-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ Once you've [connected to a user](./getting-started.html), you can always re-che

If you'd like to be notified when the address changes, we have an event you can subscribe to:



```javascript
ethereum.on('accountsChanged', function (accounts) {
// Time to reload your interface with accounts[0]!
})
});
```

If the first account in the returned array isn't the account you expected, you should notify the user!
Expand Down
20 changes: 10 additions & 10 deletions docs/guide/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@

All markdown files are compiled into Vue components and processed by webpack, therefore you can and **should prefer** referencing any asset using relative URLs:

``` md
```md
![An image](./image.png)
```

This would work the same way as in `*.vue` file templates. The image will be processed with `url-loader` and `file-loader`, and copied to appropriate locations in the generated static build.

In addition, you can use the `~` prefix to explicitly indicate this is a webpack module request, allowing you to reference files with webpack aliases or from npm dependencies:

``` md
```md
![Image from alias](~@alias/image.png)
![Image from dependency](~some-dependency/image.png)
```

webpack aliases can be configured via [configureWebpack](../config/README.md#configurewebpack) in `.vuepress/config.js`. Example:

``` js
```js
module.exports = {
configureWebpack: {
resolve: {
alias: {
'@alias': 'path/to/some/dir'
}
}
}
}
'@alias': 'path/to/some/dir',
},
},
},
};
```

## Public Files
Expand All @@ -41,8 +41,8 @@ If your site is deployed to a non-root URL, you will need to set the `base` opti

With a base URL, if you want to reference an image in `.vuepress/public`, you'd have to use URLs like `/bar/image.png`. However, this is brittle if you ever decide to change the `base` later. To help with that, VuePress provides a built-in helper `$withBase` (injected onto Vue's prototype) that generates the correct path:

``` vue
<img :src="$withBase('/foo.png')" alt="foo">
```vue
<img :src="$withBase('/foo.png')" alt="foo" />
```

Note you can use the above syntax not only in theme components, but in your markdown files as well.
Expand Down
Loading

0 comments on commit a700299

Please sign in to comment.