Skip to content

Commit

Permalink
Updating READMEs and docs for unimodules and other related changes (e…
Browse files Browse the repository at this point in the history
…xpo#3558)

* Project lifecycle changes and some other cleanup

* A bunch of incremental improvements

* Make section groups and have them be collapsable

* Group API reference too

* Shuffle docs a bit for grouping

* Tweak styles

* Reorder a few things in fundamentals and fix AppAuth name

* Create a bare workflow group

* Add consistent sections for installation and api to sdk

* Remove expo-core from dependencies

* Add expo-module script for generating README

* Add some helpful links to footer

* Update website in unimodules to point to docs

* Update READMEs

* Backport docs changes and a few small changes

* Backport more docs from unversioned

* Fix broken links

* Fix some more links

* Move peerDependencies on unimodule packages to unimodulesPeerDependencies
Also move some direct dependencies on unimodule packages to
unimodulesPeerDependencies. This field is currently unused, but
peerDependencies does not work with transitive dependencies so users
will get a lot of warnings and they won't be particularly helpful. Version
changed to * for now because it's unused and I'm not sure everything is
up to date anyhow.

* Add note about scoping in expo-font

* Update unimodule packages to 3.0

* Add Hello World doc
  • Loading branch information
brentvatne authored Feb 27, 2019
1 parent 165f309 commit 8864b1c
Show file tree
Hide file tree
Showing 10,943 changed files with 7,350 additions and 15,685 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
106 changes: 53 additions & 53 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -232,63 +232,63 @@ dependencies {

/* UNCOMMENT WHEN DISTRIBUTING
api 'com.facebook.react:react-native:32.0.0'
api 'host.exp.exponent:expo-app-loader-provider:1.0.0'
api 'host.exp.exponent:expo-core:2.0.0'
api 'host.exp.exponent:expo-constants-interface:2.0.0'
api 'host.exp.exponent:expo-constants:2.0.0'
api 'host.exp.exponent:expo-document-picker:1.0.0'
api 'host.exp.exponent:expo-errors:1.0.0'
api 'host.exp.exponent:expo-file-system-interface:2.0.0'
api 'host.exp.exponent:expo-file-system:2.0.0'
api 'host.exp.exponent:expo-image-loader-interface:2.0.0'
api 'host.exp.exponent:expo-permissions:2.0.0'
api 'host.exp.exponent:expo-permissions-interface:2.0.0'
api 'host.exp.exponent:expo-sensors-interface:2.0.0'
api 'host.exp.exponent:expo-react-native-adapter:2.0.0'
api 'host.exp.exponent:expo-task-manager:1.0.0'
api 'host.exp.exponent:expo-task-manager-interface:1.0.0'
api 'host.exp.exponent:expo-app-loader-provider:3.0.0'
api 'host.exp.exponent:expo-core:3.0.1'
api 'host.exp.exponent:expo-constants-interface:3.0.0'
api 'host.exp.exponent:expo-constants:3.0.0'
api 'host.exp.exponent:expo-document-picker:3.0.0'
api 'host.exp.exponent:expo-errors:3.0.0'
api 'host.exp.exponent:expo-file-system-interface:3.0.1'
api 'host.exp.exponent:expo-file-system:3.0.1'
api 'host.exp.exponent:expo-image-loader-interface:3.0.0'
api 'host.exp.exponent:expo-permissions:3.0.0'
api 'host.exp.exponent:expo-permissions-interface:3.0.0'
api 'host.exp.exponent:expo-sensors-interface:3.0.0'
api 'host.exp.exponent:expo-react-native-adapter:3.0.1'
api 'host.exp.exponent:expo-task-manager:3.0.0'
api 'host.exp.exponent:expo-task-manager-interface:3.0.0'
// Optional universal modules, could be removed
// along with references in MainActivity
api 'host.exp.exponent:expo-ads-admob:2.0.0'
api 'host.exp.exponent:expo-ads-facebook:1.0.0'
api 'host.exp.exponent:expo-analytics-amplitude:1.0.0'
api 'host.exp.exponent:expo-app-auth:2.0.0'
api 'host.exp.exponent:expo-av:1.0.0'
api 'host.exp.exponent:expo-analytics-segment:2.0.0'
api 'host.exp.exponent:expo-barcode-scanner-interface:2.0.0'
api 'host.exp.exponent:expo-barcode-scanner:2.0.0'
api 'host.exp.exponent:expo-ads-admob:3.0.0'
api 'host.exp.exponent:expo-ads-facebook:3.0.0'
api 'host.exp.exponent:expo-analytics-amplitude:3.0.0'
api 'host.exp.exponent:expo-app-auth:3.0.0'
api 'host.exp.exponent:expo-av:3.0.0'
api 'host.exp.exponent:expo-analytics-segment:3.0.0'
api 'host.exp.exponent:expo-barcode-scanner-interface:3.0.0'
api 'host.exp.exponent:expo-barcode-scanner:3.0.0'
api 'host.exp.exponent:expo-blur:1.0.0'
api 'host.exp.exponent:expo-brightness:1.0.0'
api 'host.exp.exponent:expo-calendar:1.0.0'
api 'host.exp.exponent:expo-camera-interface:2.0.0'
api 'host.exp.exponent:expo-camera:2.0.0'
api 'host.exp.exponent:expo-contacts:2.0.0'
api 'host.exp.exponent:expo-facebook:1.0.0'
api 'host.exp.exponent:expo-face-detector:2.0.0'
api 'host.exp.exponent:expo-face-detector-interface:2.0.0'
api 'host.exp.exponent:expo-font:2.0.0'
api 'host.exp.exponent:expo-gl-cpp:2.0.0'
api 'host.exp.exponent:expo-gl:2.0.0'
api 'host.exp.exponent:expo-google-sign-in:2.0.0'
api 'host.exp.exponent:expo-haptics:1.0.0'
api 'host.exp.exponent:expo-image-manipulator:1.0.0'
api 'host.exp.exponent:expo-intent-launcher:1.0.0'
api 'host.exp.exponent:expo-local-authentication:2.0.0'
api 'host.exp.exponent:expo-localization:2.0.0'
api 'host.exp.exponent:expo-location:2.0.1'
api 'host.exp.exponent:expo-media-library:2.0.0'
api 'host.exp.exponent:expo-print:2.0.0'
api 'host.exp.exponent:expo-secure-store:1.0.0'
api 'host.exp.exponent:expo-sensors:2.0.0'
api 'host.exp.exponent:expo-sms:2.0.0'
api 'host.exp.exponent:expo-linear-gradient:1.0.0'
api 'host.exp.exponent:expo-keep-awake:1.0.0'
api 'host.exp.exponent:expo-background-fetch:1.0.0'
api 'host.exp.exponent:expo-mail-composer:1.0.0'
api 'host.exp.exponent:expo-speech:1.0.0'
api 'host.exp.exponent:expo-sqlite:1.0.0'
api 'host.exp.exponent:expo-web-browser:1.0.0'
api 'host.exp.exponent:expo-brightness:3.0.0'
api 'host.exp.exponent:expo-calendar:3.0.0'
api 'host.exp.exponent:expo-camera-interface:3.0.0'
api 'host.exp.exponent:expo-camera:3.0.0'
api 'host.exp.exponent:expo-contacts:3.0.0'
api 'host.exp.exponent:expo-facebook:3.0.0'
api 'host.exp.exponent:expo-face-detector:3.0.0'
api 'host.exp.exponent:expo-face-detector-interface:3.0.0'
api 'host.exp.exponent:expo-font:3.0.1'
api 'host.exp.exponent:expo-gl-cpp:3.0.0'
api 'host.exp.exponent:expo-gl:3.0.1'
api 'host.exp.exponent:expo-google-sign-in:3.0.0'
api 'host.exp.exponent:expo-haptics:3.0.0'
api 'host.exp.exponent:expo-image-manipulator:3.0.0'
api 'host.exp.exponent:expo-intent-launcher:3.0.0'
api 'host.exp.exponent:expo-local-authentication:3.0.0'
api 'host.exp.exponent:expo-localization:3.0.0'
api 'host.exp.exponent:expo-location:3.0.0'
api 'host.exp.exponent:expo-media-library:3.0.0'
api 'host.exp.exponent:expo-print:3.0.0'
api 'host.exp.exponent:expo-secure-store:3.0.0'
api 'host.exp.exponent:expo-sensors:3.0.1'
api 'host.exp.exponent:expo-sms:3.0.0'
api 'host.exp.exponent:expo-linear-gradient:3.0.0'
api 'host.exp.exponent:expo-keep-awake:3.0.0'
api 'host.exp.exponent:expo-background-fetch:3.0.0'
api 'host.exp.exponent:expo-mail-composer:3.0.0'
api 'host.exp.exponent:expo-speech:3.0.0'
api 'host.exp.exponent:expo-sqlite:3.0.0'
api 'host.exp.exponent:expo-web-browser:3.0.0'
END UNCOMMENT WHEN DISTRIBUTING */
}

Expand Down
114 changes: 57 additions & 57 deletions android/expoview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,65 +117,65 @@ dependencies {
// Current react native
/* UNCOMMENT WHEN DISTRIBUTING
api 'com.facebook.react:react-native:32.0.0'
api 'host.exp.exponent:expo-app-loader-provider:1.0.0'
api 'host.exp.exponent:expo-core:2.0.0'
api 'host.exp.exponent:expo-constants:2.0.0'
api 'host.exp.exponent:expo-constants-interface:2.0.0'
api 'host.exp.exponent:expo-document-picker:1.0.0'
api 'host.exp.exponent:expo-errors:1.0.0'
api 'host.exp.exponent:expo-file-system:2.0.0'
api 'host.exp.exponent:expo-file-system-interface:2.0.0'
api 'host.exp.exponent:expo-permissions:2.0.0'
api 'host.exp.exponent:expo-permissions-interface:2.0.0'
api 'host.exp.exponent:expo-react-native-adapter:2.0.0'
api 'host.exp.exponent:expo-secure-store:1.0.0'
api 'host.exp.exponent:expo-sensors-interface:2.0.0'
api 'host.exp.exponent:expo-task-manager:1.0.0'
api 'host.exp.exponent:expo-task-manager-interface:1.0.0'
api 'host.exp.exponent:expo-app-loader-provider:3.0.0'
api 'host.exp.exponent:expo-core:3.0.1'
api 'host.exp.exponent:expo-constants:3.0.0'
api 'host.exp.exponent:expo-constants-interface:3.0.0'
api 'host.exp.exponent:expo-document-picker:3.0.0'
api 'host.exp.exponent:expo-errors:3.0.0'
api 'host.exp.exponent:expo-file-system:3.0.1'
api 'host.exp.exponent:expo-file-system-interface:3.0.0'
api 'host.exp.exponent:expo-permissions:3.0.0'
api 'host.exp.exponent:expo-permissions-interface:3.0.0'
api 'host.exp.exponent:expo-react-native-adapter:3.0.0'
api 'host.exp.exponent:expo-secure-store:3.0.0'
api 'host.exp.exponent:expo-sensors-interface:3.0.0'
api 'host.exp.exponent:expo-task-manager:3.0.0'
api 'host.exp.exponent:expo-task-manager-interface:3.0.0'
// Optional universal modules
compileOnly 'host.exp.exponent:expo-ads-admob:2.0.0'
compileOnly 'host.exp.exponent:expo-ads-facebook:1.0.0'
compileOnly 'host.exp.exponent:expo-analytics-amplitude:1.0.0'
compileOnly 'host.exp.exponent:expo-analytics-segment:2.0.0'
compileOnly 'host.exp.exponent:expo-app-auth:2.0.0'
compileOnly 'host.exp.exponent:expo-av:1.0.0'
compileOnly 'host.exp.exponent:expo-background-fetch:1.0.0'
compileOnly 'host.exp.exponent:expo-barcode-scanner:2.0.0'
compileOnly 'host.exp.exponent:expo-barcode-scanner-interface:2.0.0'
compileOnly 'host.exp.exponent:expo-blur:1.0.0'
compileOnly 'host.exp.exponent:expo-brightness:1.0.0'
compileOnly 'host.exp.exponent:expo-calendar:1.0.0'
compileOnly 'host.exp.exponent:expo-camera:2.0.0'
compileOnly 'host.exp.exponent:expo-camera-interface:2.0.0'
compileOnly 'host.exp.exponent:expo-contacts:2.0.0'
compileOnly 'host.exp.exponent:expo-crypto:1.0.0'
compileOnly 'host.exp.exponent:expo-face-detector:2.0.0'
compileOnly 'host.exp.exponent:expo-facebook:1.0.0'
compileOnly 'host.exp.exponent:expo-font:2.0.0'
compileOnly 'host.exp.exponent:expo-gl:2.0.0'
compileOnly 'host.exp.exponent:expo-gl-cpp:2.0.0'
compileOnly 'host.exp.exponent:expo-google-sign-in:2.0.0'
compileOnly 'host.exp.exponent:expo-haptics:1.0.0'
compileOnly 'host.exp.exponent:expo-image-loader-interface:2.0.0'
compileOnly 'host.exp.exponent:expo-image-manipulator:1.0.0'
compileOnly 'host.exp.exponent:expo-image-picker:1.0.0'
compileOnly 'host.exp.exponent:expo-intent-launcher:1.0.0'
compileOnly 'host.exp.exponent:expo-keep-awake:1.0.0'
compileOnly 'host.exp.exponent:expo-linear-gradient:1.0.0'
compileOnly 'host.exp.exponent:expo-local-authentication:2.0.0'
compileOnly 'host.exp.exponent:expo-localization:2.0.0'
compileOnly 'host.exp.exponent:expo-location:2.0.1'
compileOnly 'host.exp.exponent:expo-mail-composer:1.0.0'
compileOnly 'host.exp.exponent:expo-media-library:2.0.0'
compileOnly 'host.exp.exponent:expo-payments-stripe:2.0.0'
compileOnly 'host.exp.exponent:expo-print:2.0.0'
compileOnly 'host.exp.exponent:expo-random:1.0.0'
compileOnly 'host.exp.exponent:expo-sensors:2.0.0'
compileOnly 'host.exp.exponent:expo-sms:2.0.0'
compileOnly 'host.exp.exponent:expo-speech:1.0.0'
compileOnly 'host.exp.exponent:expo-sqlite:1.0.0'
compileOnly 'host.exp.exponent:expo-web-browser:1.0.0'
compileOnly 'host.exp.exponent:expo-ads-admob:3.0.0'
compileOnly 'host.exp.exponent:expo-ads-facebook:3.0.0'
compileOnly 'host.exp.exponent:expo-analytics-amplitude:3.0.0'
compileOnly 'host.exp.exponent:expo-analytics-segment:3.0.0'
compileOnly 'host.exp.exponent:expo-app-auth:3.0.0'
compileOnly 'host.exp.exponent:expo-av:3.0.0'
compileOnly 'host.exp.exponent:expo-background-fetch:3.0.0'
compileOnly 'host.exp.exponent:expo-barcode-scanner:3.0.0'
compileOnly 'host.exp.exponent:expo-barcode-scanner-interface:3.0.0'
compileOnly 'host.exp.exponent:expo-blur:3.0.0'
compileOnly 'host.exp.exponent:expo-brightness:3.0.0'
compileOnly 'host.exp.exponent:expo-calendar:3.0.0'
compileOnly 'host.exp.exponent:expo-camera:3.0.0'
compileOnly 'host.exp.exponent:expo-camera-interface:3.0.0'
compileOnly 'host.exp.exponent:expo-contacts:3.0.0'
compileOnly 'host.exp.exponent:expo-crypto:3.0.0'
compileOnly 'host.exp.exponent:expo-face-detector:3.0.0'
compileOnly 'host.exp.exponent:expo-facebook:3.0.0'
compileOnly 'host.exp.exponent:expo-font:3.0.1'
compileOnly 'host.exp.exponent:expo-gl:3.0.1'
compileOnly 'host.exp.exponent:expo-gl-cpp:3.0.0'
compileOnly 'host.exp.exponent:expo-google-sign-in:3.0.0'
compileOnly 'host.exp.exponent:expo-haptics:3.0.0'
compileOnly 'host.exp.exponent:expo-image-loader-interface:3.0.0'
compileOnly 'host.exp.exponent:expo-image-manipulator:3.0.0'
compileOnly 'host.exp.exponent:expo-image-picker:3.0.0'
compileOnly 'host.exp.exponent:expo-intent-launcher:3.0.0'
compileOnly 'host.exp.exponent:expo-keep-awake:3.0.0'
compileOnly 'host.exp.exponent:expo-linear-gradient:3.0.0'
compileOnly 'host.exp.exponent:expo-local-authentication:3.0.0'
compileOnly 'host.exp.exponent:expo-localization:3.0.0'
compileOnly 'host.exp.exponent:expo-location:3.0.0'
compileOnly 'host.exp.exponent:expo-mail-composer:3.0.0'
compileOnly 'host.exp.exponent:expo-media-library:3.0.0'
compileOnly 'host.exp.exponent:expo-payments-stripe:3.0.0'
compileOnly 'host.exp.exponent:expo-print:3.0.0'
compileOnly 'host.exp.exponent:expo-random:3.0.0'
compileOnly 'host.exp.exponent:expo-sensors:3.0.1'
compileOnly 'host.exp.exponent:expo-sms:3.0.0'
compileOnly 'host.exp.exponent:expo-speech:3.0.0'
compileOnly 'host.exp.exponent:expo-sqlite:3.0.0'
compileOnly 'host.exp.exponent:expo-web-browser:3.0.0'
END UNCOMMENT WHEN DISTRIBUTING */

// WHEN_DISTRIBUTING_REMOVE_FROM_HERE
Expand Down
14 changes: 6 additions & 8 deletions docs/common/navigation-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ const fs = require('fs-extra');
const DIR_MAPPING = {
introduction: 'Introduction',
guides: 'Guides',
'managed-workflow': 'Managed Workflow',
'bare': 'Essentials',
tutorials: 'Tutorials',
sdk: 'SDK API Reference',
sdk: 'Expo SDK',
'react-native': 'React Native',
// "react-native-apis": 'React Native APIs',
// 'react-native-components': 'React Native Components',
// 'react-native-guides': 'React Native Guides',
// 'react-native-basics': 'React Native Basics',
workflow: 'Working with Expo',
workflow: 'Fundamentals',
distribution: 'Distributing Your App',
expokit: 'ExpoKit',
};
Expand All @@ -36,14 +38,10 @@ const generateNavLinks = (path_, arr) => {
// Make sure to add '/' at the end of index pages so that relative links in the markdown work correctly
let href = fs.existsSync(path.join(filePath, 'index.md')) ? processUrl(filePath) + '/' : '';

// 'Introduction' section has a 'Quick Start' page that's actually at the root i.e. `/versions/v25.0/`, etc.
// 'Introduction' section has a 'Getting to know Expo' page that's actually at the root i.e. `/versions/v25.0/`, etc.
if (name === 'introduction') {
// TODO: find what's eating the final slash
initArr.push({ name: 'Quick Start', href: path.parse(href).dir + '//' });
}
// 'SDK' section has a 'Introduction' page that's the same as the index page
if (name === 'sdk') {
initArr.push({ name: 'Introduction', href });
initArr.push({ name: 'Getting to know Expo', href: path.parse(href).dir + '//' });
}

arr.push({
Expand Down
44 changes: 41 additions & 3 deletions docs/common/navigation.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const {
ROOT,
GROUPS,
INTRODUCTION,
WORKING_WITH_EXPO,
FUNDAMENTALS,
GUIDES,
DISTRIBUTION,
EXPOKIT,
Expand All @@ -28,7 +29,7 @@ const sections = [
{ name: 'Guides', reference: GUIDES },
{ name: 'Distributing Your App', reference: DISTRIBUTION },
{ name: 'ExpoKit', reference: EXPOKIT },
{ name: 'Working with Expo', reference: WORKING_WITH_EXPO },
{ name: 'Fundamentals', reference: FUNDAMENTALS },
{ name: 'React Native', reference: REACT_NATIVE },
// { name: 'React Native Basics', reference: REACT_NATIVE_BASICS, },
// { name: 'React Native Guides', reference: REACT_NATIVE_GUIDES, },
Expand All @@ -51,9 +52,46 @@ const sortNav = nav => {
return nav;
};

// Yikes, this groups together multiple sections under one heading
const groupNav = nav => {
let sections = [];
let groupIndex = {};
nav.forEach(section => {
if (section.name === 'Expo SDK') {
let overview;
section.posts.forEach(post => {
if (post.name === 'Overview') {
overview = post;
}
});
if (overview) {
section.posts.splice(section.posts.indexOf(overview), 1);
section.posts.unshift(overview);
}
}
let group = GROUPS[section.name];
if (group) {
let existingGroupIndex = groupIndex[group];
if (existingGroupIndex) {
sections[existingGroupIndex].children.push(section);
} else {
groupIndex[group] = sections.length;
sections.push({
name: group,
children: [section],
});
}
} else {
sections.push(section);
}
});

return sections;
};

const sortedNavigation = Object.assign(
...Object.entries(navigation).map(([version, versionNavigation]) => ({
[version]: sortNav(versionNavigation),
[version]: groupNav(sortNav(versionNavigation)),
}))
);

Expand Down
Loading

0 comments on commit 8864b1c

Please sign in to comment.