Migrating examples to the example repo (#409)

* Migrating examples to the example repo

* update smoke test github action to example repo

* unclear what the path should be

* lock file moved

* remove ls

* x64?

darn conflicts

* missed cache path

* cargo build step isn't needed

Co-authored-by: Jacob Bolda <me@jacobbolda.com>
This commit is contained in:
Ty Tracey 2020-02-16 16:28:37 -05:00 committed by GitHub
parent 7c786d2fee
commit 43f32edc01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
312 changed files with 28 additions and 73269 deletions

View File

@ -1,9 +1,16 @@
name: build smoke tests with source
on: pull_request
on:
push:
branches:
- dev
pull_request:
paths:
- '**/package.json'
- '**/Cargo.toml'
jobs:
via-source:
node:
runs-on: ${{ matrix.platform }}
timeout-minutes: 40
@ -45,7 +52,14 @@ jobs:
ext: .x64.msi
steps:
- uses: actions/checkout@v2
- name: checkout tauri
uses: actions/checkout@v2
- name: checkout examples
uses: actions/checkout@v2
with:
repository: tauri-apps/examples
ref: master
path: examples
- name: install rust stable
uses: actions-rs/toolchain@v1
with:
@ -71,36 +85,27 @@ jobs:
with:
path: ${{ format('{0}/registry/cache/', matrix.CARGO_HOME) }}
key: ${{ runner.OS }}-build-reg-cache-${{ hashFiles('**/Cargo.toml') }}-
- name: build rust
run: cargo build
env:
TAURI_DIST_DIR: ../../test/fixture/dist
TAURI_DIR: ../test/fixture/src-tauri
- run: cargo install --path ./cli/tauri-bundler --force
- name: install cli deps via yarn
run: |
cd ./cli/tauri.js
yarn
working-directory: ./cli/tauri.js
run: yarn
- name: cache node modules
uses: actions/cache@v1
with:
path: ${{ format('examples/{0}/node_modules', matrix.example.folder) }}
key: ${{ runner.OS }}-build-${{ hashFiles(format('examples/{0}/yarn.lock', matrix.example.folder)) }}
path: ${{ format('examples/node/{0}/node_modules', matrix.example.folder) }}
key: ${{ runner.OS }}-build-${{ hashFiles(format('examples/node/{0}/yarn.lock', matrix.example.folder)) }}
restore-keys: ${{ runner.OS }}-build-${{ env.cache-name }}-
- name: install via yarn
run: |
cd ./examples/${{ matrix.example.folder }}
yarn
working-directory: ./examples/node/${{ matrix.example.folder }}
run: yarn
- name: build example
run: |
cd ./examples/${{ matrix.example.folder }}
yarn build
working-directory: ./examples/node/${{ matrix.example.folder }}
run: yarn build
- name: yarn tauri build
run: |
cd ./examples/${{ matrix.example.folder }}
yarn tauri:source:build
working-directory: ./examples/node/${{ matrix.example.folder }}
run: yarn tauri:source:build
- uses: actions/upload-artifact@v1
if: success()
with:
name: ${{ matrix.example.name }}(${{ matrix.platform }})
path: ${{ format('./examples/{0}/src-tauri/{1}/{2}{3}', matrix.example.folder, matrix.releaseFolder, matrix.example.executable, matrix.ext ) }}
path: ${{ format('./examples/node/{0}/src-tauri/{1}/{2}{3}', matrix.example.folder, matrix.releaseFolder, matrix.example.executable, matrix.ext ) }}

2
examples/.gitignore vendored
View File

@ -1,2 +0,0 @@
# compiling on windows donwloads WixTools to src-tauri
**/src-tauri/WixTools/

View File

@ -1,23 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View File

@ -1,95 +0,0 @@
## Running Example
Ensure you have setup and installed all the project dependencies.
```
npm install -g tauri
git clone https://github.com/tauri-apps/tauri
cd examples/react/create-react-app
yarn
cargo install tauri-bundler
```
### Development
```
yarn start & tauri dev
```
### Production
```
yarn build
tauri build
```
# Original ReadMe
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `yarn start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `yarn test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `yarn build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `yarn eject`
**Note: this is a one-way operation. Once you `eject`, you cant go back!**
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `yarn build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

View File

@ -1,9 +0,0 @@
module.exports = {
webpack: {
configure: (config) => {
config.output.publicPath = ''
return config
}
}
}

View File

@ -1,44 +0,0 @@
{
"name": "create-react-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "5.1.1",
"@testing-library/react": "9.4.0",
"@testing-library/user-event": "8.1.0",
"react": "16.12.0",
"react-dom": "16.12.0",
"react-scripts": "3.3.1"
},
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"tauri:prod": "tauri",
"tauri:source": "node ../../../cli/tauri.js/bin/tauri",
"tauri:source:init": "yarn tauri:source init --tauriPath ../../../tauri",
"tauri:prod:init": "yarn tauri:prod init",
"tauri:source:dev": "yarn tauri:source dev",
"tauri:prod:dev": "yarn tauri:prod dev",
"tauri:source:build": "yarn tauri:source build",
"tauri:prod:build": "yarn tauri:prod build"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@craco/craco": "5.6.3"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -1,43 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -1,25 +0,0 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

View File

@ -1,2 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *

View File

@ -1,14 +0,0 @@
# Generated by Cargo
# will have compiled files and executables
/target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
tauri.js
config.json
bundle.json

View File

@ -1,39 +0,0 @@
workspace = { }
[package]
name = "app"
version = "0.1.0"
description = "A Tauri App"
author = [ "you" ]
license = ""
repository = ""
default-run = "app"
edition = "2018"
build = "src/build.rs"
[package.metadata.bundle]
identifier = "com.tauri.dev"
icon = [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { path = "../../../../tauri", features = [ "edge" ] }
[target."cfg(windows)".build-dependencies]
winres = "0.1"
[features]
dev-server = [ "tauri/dev-server" ]
embedded-server = [ "tauri/embedded-server" ]
no-server = [ "tauri/no-server" ]
[[bin]]
name = "app"
path = "src/main.rs"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

View File

@ -1,13 +0,0 @@
max_width = 100
hard_tabs = false
tab_spaces = 2
newline_style = "Auto"
use_small_heuristics = "Default"
reorder_imports = true
reorder_modules = true
remove_nested_parens = true
edition = "2018"
merge_derives = true
use_try_shorthand = false
use_field_init_shorthand = false
force_explicit_abi = true

View File

@ -1,12 +0,0 @@
#[cfg(windows)]
extern crate winres;
#[cfg(windows)]
fn main() {
let mut res = winres::WindowsResource::new();
res.set_icon("icons/icon.ico");
res.compile().expect("Unable to find visual studio tools");
}
#[cfg(not(windows))]
fn main() {}

View File

@ -1,10 +0,0 @@
use serde::Deserialize;
#[derive(Deserialize)]
#[serde(tag = "cmd", rename_all = "camelCase")]
pub enum Cmd {
// your custom commands
// multiple arguments are allowed
// note that rename_all = "camelCase": you need to use "myCustomCommand" on JS
MyCustomCommand { argument: String },
}

View File

@ -1,27 +0,0 @@
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
mod cmd;
fn main() {
tauri::AppBuilder::new()
.invoke_handler(|_webview, arg| {
use cmd::Cmd::*;
match serde_json::from_str(arg) {
Err(_) => {}
Ok(command) => {
match command {
// definitions for your custom commands from Cmd here
MyCustomCommand { argument } => {
// your command code
println!("{}", argument);
}
}
}
}
})
.build()
.run();
}

View File

@ -1,30 +0,0 @@
{
"build": {
"distDir": "../build",
"devPath": "http://localhost:3000"
},
"ctx": {},
"tauri": {
"embeddedServer": {
"active": true
},
"bundle": {
"active": true
},
"whitelist": {
"all": false
},
"window": {
"title": "Tauri App"
},
"security": {
"csp": "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'"
},
"edge": {
"active": true
},
"inliner": {
"active": true
}
}
}

View File

@ -1,38 +0,0 @@
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

View File

@ -1,26 +0,0 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}
export default App;

View File

@ -1,9 +0,0 @@
import React from 'react';
import { render } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

View File

@ -1,13 +0,0 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

View File

@ -1,12 +0,0 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();

View File

@ -1,7 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
<g fill="#61DAFB">
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
<circle cx="420.9" cy="296.5" r="45.7"/>
<path d="M520.5 78.1z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,137 +0,0 @@
// This optional code is used to register a service worker.
// register() is not called by default.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on subsequent visits to a page, after all the
// existing tabs open on the page have been closed, since previously cached
// resources are updated in the background.
// To learn more about the benefits of this model and instructions on how to
// opt-in, read https://bit.ly/CRA-PWA
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);
export function register(config) {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
return;
}
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
if (isLocalhost) {
// This is running on localhost. Let's check if a service worker still exists or not.
checkValidServiceWorker(swUrl, config);
// Add some additional logging to localhost, pointing developers to the
// service worker/PWA documentation.
navigator.serviceWorker.ready.then(() => {
console.log(
'This web app is being served cache-first by a service ' +
'worker. To learn more, visit https://bit.ly/CRA-PWA'
);
});
} else {
// Is not localhost. Just register service worker
registerValidSW(swUrl, config);
}
});
}
}
function registerValidSW(swUrl, config) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
registration.onupdatefound = () => {
const installingWorker = registration.installing;
if (installingWorker == null) {
return;
}
installingWorker.onstatechange = () => {
if (installingWorker.state === 'installed') {
if (navigator.serviceWorker.controller) {
// At this point, the updated precached content has been fetched,
// but the previous service worker will still serve the older
// content until all client tabs are closed.
console.log(
'New content is available and will be used when all ' +
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
);
// Execute callback
if (config && config.onUpdate) {
config.onUpdate(registration);
}
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.');
// Execute callback
if (config && config.onSuccess) {
config.onSuccess(registration);
}
}
}
};
};
})
.catch(error => {
console.error('Error during service worker registration:', error);
});
}
function checkValidServiceWorker(swUrl, config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl, {
headers: { 'Service-Worker': 'script' }
})
.then(response => {
// Ensure service worker exists, and that we really are getting a JS file.
const contentType = response.headers.get('content-type');
if (
response.status === 404 ||
(contentType != null && contentType.indexOf('javascript') === -1)
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
registration.unregister().then(() => {
window.location.reload();
});
});
} else {
// Service worker found. Proceed as normal.
registerValidSW(swUrl, config);
}
})
.catch(() => {
console.log(
'No internet connection found. App is running in offline mode.'
);
});
}
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => {
registration.unregister();
});
}
}

