diff --git a/.artifacts.yml b/.artifacts.yml deleted file mode 100644 index 200f219bbb..0000000000 --- a/.artifacts.yml +++ /dev/null @@ -1,3 +0,0 @@ -version: v1 -defaults: - - publisher diff --git a/.publisher.yml b/.publisher.yml deleted file mode 100644 index 0a5cede361..0000000000 --- a/.publisher.yml +++ /dev/null @@ -1 +0,0 @@ -subdomain: docs diff --git a/batfish.config.js b/batfish.config.js deleted file mode 100644 index 40fa62c24b..0000000000 --- a/batfish.config.js +++ /dev/null @@ -1,89 +0,0 @@ -const webpack = require('webpack'); -const mapboxAssembly = require('@mapbox/mbx-assembly'); -const path = require('path'); - -module.exports = () => { - const config = { - siteBasePath: '/mapbox-gl-js', - siteOrigin: 'https://docs.mapbox.com', - pagesDirectory: `${__dirname}/docs/pages`, - outputDirectory: path.join(__dirname, '_site'), - browserslist: mapboxAssembly.browsersList, - postcssPlugins: mapboxAssembly.postcssPipeline.plugins, - stylesheets: [ - require.resolve('@mapbox/mbx-assembly/dist/assembly.css'), - require.resolve('@mapbox/dr-ui/css/docs-prose.css'), - `${__dirname}/docs/components/site.css`, - require.resolve('@mapbox/dr-ui/css/prism.css'), - `${__dirname}/vendor/docs-page-shell/page-shell-styles.css` - ], - applicationWrapperPath: `${__dirname}/docs/components/application-wrapper.js`, - webpackLoaders: [ - // Use raw loader to get the HTML string contents of examples - { - test: /\.html$/, - use: 'raw-loader' - } - ], - ignoreWithinPagesDirectory: ['example/*.html'], - webpackPlugins: [ - // Make environment variables available within JS that Webpack compiles. - new webpack.DefinePlugin({ - // DEPLOY_ENV is used in config to pick between local/production. - 'process.env.DEPLOY_ENV': `"${process.env.DEPLOY_ENV}"` - }) - ], - inlineJs: [ - { - filename: `${__dirname}/vendor/docs-page-shell/page-shell-script.js` - } - ], - jsxtremeMarkdownOptions: { - wrapper: path.join(__dirname, './docs/components/markdown-page-shell.js'), - rehypePlugins: [ - require('@mapbox/dr-ui/plugins/add-links-to-headings'), - require('@mapbox/dr-ui/plugins/make-table-scroll') - ] - }, - dataSelectors: { - examples: ({pages}) => { - return pages - .filter(({path, frontMatter}) => /\/example\//.test(path) && frontMatter.tags) - .map(example => { - return { - path: example.path, - title: example.frontMatter.title, - description: example.frontMatter.description, - tags: example.frontMatter.tags, - pathname: example.frontMatter.pathname - }; - }); - }, - listSubfolders: data => { - const folders = data.pages - .filter(file => { - return file.path.split('/').length === 4; - }) - .map(folder => { - return folder; - }); - return folders; - } - }, - devBrowserslist: false, - babelInclude: [ - 'documentation', - 'debounce-fn', - 'mimic-fn' - ] - }; - - // Local builds treat the `dist` directory as static assets, allowing you to test examples against the - // local branch build. Non-local builds ignore the `dist` directory, and examples load assets from the CDN. - config.unprocessedPageFiles = ['**/dist/**/*.*']; - if (process.env.DEPLOY_ENV !== 'local') { - config.ignoreWithinPagesDirectory.push('**/dist/**/*.*'); - } - - return config; -}; diff --git a/docs/.eslintrc b/docs/.eslintrc deleted file mode 100644 index fdbdf88151..0000000000 --- a/docs/.eslintrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parserOptions": { - "ecmaFeatures": { - "jsx": true - } - }, - "plugins": [ - "react" - ], - "rules": { - "flowtype/require-valid-file-annotation": [0], - "new-cap": "off", - "react/jsx-uses-vars": [2] - }, - "env": { - "browser": true - }, - "globals": { - "analytics": false, - "MapboxPageShell": false - } -} diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index a85f621ba5..0000000000 --- a/docs/README.md +++ /dev/null @@ -1,65 +0,0 @@ -Mapbox GL JS has [API documentation](#writing-api-documentation) and [examples](#writing-examples). - -## Writing API Documentation - -API documentation is written as [JSDoc comments](http://usejsdoc.org/) and processed with [documentationjs](http://documentation.js.org/). - -* Classes, methods, events, and anything else in the public interface must be documented with JSDoc comments. Everything outside of the public interface may be documented and must be tagged as `@private`. -* Text within JSDoc comments may use markdown formatting. Code identifiers must be surrounded by \`backticks\`. -* Documentation must be written in grammatically correct sentences ending with periods. -* Documentation must specify measurement units when applicable. -* Documentation descriptions must contain more information than what is obvious from the identifier and JSDoc metadata. -* Class descriptions should describe what the class *is*, or what its instances *are*. They do not document the constructor, but the class. They should begin with either a complete sentence or a phrase that would complete a sentence beginning with "A `T` is..." or "The `T` class is..." Examples: "Lists are ordered indexed dense collections." "A class used for asynchronous computations." -* Function descriptions should begin with a third person singular present tense verb, as if completing a sentence beginning with "This function..." If the primary purpose of the function is to return a value, the description should begin with "Returns..." Examples: "Returns the layer with the specified id." "Sets the map's center point." -* `@param`, `@property`, and `@returns` descriptions should be capitalized and end with a period. They should begin as if completing a sentence beginning with "This is..." or "This..." -* Functions that do not return a value (return `undefined`), should not have a `@returns` annotation. -* Member descriptions should document what a member represents or gets and sets. They should also indicate whether the member is read-only. -* Event descriptions should begin with "Fired when..." and so should describe when the event fires. Event entries should clearly document any data passed to the handler, with a link to MDN documentation of native Event objects when applicable. - -## Writing Examples - -Examples are written as [Batfish](https://github.com/mapbox/batfish) pages in `docs/pages/example`. Each example requires two files: an `.html` file containing the source -code for the example, and a `.js` file containing example boilerplate and front matter. The front matter should include the following items: - -* `title`: A short title for the example in **sentence case** as a **verb phrase** -* `description`: A one sentence description of the example -* `tags`: An array of tags for the example, which determine the sections it is listed in in the sidebar navigation, see `docs/data/tags.js` for a list of tags -* `pathname`: The relative path of the example, including leading `/mapbox-gl-js/example/` path - -In the `.html` file, write the HTML and JavaScript constituting the example. - -* Use **4 space indentation**. Exception: do not add an initial level of indentation to code within ` - - - -
- -${snippet} - -