diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000000..5592767af6f
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,4 @@
+{
+ "editor.tabSize": 2,
+ "editor.detectIndentation": false
+}
\ No newline at end of file
diff --git a/examples/ProguardExample/.gradle/5.6.1/fileChanges/last-build.bin b/examples/ProguardExample/.gradle/5.6.1/fileChanges/last-build.bin
new file mode 100644
index 00000000000..f76dd238ade
Binary files /dev/null and b/examples/ProguardExample/.gradle/5.6.1/fileChanges/last-build.bin differ
diff --git a/examples/ProguardExample/.gradle/5.6.1/fileHashes/fileHashes.lock b/examples/ProguardExample/.gradle/5.6.1/fileHashes/fileHashes.lock
new file mode 100644
index 00000000000..5bb6ee5537c
Binary files /dev/null and b/examples/ProguardExample/.gradle/5.6.1/fileHashes/fileHashes.lock differ
diff --git a/examples/ProguardExample/.gradle/5.6.1/gc.properties b/examples/ProguardExample/.gradle/5.6.1/gc.properties
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/examples/ProguardExample/app/.project b/examples/ProguardExample/app/.project
new file mode 100644
index 00000000000..5cbae9d7e85
--- /dev/null
+++ b/examples/ProguardExample/app/.project
@@ -0,0 +1,17 @@
+
+
+ app_
+ Project app_ created by Buildship.
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectbuilder
+
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectnature
+
+
diff --git a/examples/ProguardExample/app/.settings/org.eclipse.buildship.core.prefs b/examples/ProguardExample/app/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 00000000000..7a23d112fd0
--- /dev/null
+++ b/examples/ProguardExample/app/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,13 @@
+arguments=
+auto.sync=false
+build.scans.enabled=false
+connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(5.6.1))
+connection.project.dir=
+eclipse.preferences.version=1
+gradle.user.home=
+java.home=
+jvm.arguments=
+offline.mode=false
+override.workspace.settings=true
+show.console.view=true
+show.executions.view=true
diff --git a/examples/Synth/.gradle/5.6.1/fileChanges/last-build.bin b/examples/Synth/.gradle/5.6.1/fileChanges/last-build.bin
new file mode 100644
index 00000000000..f76dd238ade
Binary files /dev/null and b/examples/Synth/.gradle/5.6.1/fileChanges/last-build.bin differ
diff --git a/examples/Synth/.gradle/5.6.1/fileHashes/fileHashes.lock b/examples/Synth/.gradle/5.6.1/fileHashes/fileHashes.lock
new file mode 100644
index 00000000000..dad8628488c
Binary files /dev/null and b/examples/Synth/.gradle/5.6.1/fileHashes/fileHashes.lock differ
diff --git a/examples/Synth/.gradle/5.6.1/gc.properties b/examples/Synth/.gradle/5.6.1/gc.properties
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/examples/Synth/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/examples/Synth/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 00000000000..cd7613cca1c
Binary files /dev/null and b/examples/Synth/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/examples/Synth/.gradle/buildOutputCleanup/cache.properties b/examples/Synth/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 00000000000..b6dbcac039f
--- /dev/null
+++ b/examples/Synth/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Sat Oct 26 20:11:40 IST 2019
+gradle.version=5.6.1
diff --git a/examples/Synth/.gradle/vcs-1/gc.properties b/examples/Synth/.gradle/vcs-1/gc.properties
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/examples/Synth/.project b/examples/Synth/.project
new file mode 100644
index 00000000000..f54bbf37bde
--- /dev/null
+++ b/examples/Synth/.project
@@ -0,0 +1,17 @@
+
+
+ Synth
+ Project Synth created by Buildship.
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectbuilder
+
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectnature
+
+
diff --git a/examples/Synth/.settings/org.eclipse.buildship.core.prefs b/examples/Synth/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 00000000000..7a23d112fd0
--- /dev/null
+++ b/examples/Synth/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,13 @@
+arguments=
+auto.sync=false
+build.scans.enabled=false
+connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(5.6.1))
+connection.project.dir=
+eclipse.preferences.version=1
+gradle.user.home=
+java.home=
+jvm.arguments=
+offline.mode=false
+override.workspace.settings=true
+show.console.view=true
+show.executions.view=true
diff --git a/website/.gitignore b/website/.gitignore
new file mode 100644
index 00000000000..df5cb509b34
--- /dev/null
+++ b/website/.gitignore
@@ -0,0 +1,16 @@
+# dependencies
+/node_modules
+# production
+/build
+# generated files
+.docusaurus
+.cache-loader
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
\ No newline at end of file
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
new file mode 100644
index 00000000000..fe635c8ef99
--- /dev/null
+++ b/website/docusaurus.config.js
@@ -0,0 +1,108 @@
+/**
+ * Copyright (c) 2017-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+// site configuration options.
+
+const siteConfig = {
+ title: "Redex", // Title for your website.
+ tagline: "An Android Bytecode Optimizer",
+ url: "https://fbredex.com",
+ baseUrl: "/",
+
+ // Used for publishing and more
+ organizationName: "facebook",
+ projectName: "redex",
+
+ favicon: "img/favicon.png",
+ // You may provide arbitrary config keys to be used as needed by your
+ // template. For example, if you need your repo's URL...
+ // repoUrl: "https://github.com/facebook/redex",
+ presets: [
+ [
+ "@docusaurus/preset-classic",
+ {
+ docs: {
+ // docs folder path relative to website dir.
+ path: "../docs",
+ // sidebars file relative to website dir.
+ sidebarPath: require.resolve("./sidebars.json"),
+ // Equivalent to `enableUpdateBy`.
+ showLastUpdateAuthor: true,
+ // Equivalent to `enableUpdateTime`.
+ showLastUpdateTime: true
+ },
+ theme: {
+ customCss: require.resolve("./src/css/custom.css")
+ }
+ }
+ ]
+ ],
+ themeConfig: {
+ navbar: {
+ title: "Redex",
+ logo: {
+ alt: "Redex Logo",
+ src: "img/favicon.png"
+ },
+ links: [
+ { to: "docs/installation", label: "Docs", position: "right" },
+ { to: "docs/faq", label: "FAQ", position: "right" },
+ // {to: 'blog', label: 'Blog'}, // put back when we create a blog folder and add our first blog
+ {
+ href:
+ "https://code.facebook.com/posts/1480969635539475/optimizing-android-bytecode-with-redex",
+ label: "Birth",
+ position: "right"
+ }
+ ]
+ },
+ footer: {
+ style: "dark",
+ logo: {
+ alt: "Facebook Open Source Logo",
+ src: "img/oss_logo.png"
+ },
+ links: [
+ {
+ title: "Docs",
+ items: [
+ {
+ label: "Getting Started",
+ to: "docs/installation"
+ },
+ {
+ label: "Configuring",
+ to: "docs/configuring"
+ },
+ {
+ label: "Using",
+ to: "docs/usage"
+ },
+ {
+ label: "FAQ",
+ to: "docs/faq"
+ }
+ ]
+ },
+ {
+ title: "Social",
+ items: [
+ {
+ label: "Github",
+ href: "https://github.com/facebook/redex"
+ }
+ ]
+ }
+ ],
+ // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds.
+ copyright: `Copyright © ${new Date().getFullYear()} Facebook Inc.`
+ },
+ image: "img/og_image.png"
+ }
+};
+
+module.exports = siteConfig;
diff --git a/website/package.json b/website/package.json
index 7d66debef68..eeb28e2682d 100644
--- a/website/package.json
+++ b/website/package.json
@@ -1,14 +1,15 @@
{
"scripts": {
- "examples": "docusaurus-examples",
- "start": "docusaurus-start",
- "build": "docusaurus-build",
- "publish-gh-pages": "docusaurus-publish",
- "write-translations": "docusaurus-write-translations",
- "version": "docusaurus-version",
- "rename-version": "docusaurus-rename-version"
+ "start": "docusaurus start",
+ "build": "docusaurus build",
+ "swizzle": "docusaurus swizzle",
+ "deploy": "docusaurus deploy"
},
"devDependencies": {
- "docusaurus": "^1.7.2"
+ "@docusaurus/core": "^2.0.0-alpha.34",
+ "@docusaurus/preset-classic": "^2.0.0-alpha.34",
+ "classnames": "^2.2.6",
+ "react": "^16.8.4",
+ "react-dom": "^16.8.4"
}
}
diff --git a/website/src/css/custom.css b/website/src/css/custom.css
new file mode 100644
index 00000000000..a2b42f5769f
--- /dev/null
+++ b/website/src/css/custom.css
@@ -0,0 +1,21 @@
+/**
+ * /src/css/custom.css
+ * You can override the default Infima variables here.
+ * Note: this is not a complete list of --ifm- variables.
+ */
+:root {
+ --ifm-color-primary: #75c7a4;
+ --ifm-color-primary-dark: rgb(105, 173, 147);
+ --ifm-color-primary-darker: rgb(99, 163, 139);
+ --ifm-color-primary-darkest: rgb(82, 134, 115);
+ --ifm-color-primary-light: rgb(138, 201, 178);
+ --ifm-color-primary-lighter: rgb(158, 211, 191);
+ --ifm-color-primary-lightest: rgb(186, 224, 210);
+ --ifm-color-secondary: #f9f9f9;
+ --ifm-color-primary-dark: rgb(216, 216, 216);
+ --ifm-color-primary-darker: rgb(204, 204, 204);
+ --ifm-color-primary-darkest: rgb(168, 168, 168);
+ --ifm-color-primary-light: rgb(242, 242, 242);
+ --ifm-color-primary-lighter: rgb(245, 245, 245);
+ --ifm-color-primary-lightest: rgb(248, 248, 248);
+}
diff --git a/website/src/pages/faq.js b/website/src/pages/faq.js
new file mode 100644
index 00000000000..8bd9cf9acd1
--- /dev/null
+++ b/website/src/pages/faq.js
@@ -0,0 +1,66 @@
+/**
+ * Copyright (c) 2017-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import React from "react";
+import Layout from "@theme/Layout";
+import withBaseUrl from "@docusaurus/withBaseUrl";
+import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
+import Link from "@docusaurus/Link";
+
+function Help(props) {
+ const context = useDocusaurusContext();
+ const { siteConfig = {} } = context;
+ const supportLinks = [
+ {
+ content: "Ask questions about the documentation and project",
+ title: "Join the community"
+ },
+ {
+ content: "Find out what's new with this project",
+ title: "Stay up to date"
+ }
+ ];
+ return (
+
+
+
+
+
+
This project is maintained by a dedicated group of people.
+
+
+ {supportLinks && supportLinks.length && (
+
+
+
+
Browse Docs
+
+ Learn more using the{" "}
+
+ documentation on this site.
+
+
+
+ {supportLinks.map((link, index) => (
+
+
{link.title}
+
{link.content}
+
+ ))}
+
+
+ )}
+
+
+
+
+ );
+}
+
+export default Help;
diff --git a/website/src/pages/index.js b/website/src/pages/index.js
new file mode 100644
index 00000000000..efaa8bc3a19
--- /dev/null
+++ b/website/src/pages/index.js
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) 2017-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import React from "react";
+import Layout from "@theme/Layout";
+import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
+import withBaseUrl from "@docusaurus/withBaseUrl";
+import Link from "@docusaurus/Link";
+import styles from "./styles.module.css";
+
+const features = [
+ {
+ title: "Optimizing",
+ content:
+ "Redex provides a framework for reading, writing, and analyzing .dex files, and a set of optimization passes that use this framework to improve the bytecode. An APK optimized by Redex should be smaller and faster."
+ },
+ {
+ title: "Fast",
+ content:
+ "Fewer bytes also means faster download times, faster install times, and lower data usage for cell users. Lastly, less bytecode also typically translates into faster runtime performance."
+ },
+ {
+ title: "Buck Integration",
+ content:
+ "Redex has deep integration with Buck where your Redex config is passed as a parameter to the Buck android_binary rule when generating the APK."
+ }
+];
+
+const Logo = props => (
+
+
+
+);
+
+function Index(props) {
+ const context = useDocusaurusContext();
+ const { siteConfig = {} } = context;
+ return (
+
+
+
+
+
+
+
{siteConfig.title}
+
{siteConfig.tagline}
+
+
+ GETTING STARTED
+
+
+ GITHUB
+
+
+
+
+
+
+
+
+ {features && features.length && (
+
+
+
+ {features.map(({ imageUrl, title, content }, idx) => (
+
+ {imageUrl && (
+
+
+
+ )}
+
{title}
+
{content}
+
+ ))}
+
+
+
+ )}
+
+
+
+ );
+}
+
+export default Index;
diff --git a/website/src/pages/styles.module.css b/website/src/pages/styles.module.css
new file mode 100644
index 00000000000..5477b475801
--- /dev/null
+++ b/website/src/pages/styles.module.css
@@ -0,0 +1,45 @@
+.features {
+ display: flex;
+ align-items: center;
+ padding: 2rem 0;
+ width: 100%;
+}
+
+.featureImage {
+ height: 180px;
+ width: 180px;
+}
+
+.buttons {
+ display: flex;
+ justify-content: center;
+}
+
+.projectLogo {
+ display: none;
+ pointer-events: none;
+}
+
+.projectLogo img {
+ height: 100px;
+ margin-bottom: 0px;
+}
+
+@media only screen and (min-width: 1200px) {
+ .projectLogo {
+ align-items: center;
+ bottom: 0;
+ display: flex;
+ justify-content: flex-end;
+ left: 0;
+ padding: 2em 200px 12em;
+ position: absolute;
+ right: 0;
+ top: 0;
+ border: "1px solid blue";
+ }
+ .projectLogo img {
+ height: 100%;
+ max-height: 250px;
+ }
+}
diff --git a/website/static/CNAME b/website/static/CNAME
new file mode 100644
index 00000000000..781accc283b
--- /dev/null
+++ b/website/static/CNAME
@@ -0,0 +1 @@
+fbredex.com
\ No newline at end of file
diff --git a/website/static/css/custom.css b/website/static/css/custom.css
index b9363b474a9..e0f5692beaa 100644
--- a/website/static/css/custom.css
+++ b/website/static/css/custom.css
@@ -7,46 +7,6 @@
/* your custom css */
-@font-face {
- font-family: 'Lato';
- src: url('/fonts/LatoLatin-Italic.woff2') format('woff2'),
- url('/fonts/LatoLatin-Italic.woff') format('woff');
- font-weight: normal;
- font-style: italic;
-}
-
-@font-face {
- font-family: 'Lato';
- src: url('/fonts/LatoLatin-Black.woff2') format('woff2'),
- url('/fonts/LatoLatin-Black.woff') format('woff');
- font-weight: 900;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Lato';
- src: url('/fonts/LatoLatin-BlackItalic.woff2') format('woff2'),
- url('/fonts/LatoLatin-BlackItalic.woff') format('woff');
- font-weight: 900;
- font-style: italic;
-}
-
-@font-face {
- font-family: 'Lato';
- src: url('/fonts/LatoLatin-Light.woff2') format('woff2'),
- url('/fonts/LatoLatin-Light.woff') format('woff');
- font-weight: 300;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Lato';
- src: url('/fonts/LatoLatin-Regular.woff2') format('woff2'),
- url('/fonts/LatoLatin-Regular.woff') format('woff');
- font-weight: normal;
- font-style: normal;
-}
-
.homeContainer {
background: $primaryColor;
}
@@ -73,10 +33,6 @@
color: $primaryColor;
}
-body {
- font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
-}
-
.navigationSlider .slidingNav ul {
color: $primaryColor;
}