View File

@ -1,5 +0,0 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +0,0 @@
{
"plugins": ["@babel/plugin-proposal-optional-chaining"],
"presets": [
[
"babel-preset-gatsby",
{
"targets": {
"browsers": ["defaults", "not dead"]
}
}
]
]
}

View File

@ -1,2 +0,0 @@
.cache
public

View File

@ -1,4 +0,0 @@
# Gatsby Themed Site
This is a minimal config required gatsby site created using themes. The intention is to smoke test gatsby and provide an assortment of pages to test tauri response.
This _does_ use an API key to Airtable, but we have made it optional. (Although currently gatsby is rather aggressive in compiling things out of node_modules so `gatsby-config.js` has a hack to rename files so gatsby will ignore them. [insert heavy sigh here])

View File

@ -1,49 +0,0 @@
module.exports = {
siteMetadata: {
siteTitle: `Gatsby Themed Site In Tauri`,
siteDescription: `This is a smoke test to see that a (themed) Gatsbyjs site will work within Tauri.`,
siteAuthor: `Jacob Bolda`,
siteContact: "https://twitter.com/jacobbolda",
siteURL: "https://www.tauri.studio",
contactLinks: [
{
url: "https://twitter.com/jacobbolda",
text: "@jacobbolda",
icon: ["fab", "twitter"]
},
{
url: "https://twitter.com/TauriApps",
text: "@TauriApps",
icon: ["fab", "twitter"]
}
],
navLinks: [{ text: "Articles", url: "/articles/" }]
},
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: `articles`,
path: `${__dirname}/src/articles/`
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `homepage`,
path: `${__dirname}/src/homepage/`
}
},
`gatsby-plugin-theme-ui`,
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
`@jbolda/gatsby-theme-homepage`,
`@jbolda/gatsby-theme-articles`,
{
resolve: `gatsby-plugin-mdx`,
options: {}
},
`gatsby-plugin-react-helmet`,
`gatsby-plugin-netlify`
]
};

