diff --git a/apps/desktop/tailwind.config.js b/apps/desktop/tailwind.config.js index 55ea44fdc..f9d8b0e5f 100644 --- a/apps/desktop/tailwind.config.js +++ b/apps/desktop/tailwind.config.js @@ -1 +1 @@ -module.exports = require('@sd/ui/tailwind'); +module.exports = require('@sd/ui/tailwind')('desktop'); diff --git a/apps/desktop/vite.config.ts b/apps/desktop/vite.config.ts index 38b6e92e7..2bc86c870 100644 --- a/apps/desktop/vite.config.ts +++ b/apps/desktop/vite.config.ts @@ -4,9 +4,6 @@ import { name, version } from './package.json'; import * as path from 'path'; import svgr from '@honkhonk/vite-plugin-svgr'; -function resolvePackage(name: string) { - return path.resolve(require.resolve(`${name}/package.json`), '../src'); -} // https://vitejs.dev/config/ export default defineConfig({ server: { @@ -23,16 +20,6 @@ export default defineConfig({ define: { pkgJson: { name, version } }, - optimizeDeps: { - include: ['@sd/interface', '@sd/ui', '@sd/client'] - }, - resolve: { - alias: { - '@sd/interface': resolvePackage('@sd/interface'), - '@sd/ui': resolvePackage('@sd/ui'), - '@sd/client': resolvePackage('@sd/client') - } - }, build: { outDir: '../dist', assetsDir: '.' diff --git a/apps/landing/.gitignore b/apps/landing/.gitignore new file mode 100644 index 000000000..a547bf36d --- /dev/null +++ b/apps/landing/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/apps/landing/README.md b/apps/landing/README.md deleted file mode 100644 index 897f79301..000000000 --- a/apps/landing/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# TypeScript Next.js example - -This is a really simple project that shows the usage of Next.js with TypeScript. - -## Deploy your own - -Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-typescript) - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-typescript&project-name=with-typescript&repository-name=with-typescript) - -## How to use it? - -Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: - -```bash -npx create-next-app --example with-typescript with-typescript-app -# or -yarn create next-app --example with-typescript with-typescript-app -# or -pnpm create next-app -- --example with-typescript with-typescript-app -``` - -Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). - -## Notes - -This example shows how to integrate the TypeScript type system into Next.js. Since TypeScript is supported out of the box with Next.js, all we have to do is to install TypeScript. - -``` -npm install --save-dev typescript -``` - -To enable TypeScript's features, we install the type declarations for React and Node. - -``` -npm install --save-dev @types/react @types/react-dom @types/node -``` - -When we run `next dev` the next time, Next.js will start looking for any `.ts` or `.tsx` files in our project and builds it. It even automatically creates a `tsconfig.json` file for our project with the recommended settings. - -Next.js has built-in TypeScript declarations, so we'll get autocompletion for Next.js' modules straight away. - -A `type-check` script is also added to `package.json`, which runs TypeScript's `tsc` CLI in `noEmit` mode to run type-checking separately. You can then include this, for example, in your `test` scripts. diff --git a/apps/landing/components/Layout.tsx b/apps/landing/components/Layout.tsx deleted file mode 100644 index e0e172ce3..000000000 --- a/apps/landing/components/Layout.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React, { ReactNode } from 'react'; -import Link from 'next/link'; -import Head from 'next/head'; - -type Props = { - children?: ReactNode; - title?: string; -}; - -const Layout = ({ children, title = 'Spacedrive' }: Props) => ( - <> - - {title} - - - -
- {/* */} -
-
- {children as any} -
- {/* */} - -); - -export default Layout; diff --git a/apps/landing/components/global.scss b/apps/landing/components/global.scss deleted file mode 100644 index bd6213e1d..000000000 --- a/apps/landing/components/global.scss +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; \ No newline at end of file diff --git a/apps/landing/index.html b/apps/landing/index.html new file mode 100644 index 000000000..38f386110 --- /dev/null +++ b/apps/landing/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/apps/landing/next-env.d.ts b/apps/landing/next-env.d.ts deleted file mode 100644 index 4f11a03dc..000000000 --- a/apps/landing/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/landing/next.config.js b/apps/landing/next.config.js deleted file mode 100644 index 1403639ed..000000000 --- a/apps/landing/next.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - experimental: { - externalDir: true - } -}; diff --git a/apps/landing/package.json b/apps/landing/package.json index 0794e9969..b3a282c4d 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -1,29 +1,30 @@ { "name": "@sd/landing", "private": true, + "version": "0.0.0", "scripts": { - "dev": "next -p 8003", - "build": "next build", - "start": "next start", - "type-check": "tsc" + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" }, "dependencies": { - "@sd/interface": "*", - "@sd/ui": "*", - "autoprefixer": "^10.4.4", - "next": "latest", - "postcss": "^8.4.12", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "@sd/client": "workspace:*", + "@sd/core": "workspace:*", + "@sd/interface": "workspace:*", + "@sd/ui": "workspace:*", + "react": "^18.0.0", + "react-dom": "^18.0.0", "react-tsparticles": "^2.0.6", - "sass": "^1.50.0", - "tailwindcss": "^3.0.23", "tsparticles": "^2.0.6" }, "devDependencies": { - "@types/node": "^12.12.21", - "@types/react": "^17.0.2", - "@types/react-dom": "^17.0.1", - "typescript": "^4.6.3" + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "@vitejs/plugin-react": "^1.3.1", + "autoprefixer": "^10.4.4", + "postcss": "^8.4.12", + "tailwind": "^4.0.0", + "typescript": "^4.6.3", + "vite": "^2.9.5" } } diff --git a/apps/landing/pages/_app.tsx b/apps/landing/pages/_app.tsx deleted file mode 100644 index fa9af6e2a..000000000 --- a/apps/landing/pages/_app.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import '../components/global.scss'; - -function MyApp({ Component, pageProps }) { - return ; -} - -export default MyApp; diff --git a/apps/landing/pages/index.tsx b/apps/landing/pages/index.tsx deleted file mode 100644 index b7575489a..000000000 --- a/apps/landing/pages/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -// import Link from 'next/link'; -import Layout from '../components/Layout'; -import { Bubbles } from '../components/Bubbles'; -import { Button } from '@sd/ui'; - -const IndexPage = () => ( - - -

The file explorer from the future

-

- Spacedrive is the first file manager that puts the full power of the cloud in your hands. -

- - -