Skip to content

Commit

Permalink
Merge branch 'master' into relink
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeorpinel committed Jan 6, 2020
2 parents 95a8804 + 0b607e9 commit 74f8a8d
Show file tree
Hide file tree
Showing 248 changed files with 1,159 additions and 1,338 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"error",
{ "code": 80, "ignoreTemplateLiterals": true, "ignoreUrls": true }
],
"no-tabs": "error"
"no-tabs": "error",
"sort-imports": "warn"
}
}
8 changes: 8 additions & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
restylers:
- name: prettier
arguments: ['--write']
include:
- './*.{js,md}'
- 'pages/**/*.js'
- 'public/static/docs/**/*.{js,md}'
- 'src/**/*.js'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Please feel free to use it for your own sites and
We welcome contributions to the DVC docs by the community!

You can refer to our
[Contributing guide](https://dvc.org/doc/user-guide/contributing/docs/) for more
[Contributing guide](https://dvc.org/doc/user-guide/contributing/docs) for more
details. Thank you!

**If you need help:**
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"main": "index.js",
"scripts": {
"dev": "node server.js",
"dev:debug": "node --inspect server.js",
"build": "next build",
"test": "jest",
"start": "NODE_ENV=production node server.js",
"format-staged": "pretty-quick --staged --no-restage --bail",
"format-check": "prettier --check '{.,pages/**,src/**,static/**}/*.{js,jsx,md}'",
"format-check": "prettier --check '{.,pages/**,public/static/docs/**,src/**}/*.{js,md}'",
"lint-check": "eslint src pages",
"format-all": "prettier --write '{.,pages/**,src/**,static/**}/*.{js,jsx,md}'",
"format-all": "prettier --write '{.,pages/**,public/static/docs/**,src/**}/*.{js,md}'",
"format": "prettier --write"
},
"repository": {
Expand All @@ -34,7 +35,8 @@
"lodash.startcase": "^4.4.0",
"lodash.throttle": "^4.1.1",
"lodash.topairs": "^4.3.0",
"next": "^9.1.4",
"micro-cors": "^0.1.1",
"next": "^9.1.6",
"perfect-scrollbar": "^1.4.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
Expand All @@ -48,12 +50,13 @@
"react-scroll": "^1.7.13",
"react-slick": "^0.25.2",
"react-syntax-highlighter": "^11.0.2",
"request": "^2.88.0",
"styled-components": "^4.4.1",
"styled-reset": "^4.0.8",
"unist-util-visit": "2.0.1"
},
"devDependencies": {
"@babel/core": "^7.7.4",
"@babel/core": "^7.7.7",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-plugin-transform-define": "^2.0.0",
Expand All @@ -66,17 +69,15 @@
"husky": "^3.1.0",
"jest": "^24.9.0",
"lint-staged": "^10.0.0-1",
"micro-cors": "^0.1.1",
"prettier": "^1.19.1",
"pretty-quick": "^2.0.1",
"request": "^2.88.0"
"pretty-quick": "^2.0.1"
},
"husky": {
"hooks": {
"pre-commit": "yarn format-staged && lint-staged"
}
},
"lint-staged": {
"*.{js,jsx}": "eslint"
"*.js": "eslint"
}
}
13 changes: 7 additions & 6 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react'
import Document, { Head, Main, NextScript } from 'next/document'
import { ServerStyleSheet } from 'styled-components'
import {
META_BASE_TITLE,
META_DESCRIPTION,
META_KEYWORDS,
META_SOCIAL_IMAGE
} from '../src/consts'

import React from 'react'
import { ServerStyleSheet } from 'styled-components'

const inject = str => (
<div className="inject" dangerouslySetInnerHTML={{ __html: str }} />
)
Expand Down Expand Up @@ -61,23 +62,23 @@ export default class Page extends Document {
<link
rel="shortcut icon"
type="image/x-icon"
href="/static/favicon.ico"
href="/static/img/favicon.ico"
/>
<link
rel="shortcut icon"
type="image/vnd.microsoft.icon"
href="/static/favicon.ico"
href="/static/img/favicon.ico"
/>
<link
rel="icon"
type="image/png"
href="/static/favicon-32x32.png"
href="/static/img/favicon-32x32.png"
sizes="32x32"
/>
<link
rel="icon"
type="image/png"
href="/static/favicon-16x16.png"
href="/static/img/favicon-16x16.png"
sizes="16x16"
/>
<link
Expand Down
4 changes: 2 additions & 2 deletions pages/api/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* potential ability to cache comments count in the future.
*/

import { BLOG_URL, FORUM_URL } from '../../src/consts'

import Cors from 'micro-cors'
import request from 'request'

import { BLOG_URL, FORUM_URL } from '../../src/consts'

const cors = Cors({
allowedMethods: ['GET', 'HEAD'],
origin: BLOG_URL
Expand Down
24 changes: 11 additions & 13 deletions pages/doc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
/* global docsearch:readonly */

import React, { useCallback, useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import React, { useCallback, useEffect, useState } from 'react'
import { getItemByPath, structure } from '../src/utils/sidebar'

import Error from 'next/error'
import Router from 'next/router'
// components
import Page from '../src/Page'
import { HeadInjector } from '../src/Documentation/HeadInjector'
import Hamburger from '../src/Hamburger'
import SearchForm from '../src/SearchForm'
import SidebarMenu from '../src/Documentation/SidebarMenu/SidebarMenu'
import { HeadInjector } from '../src/Documentation/HeadInjector'
import Markdown from '../src/Documentation/Markdown/Markdown'
import Page from '../src/Page'
import PropTypes from 'prop-types'
import RightPanel from '../src/Documentation/RightPanel/RightPanel'
// utils
import Router from 'next/router'
import SearchForm from '../src/SearchForm'
import SidebarMenu from '../src/Documentation/SidebarMenu/SidebarMenu'
import fetch from 'isomorphic-fetch'
import kebabCase from 'lodash.kebabcase'
// sidebar data and helpers
import { structure, getItemByPath } from '../src/utils/sidebar'
// styles
import styled from 'styled-components'
import { media } from '../src/styles'
import styled from 'styled-components'

const ROOT_ELEMENT = 'bodybag'
const SIDEBAR_MENU = 'sidebar-menu'
Expand Down Expand Up @@ -158,6 +155,7 @@ Documentation.getInitialProps = async ({ asPath, req }) => {
markdown: text
}
} catch {
console.error(`Can't fetch ${protocol}//${host}${item.source}`)
window.location.reload()
}
}
Expand Down
17 changes: 7 additions & 10 deletions pages/features.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import React from 'react'
import styled from 'styled-components'

import FeaturesHero from '../src/FeaturesHero'
import Head from 'next/head'

import { container } from '../src/styles'
import { media } from '../src/styles'

import Page from '../src/Page'
import Hero from '../src/Hero'
import FeaturesHero from '../src/FeaturesHero'
import TrySection from '../src/TrySection'
import { META_BASE_TITLE } from '../src/consts'
import Page from '../src/Page'
import React from 'react'
import TrySection from '../src/TrySection'
import { container } from '../src/styles'
import { media } from '../src/styles'
import styled from 'styled-components'

const HeadInjector = () => (
<Head>
Expand Down
16 changes: 7 additions & 9 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import React from 'react'
import styled from 'styled-components'
import Diagram from '../src/Diagram'
import Head from 'next/head'

import LearnMore from '../src/LearnMore'

import Page from '../src/Page'
import Hero from '../src/Hero'
import LandingHero from '../src/LandingHero'
import Diagram from '../src/Diagram'
import LearnMore from '../src/LearnMore'
import { META_BASE_TITLE } from '../src/consts'
import Page from '../src/Page'
import PromoSection from '../src/PromoSection'
import UseCases from '../src/UseCases'
import React from 'react'
import Subscribe from '../src/Subscribe'
import { META_BASE_TITLE } from '../src/consts'
import UseCases from '../src/UseCases'
import styled from 'styled-components'

const HeadInjector = () => (
<Head>
Expand Down
18 changes: 8 additions & 10 deletions pages/support.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import React from 'react'
import styled from 'styled-components'
import { Mark } from '../src/styles'
import color from 'color'
import { OnlyDesktop, container, media } from '../src/styles'

import Head from 'next/head'

import { container, media, OnlyDesktop } from '../src/styles'

import Page from '../src/Page'
import Hero from '../src/Hero'
import TrySection from '../src/TrySection'
import Popover from '../src/Popover/Popover'
import { META_BASE_TITLE } from '../src/consts'
import { Mark } from '../src/styles'
import Page from '../src/Page'
import Popover from '../src/Popover/Popover'
import React from 'react'
import TrySection from '../src/TrySection'
import color from 'color'
import styled from 'styled-components'

const HeadInjector = () => (
<Head>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ storage requirements.

Hardlinks and symlinks are also available for optimized cache linking but,
(unlike reflinks) they carry the risk of accidentally corrupting the cache if
tacked data files are modified in the workspace.
tracked data files are modified in the workspace.

See [Large Dataset Optimization](/doc/user-guide/large-dataset-optimization) and
`dvc config cache` for more information.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ run the website.

To contribute documentation you need to know these locations:

- [Content](https://github.com/iterative/dvc.org/tree/master/static/docs)
(`/static/docs`):
[Markdown](https://guides.github.com/features/mastering-markdown/) files of
the different pages to render dynamically in the browser.
- [Images](https://github.com/iterative/dvc.org/tree/master/static/img)
- [Content](https://github.com/iterative/dvc.org/tree/master/public/static/docs)
(`/docs`): [Markdown](https://guides.github.com/features/mastering-markdown/)
files of the different pages to render dynamically in the browser.
- [Images](https://github.com/iterative/dvc.org/tree/master/public/static/img)
(`/static/img`): Add new images, gif, svg, etc here. Reference them from the
Markdown files like this: `![](/static/img/reproducibility.png)`.
- [Sections](https://github.com/iterative/dvc.org/tree/master/static/docs/sidebar.json)
- [Sections](https://github.com/iterative/dvc.org/tree/master/public/static/docs/sidebar.json)
(`.../sidebar.json`): Edit it to register a new section for the navigation
menu.

Expand Down Expand Up @@ -88,6 +87,25 @@ This will start the server on the default port, `3000`. Visit
enable the Git pre-commit hook that will be formatting your code and
documentation files automatically.

### Debugging

The `yarn dev:debug` script runs the local development server with Node's
[`--inspect` option](https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options)
in order for debuggers to connect to it (on the default port, 9229).

> For example, use this launch configuration in **Visual Studio Code**:
>
> ```json
> {
> "type": "node",
> "request": "launch",
> "name": "Launch via Yarn",
> "runtimeExecutable": "yarn",
> "runtimeArgs": ["dev:debug"],
> "port": 9229
> }
> ```
### Running tests
If you intend to change JavaScript (Node) files, test the changes with
Expand All @@ -112,7 +130,7 @@ pre-commit hook that is integrated when `yarn` installs the project dependencies
[its configuration](https://github.com/iterative/dvc.org/blob/master/.prettierrc)).
The formatting of staged files will automatically be done by a Git pre-commit
hook. You may also run `yarn format <file>` (format specific file/pattern),
`yarn format-staged` (all staged files), or `yarn format-all` (all md,js,jsx
`yarn format-staged` (all staged files), or `yarn format-all` (all .md, .js
files) before committing changes if needed.
([Advanced usage](https://prettier.io/docs/en/cli.html) of Prettier is
available through `yarn prettier ...`)
Expand All @@ -134,4 +152,4 @@ pre-commit hook that is integrated when `yarn` installs the project dependencies
> Check out the `.md` source code of any command reference to get a better idea,
> for example in
> [this very file](https://raw.githubusercontent.com/iterative/dvc.org/master/static/docs/user-guide/contributing/docs.md).
> [this very file](https://raw.githubusercontent.com/iterative/dvc.org/master/public/static/docs/user-guide/contributing/docs.md).
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ operation:
- `.dvc/cache`: The [cache directory](#structure-of-cache-directory) will store
your data. The data files and directories in <abbr>DVC repositories</abbr>
will only contain links to the data files in the cache. (Refer to
[Large Dataset Optimization](/docs/user-guide/large-dataset-optimization). See
[Large Dataset Optimization](/doc/user-guide/large-dataset-optimization). See
`dvc config cache` for related configuration options.

> Note that DVC includes the cache directory in `.gitignore` during
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 74f8a8d

Please sign in to comment.