View File

@ -1,51 +0,0 @@
{
"name": "personal-themed-site",
"version": "0.0.0",
"author": "Jacob Bolda <me@jacobbolda.com>",
"license": "MIT",
"private": true,
"browserslist": {
"ie": "9"
},
"scripts": {
"build": "gatsby build",
"build:hard": "gatsby clean && gatsby build",
"develop": "gatsby develop",
"dev:hard": "gatsby clean && gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"tauri:prod": "tauri",
"tauri:source": "node ../../../cli/tauri.js/bin/tauri",
"tauri:source:init": "yarn tauri:source init --tauriPath ../../../tauri",
"tauri:prod:init": "yarn tauri:prod init",
"tauri:source:dev": "yarn tauri:source dev",
"tauri:prod:dev": "yarn tauri:prod dev",
"tauri:source:build": "yarn tauri:source build",
"tauri:prod:build": "yarn tauri:prod build",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"dependencies": {
"@emotion/core": "10.0.27",
"@jbolda/gatsby-theme-articles": "0.3.0",
"@jbolda/gatsby-theme-homepage": "0.3.1",
"@jbolda/gatsby-theme-layout": "0.3.2",
"@mdx-js/mdx": "1.5.5",
"@mdx-js/react": "1.5.5",
"gatsby": "2.19.12",
"gatsby-image": "2.2.40",
"gatsby-plugin-mdx": "1.0.70",
"gatsby-plugin-netlify": "2.1.32",
"gatsby-plugin-react-helmet": "3.1.22",
"gatsby-plugin-sharp": "2.4.5",
"gatsby-plugin-theme-ui": "0.3.0",
"gatsby-source-filesystem": "2.1.48",
"gatsby-transformer-sharp": "2.3.14",
"react": "16.12.0",
"react-dom": "16.12.0",
"react-helmet": "5.2.1",
"theme-ui": "0.3.1"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "7.8.3",
"tauri": "0.3.1"
}
}

View File

@ -1,16 +0,0 @@
# Generated by Cargo
# will have compiled files and executables
/target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
tauri.js
config.json
bundle.json
WixTools

View File

@ -1,39 +0,0 @@
workspace = { }
[package]
name = "gatsby-themed-site-app"
version = "0.1.0"
description = "Gatsby themed site built by Tauri"
author = [ "you" ]
license = ""
repository = ""
default-run = "gatsby-themed-site-app"
edition = "2018"
build = "src/build.rs"
[package.metadata.bundle]
identifier = "com.tauri.dev"
icon = [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { path = "../../../../tauri", features = [ "edge" ] }
[target."cfg(windows)".build-dependencies]
winres = "0.1"
[features]
dev-server = [ "tauri/dev-server" ]
embedded-server = [ "tauri/embedded-server" ]
no-server = [ "tauri/no-server" ]
[[bin]]
name = "gatsby-themed-site-app"
path = "src/main.rs"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

View File

@ -1,13 +0,0 @@
max_width = 100
hard_tabs = false
tab_spaces = 2
newline_style = "Auto"
use_small_heuristics = "Default"
reorder_imports = true
reorder_modules = true
remove_nested_parens = true
edition = "2018"
merge_derives = true
use_try_shorthand = false
use_field_init_shorthand = false
force_explicit_abi = true

View File

@ -1,12 +0,0 @@
#[cfg(windows)]
extern crate winres;
#[cfg(windows)]
fn main() {
let mut res = winres::WindowsResource::new();
res.set_icon("icons/icon.ico");
res.compile().expect("Unable to find visual studio tools");
}
#[cfg(not(windows))]
fn main() {}

View File

@ -1,10 +0,0 @@
use serde::Deserialize;
#[derive(Deserialize)]
#[serde(tag = "cmd", rename_all = "camelCase")]
pub enum Cmd {
// your custom commands
// multiple arguments are allowed
// note that rename_all = "camelCase": you need to use "myCustomCommand" on JS
MyCustomCommand { argument: String },
}

View File

@ -1,27 +0,0 @@
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
mod cmd;
fn main() {
tauri::AppBuilder::new()
.invoke_handler(|_webview, arg| {
use cmd::Cmd::*;
match serde_json::from_str(arg) {
Err(_) => {}
Ok(command) => {
match command {
// definitions for your custom commands from Cmd here
MyCustomCommand { argument } => {
// your command code
println!("{}", argument);
}
}
}
}
})
.build()
.run();
}

View File

@ -1,30 +0,0 @@
{
"build": {
"distDir": "../public",
"devPath": "http://localhost:8000"
},
"ctx": {},
"tauri": {
"embeddedServer": {
"active": true
},
"bundle": {
"active": true
},
"whitelist": {
"all": false
},
"window": {
"title": "Tauri App"
},
"security": {
"csp": "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'"
},
"edge": {
"active": true
},
"inliner": {
"active": false
}
}
}

View File

@ -1,10 +0,0 @@
---
title: First Article
written: 2019-04-15
---
Prow scuttle parrel provost Sail ho shrouds spirits boom mizzenmast yardarm. Pinnace holystone mizzenmast quarter crow's nest nipperkin grog yardarm hempen halter furl. Swab barque interloper chantey doubloon starboard grog black jack gangway rutters.
Deadlights jack lad schooner scallywag dance the hempen jig carouser broadside cable strike colors. Bring a spring upon her cable holystone blow the man down spanker Shiver me timbers to go on account lookout wherry doubloon chase. Belay yo-ho-ho keelhaul squiffy black spot yardarm spyglass sheet transom heave to.
Trysail Sail ho Corsair red ensign hulk smartly boom jib rum gangway. Case shot Shiver me timbers gangplank crack Jennys tea cup ballast Blimey lee snow crow's nest rutters. Fluke jib scourge of the seven seas boatswain schooner gaff booty Jack Tar transom spirits.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

View File

@ -1,10 +0,0 @@
---
title: Second Article
written: 2019-04-15
---
Fire in the hole fire ship cutlass scuppers measured fer yer chains starboard flogging belay handsomely yo-ho-ho bilge bowsprit lookout sheet Cat o'nine tails cable man-of-war warp line aye. Hempen halter poop deck matey gangway cackle fruit chase guns scuttle gaff smartly hardtack chandler dead men tell no tales ahoy transom deadlights lass yawl log fore parrel. Bilged on her anchor fathom Privateer boom wherry red ensign nipperkin fluke warp plunder Jack Tar chase chantey long clothes coxswain cackle fruit avast chandler fore league. Handsomely port crimp lateen sail Jack Ketch walk the plank furl mutiny pillage gally bilge rat measured fer yer chains Gold Road gunwalls execution dock Letter of Marque Blimey sutler avast pinnace. Carouser scallywag rope's end warp bucko fire ship overhaul Privateer poop deck Letter of Marque schooner grog league keel lugger Nelsons folly draught jib starboard crimp. Snow chandler maroon spike log scuppers Jack Tar belaying pin hearties long boat swing the lead heave to splice the main brace weigh anchor black spot fathom ye quarter Letter of Marque draft.
Wherry sheet rum Nelsons folly black spot black jack walk the plank belaying pin measured fer yer chains clipper careen galleon hearties six pounders Blimey poop deck run a shot across the bow Arr starboard come about. Spanker loot parley landlubber or just lubber man-of-war bilge Jolly Roger heave to handsomely league Sea Legs poop deck scuppers cackle fruit provost snow Jack Ketch spike swab black spot. Spirits ahoy gun Corsair reef black jack port yo-ho-ho cable list hail-shot lookout no prey, no pay line bilge water fire in the hole loaded to the gunwalls clap of thunder Spanish Main grapple. Measured fer yer chains Chain Shot lanyard run a shot across the bow furl capstan heave to rum black jack weigh anchor coxswain Sink me yardarm mutiny killick American Main grog fore pinnace Buccaneer. Execution dock league square-rigged chantey killick spyglass fire ship boatswain keelhaul bucko no prey, no pay gangplank stern haul wind grapple parley avast Chain Shot Jack Ketch gaff. Gold Road come about lee spyglass hang the jib nipperkin handsomely gabion Cat o'nine tails Pirate Round hardtack spike careen wherry boatswain clap of thunder Privateer snow American Main skysail.
Come about Davy Jones' Locker ye bilge yardarm Privateer blow the man down main sheet line schooner galleon pillage lass nipper sheet cog belaying pin jib Spanish Main swab. Hang the jib scallywag tender Pirate Round Letter of Marque parrel cutlass measured fer yer chains Corsair ahoy nipperkin rutters clap of thunder hands boatswain clipper Sink me capstan wench draft. Sheet lugsail me rum aye landlubber or just lubber dead men tell no tales matey blow the man down swab nipperkin spyglass list to go on account scuttle gunwalls handsomely Nelsons folly weigh anchor ballast. Splice the main brace wherry bowsprit clap of thunder nipper parrel case shot Blimey spanker scurvy league stern measured fer yer chains spirits jury mast salmagundi brigantine smartly run a rig cable. Killick wench quarter brig deadlights nipperkin bucko lass smartly furl pirate Arr brigantine keelhaul nipper Jack Ketch topsail squiffy Brethren of the Coast plunder. Gun hands lad port bilged on her anchor hornswaggle nipperkin list execution dock Brethren of the Coast American Main scourge of the seven seas Yellow Jack Corsair Jack Ketch yo-ho-ho keel run a rig landlubber or just lubber topmast.

View File

@ -1,14 +0,0 @@
---
title: Third Article
written: 2019-04-15
---
Hornswaggle hands tender sloop hail-shot jolly boat dead men tell no tales log black spot draught. Matey Sink me grog case shot rope's end lateen sail driver list bilge rat shrouds. Lugger scourge of the seven seas Buccaneer fore Jack Tar salmagundi pressgang capstan chase matey. Haul wind aft Letter of Marque Jack Tar code of conduct ye lass grog blossom grapple scurvy.
Cat o'nine tails broadside keel Barbary Coast Privateer yardarm boom fire in the hole doubloon clipper. Loaded to the gunwalls bucko tack prow reef sails me quarterdeck maroon brigantine sutler. Furl draught chase tackle Cat o'nine tails chantey draft parley scuppers aye. Grapple blow the man down interloper lee American Main topsail lateen sail execution dock gibbet brigantine.
Squiffy belay hail-shot quarterdeck mizzenmast Letter of Marque tackle lookout yardarm prow. Long boat hornswaggle crimp chantey swing the lead American Main boatswain topgallant chase guns clap of thunder. Sea Legs scourge of the seven seas quarter fathom Blimey yawl starboard scurvy belay line. Heave down yo-ho-ho gabion piracy long clothes parley chantey list bilge man-of-war.
Sheet cable bowsprit lookout capstan list crimp mutiny Pirate Round draft. Heave down bilge galleon loot Yellow Jack lateen sail American Main gun fore tackle. Sloop Corsair belaying pin list mizzen booty hogshead hail-shot broadside shrouds. Provost ahoy knave hornswaggle matey scuppers cog trysail transom marooned.
Maroon line spyglass parrel run a shot across the bow run a rig rutters topsail rum yardarm. Ballast bilge American Main belaying pin square-rigged careen belay killick bilged on her anchor yawl. Six pounders pinnace cog clap of thunder gun pressgang aft keelhaul Sink me hang the jib. Reef spike yo-ho-ho clap of thunder careen man-of-war ye belaying pin strike colors scuttle.

View File

@ -1,8 +0,0 @@
---
title: Fourth Article
written: 2019-04-15
---
Gabion starboard bowsprit dead men tell no tales run a shot across the bow schooner shrouds cog Corsair ahoy haul wind hornswaggle barque fire ship landlubber or just lubber sloop yo-ho-ho hearties nipper maroon. Pirate Round draft squiffy Buccaneer keelhaul case shot marooned furl jib clipper parley bilge rat six pounders Nelsons folly splice the main brace rigging Arr hardtack wherry long boat. Yawl quarter Privateer mutiny loaded to the gunwalls swing the lead heave down dance the hempen jig reef sails chase rum fire in the hole Chain Shot execution dock barque port topgallant crimp Jolly Roger ho. Deadlights reef sails code of conduct fluke ballast chantey crow's nest poop deck mizzen hail-shot blow the man down sheet broadside overhaul scourge of the seven seas pinnace spanker squiffy fore carouser.
Admiral of the Black yardarm Plate Fleet Sink me me yawl warp bilge water hulk belay swab bring a spring upon her cable hearties marooned stern sheet plunder Corsair Letter of Marque Nelsons folly. Poop deck haul wind chantey gangway hardtack fire ship yawl swab mizzen mizzenmast stern measured fer yer chains scuppers gaff list square-rigged capstan hogshead grog blossom jib. Lass fore barkadeer Admiral of the Black lad flogging draught haul wind gibbet pirate gangway avast walk the plank aye measured fer yer chains Gold Road log scourge of the seven seas spyglass line. Pirate topmast grapple weigh anchor jury mast take a caulk long clothes chase guns Plate Fleet reef heave down hands port hornswaggle Sea Legs nipperkin overhaul cable swing the lead Jack Ketch.

View File

@ -1,23 +0,0 @@
---
title: Fifth Article
written: 2019-04-15
---
Mizzen Chain Shot pinnace scurvy handsomely. Long clothes belay gabion Yellow Jack fluke. Bilge measured fer yer chains cog scuttle grog blossom. No prey, no pay pillage maroon rutters provost. Corsair quarter six pounders coffer scuttle. Poop deck lanyard loaded to the gunwalls black spot no prey, no pay. Hogshead pink league grog blossom bring a spring upon her cable. Blimey doubloon come about splice the main brace pressgang. Dance the hempen jig fathom hornswaggle Pirate Round scurvy. Driver crow's nest topgallant hang the jib wench.
Topmast provost log yard fathom. Trysail gangway execution dock rigging mutiny. Pinnace aye sloop brigantine killick. Spanker keel run a rig starboard rutters. Swab trysail keelhaul strike colors rum. Grog blossom scuppers bucko mutiny six pounders. Spanker hornswaggle draft take a caulk lanyard. Clap of thunder sutler cutlass quarter haul wind. Keel black jack boatswain Admiral of the Black sloop. Hornswaggle cable scuppers measured fer yer chains furl.
![Panda](./panda.jpg)
[Copyright by Jacob Bolda](https://www.jacobbolda.com)
Pirate landlubber or just lubber ahoy measured fer yer chains sutler. List brigantine yo-ho-ho loot topsail. Walk the plank belaying pin killick topsail Brethren of the Coast. Jury mast careen gun landlubber or just lubber to go on account. Coxswain Cat o'nine tails lateen sail chase crimp. Overhaul Buccaneer pressgang Jolly Roger rigging. Landlubber or just lubber topmast snow bucko capstan. Fire ship flogging grog Letter of Marque fluke. Galleon clap of thunder fluke starboard Buccaneer. Black jack rum killick Privateer clap of thunder.
Yellow Jack port aft boom wench. Cable keel crack Jennys tea cup careen ye. Avast Spanish Main swing the lead cable hardtack. Cog cackle fruit matey dance the hempen jig main sheet. Port handsomely keelhaul aft sutler. Jolly boat tack squiffy flogging dead men tell no tales. Hempen halter topgallant clap of thunder scallywag parrel. Gun brigantine scuppers blow the man down swab. Yawl tender Nelsons folly overhaul sloop. Spike coffer lee scourge of the seven seas lanyard.
Mizzen Plate Fleet scuttle hearties clap of thunder. Jack Ketch hulk sheet doubloon tackle. Salmagundi Pirate Round man-of-war Barbary Coast Letter of Marque. Bilge rat crack Jennys tea cup square-rigged Davy Jones' Locker provost. Hail-shot spanker pillage topgallant ye. Scurvy scuppers spirits scourge of the seven seas gunwalls. Ho cutlass topsail plunder capstan. Gibbet boatswain Davy Jones' Locker heave down Barbary Coast. Deadlights man-of-war draught Corsair clap of thunder. Spanker maroon gun weigh anchor overhaul.
Trysail brigantine crimp come about Buccaneer. Scallywag Davy Jones' Locker capstan pink bilge rat. Fire in the hole bilge rat code of conduct Davy Jones' Locker poop deck. Rope's end Cat o'nine tails to go on account black jack sheet. Black spot prow driver gaff pink. Reef sails Yellow Jack jury mast spirits mizzen. Walk the plank American Main run a rig nipperkin me. Careen bowsprit poop deck loot reef sails. Jack Ketch knave carouser quarterdeck bucko. Pressgang bucko spirits snow fire ship.
Topsail hornswaggle Shiver me timbers take a caulk cable. Gold Road strike colors trysail keel booty. Rigging Letter of Marque chase brigantine skysail. Knave gangplank spanker yardarm careen. Draft list gally doubloon yawl. Black jack Gold Road line Admiral of the Black sloop. Jack Ketch hogshead spanker overhaul brig. Jolly boat piracy come about black spot league. Gangway lad Chain Shot weigh anchor hardtack. Brigantine belaying pin Sea Legs holystone yawl.
Draft cog keel fluke gally. Topsail fore gunwalls capstan sutler. Hang the jib crimp lass yo-ho-ho keelhaul. Chase long boat quarter case shot strike colors. Draught gibbet pillage gabion Shiver me timbers. Trysail belay wench cutlass gabion. Measured fer yer chains poop deck nipper swab man-of-war. Starboard Gold Road handsomely dance the hempen jig list. Lee jack tack Privateer yard. Chain Shot square-rigged gabion league piracy.

View File

@ -1,147 +0,0 @@
export default {
initialColorMode: "light",
useCustomProperties: true, // true is default
// ^ prevents FOUC aka flash of unstyled content
useColorSchemeMediaQuery: true, // turns on dark mode if set in browser
breakpoints: ["40em", "56em", "64em"],
space: [0, 2, 4, 8, 12, 16, 20, 24, 28],
fonts: {
body: "Gentium Basic, serif",
heading: "Eczar, serif",
monospace: "Menlo, monospace"
},
fontSizes: [12, 14, 16, 24, 32, 48, 64, 96, 128],
fontWeights: {
body: 400,
heading: 700,
bold: 700
},
lineHeights: {
body: 1.98,
heading: 1.47
},
colors: {
text: "#DFC449",
background: "#0F1227",
primary: "#637EEE",
secondary: "#272e61",
muted: "#EEBF99",
modes: {
dark: {
text: "#F3FBF1",
background: "#1d2121",
primary: "#a6e58b",
secondary: "#363233",
muted: "#dcf4d3"
}
}
},
text: {
heading: {
fontFamily: "heading",
fontWeight: "heading",
lineHeight: "heading",
letterSpacing: "heading"
},
body: {
fontFamily: "body",
fontWeight: "body",
lineHeight: "body",
letterSpacing: "body"
}
},
styles: {
root: {
fontFamily: "body",
lineHeight: "body",
fontWeight: "body"
},
h1: {
color: "text",
fontFamily: "heading",
lineHeight: "heading",
fontWeight: "heading",
fontSize: 5
},
h2: {
color: "text",
fontFamily: "heading",
lineHeight: "heading",
fontWeight: "heading",
fontSize: 4
},
h3: {
color: "text",
fontFamily: "heading",
lineHeight: "heading",
fontWeight: "heading",
fontSize: 3
},
h4: {
color: "text",
fontFamily: "heading",
lineHeight: "heading",
fontWeight: "heading",
fontSize: 2
},
h5: {
color: "text",
fontFamily: "heading",
lineHeight: "heading",
fontWeight: "heading",
fontSize: 1
},
h6: {
color: "text",
fontFamily: "heading",
lineHeight: "heading",
fontWeight: "heading",
fontSize: 0
},
p: {
color: "text",
fontFamily: "body",
fontWeight: "body",
lineHeight: "body"
},
span: {
color: "text",
fontFamily: "body",
fontWeight: "body",
lineHeight: "body"
},
a: {
color: "primary",
fontFamily: "body",
fontWeight: "body",
lineHeight: "body"
},
pre: {
fontFamily: "monospace",
overflowX: "auto",
code: {
color: "inherit"
}
},
code: {
fontFamily: "monospace",
fontSize: "inherit"
},
table: {
width: "100%",
borderCollapse: "separate",
borderSpacing: 0
},
th: {
textAlign: "left",
borderBottomStyle: "solid"
},
td: {
textAlign: "left",
borderBottomStyle: "solid"
},
img: {
maxWidth: "100%"
}
}
};

View File

@ -1,7 +0,0 @@
# Who Tauri is For
Because of the way Tauri has been built and can be extended, developers are able to interface not only with the entire Rust ecosystem, but also with many other programming languages. Being freed of the heaviest thing in the universe and the many shortcomings of server-side Javascript suddenly opens up whole new avenues for high-performance, security-focused applications that need the purebred power, agility and community acceptance of a low-level language.
We expect to witness an entire new class of applications being built with Tauri. From a simple calender to locally crunching massive realtime feeds at particle colliders or even mesh-network based distributed message- passing ecosystems - the bar has been raised and gauntlet thrown.
What will you make?

View File

@ -1,5 +0,0 @@
---
order: 1
---
Doing work on Tauri is the bomb!

View File

@ -1,4 +0,0 @@
# Tauri
## Click Around and See
Tauri is a tool for building tiny, blazing fast binaries for all major desktop platforms. You can use any front-end framework that compiles to HTML,JS and CSS for building your interface.

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
.env*
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View File

@ -1,24 +0,0 @@
## Running Example
Ensure you have setup and installed all the project dependencies.
```
npm install -g tauri
git clone https://github.com/tauri-apps/tauri
cd examples/react/next.js
yarn
cargo install tauri-bundler
```
### Development
```
yarn dev & tauri dev
```
### Production
```
yarn build
tauri build
```

View File

@ -1,56 +0,0 @@
import React from 'react'
import Link from 'next/link'
const links = [
{ href: 'https://zeit.co/now', label: 'ZEIT' },
{ href: 'https://github.com/zeit/next.js', label: 'GitHub' },
].map(link => {
link.key = `nav-link-${link.href}-${link.label}`
return link
})
const Nav = () => (
<nav>
<ul>
<li>
<Link href="/">
<a>Home</a>
</Link>
</li>
{links.map(({ key, href, label }) => (
<li key={key}>
<a href={href}>{label}</a>
</li>
))}
</ul>
<style jsx>{`
:global(body) {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Avenir Next, Avenir,
Helvetica, sans-serif;
}
nav {
text-align: center;
}
ul {
display: flex;
justify-content: space-between;
}
nav > ul {
padding: 4px 16px;
}
li {
display: flex;
padding: 6px 8px;
}
a {
color: #067df7;
text-decoration: none;
font-size: 13px;
}
`}</style>
</nav>
)
export default Nav

View File

@ -1,23 +0,0 @@
{
"name": "next.js",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build && next export",
"start": "next start",
"tauri:prod": "tauri",
"tauri:source": "node ../../../cli/tauri.js/bin/tauri",
"tauri:source:init": "yarn tauri:source init --tauriPath ../../../tauri",
"tauri:prod:init": "yarn tauri:prod init",
"tauri:source:dev": "yarn tauri:source dev",
"tauri:prod:dev": "yarn tauri:prod dev",
"tauri:source:build": "yarn tauri:source build",
"tauri:prod:build": "yarn tauri:prod build"
},
"dependencies": {
"next": "9.2.1",
"react": "16.12.0",
"react-dom": "16.12.0"
}
}

View File

@ -1,88 +0,0 @@
import React from 'react'
import Head from 'next/head'
import Nav from '../components/nav'
const Home = () => (
<div>
<Head>
<title>Home</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<Nav />
<div className="hero">
<h1 className="title">Welcome to Next.js!</h1>
<p className="description">
To get started, edit <code>pages/index.js</code> and save to reload.
</p>
<div className="row">
<a href="https://nextjs.org/docs" className="card">
<h3>Documentation &rarr;</h3>
<p>Learn more about Next.js in the documentation.</p>
</a>
<a href="https://nextjs.org/learn" className="card">
<h3>Next.js Learn &rarr;</h3>
<p>Learn about Next.js by following an interactive tutorial!</p>
</a>
<a
href="https://github.com/zeit/next.js/tree/master/examples"
className="card"
>
<h3>Examples &rarr;</h3>
<p>Find other example boilerplates on the Next.js GitHub.</p>
</a>
</div>
</div>
<style jsx>{`
.hero {
width: 100%;
color: #333;
}
.title {
margin: 0;
width: 100%;
padding-top: 80px;
line-height: 1.15;
font-size: 48px;
}
.title,
.description {
text-align: center;
}
.row {
max-width: 880px;
margin: 80px auto 40px;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.card {
padding: 18px 18px 24px;
width: 220px;
text-align: left;
text-decoration: none;
color: #434343;
border: 1px solid #9b9b9b;
}
.card:hover {
border-color: #067df7;
}
.card h3 {
margin: 0;
color: #067df7;
font-size: 18px;
}
.card p {
margin: 0;
padding: 12px 0 0;
font-size: 13px;
color: #333;
}
`}</style>
</div>
)
export default Home

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,14 +0,0 @@
# Generated by Cargo
# will have compiled files and executables
/target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
tauri.js
config.json
bundle.json

View File

@ -1,39 +0,0 @@
workspace = { }
[package]
name = "app"
version = "0.1.0"
description = "A Tauri App"
author = [ "you" ]
license = ""
repository = ""
default-run = "app"
edition = "2018"
build = "src/build.rs"
[package.metadata.bundle]
identifier = "com.tauri.dev"
icon = [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { path = "../../../../tauri", features = [ "edge" ] }
[target."cfg(windows)".build-dependencies]
winres = "0.1"
[features]
dev-server = [ "tauri/dev-server" ]
embedded-server = [ "tauri/embedded-server" ]
no-server = [ "tauri/no-server" ]
[[bin]]
name = "app"
path = "src/main.rs"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Some files were not shown because too many files have changed in this diff Show More