From 2984a3b0486cd1caf8a5ac972833df7ca63db0b4 Mon Sep 17 00:00:00 2001 From: tizah Date: Tue, 29 Jun 2021 12:41:39 +0100 Subject: [PATCH] initial setup for moving terminal to react --- libs/remix-ui/terminal/.babelrc | 4 +++ libs/remix-ui/terminal/.eslintrc | 19 ++++++++++ libs/remix-ui/terminal/README.md | 7 ++++ libs/remix-ui/terminal/package.json | 4 +++ libs/remix-ui/terminal/src/index.ts | 1 + .../terminal/src/lib/remix-ui-terminal.css | 0 .../terminal/src/lib/remix-ui-terminal.tsx | 16 +++++++++ libs/remix-ui/terminal/tsconfig.json | 16 +++++++++ libs/remix-ui/terminal/tsconfig.lib.json | 13 +++++++ nx.json | 3 ++ tsconfig.json | 3 +- workspace.json | 35 +++++++++++++++++++ 12 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 libs/remix-ui/terminal/.babelrc create mode 100644 libs/remix-ui/terminal/.eslintrc create mode 100644 libs/remix-ui/terminal/README.md create mode 100644 libs/remix-ui/terminal/package.json create mode 100644 libs/remix-ui/terminal/src/index.ts create mode 100644 libs/remix-ui/terminal/src/lib/remix-ui-terminal.css create mode 100644 libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx create mode 100644 libs/remix-ui/terminal/tsconfig.json create mode 100644 libs/remix-ui/terminal/tsconfig.lib.json diff --git a/libs/remix-ui/terminal/.babelrc b/libs/remix-ui/terminal/.babelrc new file mode 100644 index 0000000000..09d67939cc --- /dev/null +++ b/libs/remix-ui/terminal/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["@nrwl/react/babel"], + "plugins": [] +} diff --git a/libs/remix-ui/terminal/.eslintrc b/libs/remix-ui/terminal/.eslintrc new file mode 100644 index 0000000000..dae5c6feeb --- /dev/null +++ b/libs/remix-ui/terminal/.eslintrc @@ -0,0 +1,19 @@ +{ + "env": { + "browser": true, + "es6": true + }, + "extends": "../../../.eslintrc", + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parserOptions": { + "ecmaVersion": 11, + "sourceType": "module" + }, + "rules": { + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "error" + } +} diff --git a/libs/remix-ui/terminal/README.md b/libs/remix-ui/terminal/README.md new file mode 100644 index 0000000000..4638096417 --- /dev/null +++ b/libs/remix-ui/terminal/README.md @@ -0,0 +1,7 @@ +# remix-ui-terminal + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test remix-ui-terminal` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/remix-ui/terminal/package.json b/libs/remix-ui/terminal/package.json new file mode 100644 index 0000000000..623cf89c25 --- /dev/null +++ b/libs/remix-ui/terminal/package.json @@ -0,0 +1,4 @@ +{ + "name": "remix-ui-terminal", + "version": "0.0.1" +} diff --git a/libs/remix-ui/terminal/src/index.ts b/libs/remix-ui/terminal/src/index.ts new file mode 100644 index 0000000000..1735a3cf89 --- /dev/null +++ b/libs/remix-ui/terminal/src/index.ts @@ -0,0 +1 @@ +export * from './lib/remix-ui-terminal'; diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx new file mode 100644 index 0000000000..337bb2e1bb --- /dev/null +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -0,0 +1,16 @@ +import React from 'react' + +import './remix-ui-terminal.css' + +/* eslint-disable-next-line */ +export interface RemixUiTerminalProps {} + +export const RemixUiTerminal = (props: RemixUiTerminalProps) => { + return ( +
+

Welcome to remix-ui-terminal!

+
+ ) +} + +export default RemixUiTerminal; diff --git a/libs/remix-ui/terminal/tsconfig.json b/libs/remix-ui/terminal/tsconfig.json new file mode 100644 index 0000000000..6b65264565 --- /dev/null +++ b/libs/remix-ui/terminal/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "jsx": "react", + "allowJs": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + } + ] +} diff --git a/libs/remix-ui/terminal/tsconfig.lib.json b/libs/remix-ui/terminal/tsconfig.lib.json new file mode 100644 index 0000000000..b560bc4dec --- /dev/null +++ b/libs/remix-ui/terminal/tsconfig.lib.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": ["node"] + }, + "files": [ + "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", + "../../../node_modules/@nrwl/react/typings/image.d.ts" + ], + "exclude": ["**/*.spec.ts", "**/*.spec.tsx"], + "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] +} diff --git a/nx.json b/nx.json index a63c015d64..4220432156 100644 --- a/nx.json +++ b/nx.json @@ -101,6 +101,9 @@ }, "remix-ui-checkbox": { "tags": [] + }, + "remix-ui-terminal": { + "tags": [] } } } diff --git a/tsconfig.json b/tsconfig.json index 75db5bc6ff..3325513e53 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -40,7 +40,8 @@ "@remix-ui/file-explorer": ["libs/remix-ui/file-explorer/src/index.ts"], "@remix-ui/workspace": ["libs/remix-ui/workspace/src/index.ts"], "@remix-ui/static-analyser": ["libs/remix-ui/static-analyser/src/index.ts"], - "@remix-ui/checkbox": ["libs/remix-ui/checkbox/src/index.ts"] + "@remix-ui/checkbox": ["libs/remix-ui/checkbox/src/index.ts"], + "@remix-ui/terminal": ["libs/remix-ui/terminal/src/index.ts"] } }, "exclude": ["node_modules", "tmp"] diff --git a/workspace.json b/workspace.json index 5d2bf912c0..14cfc136d9 100644 --- a/workspace.json +++ b/workspace.json @@ -760,6 +760,41 @@ } } } + }, + "remix-ui-terminal": { + "root": "libs/remix-ui/terminal", + "sourceRoot": "libs/remix-ui/terminal/src", + "projectType": "library", + "schematics": {}, + "architect": { + "lint": { + "builder": "@nrwl/linter:lint", + "options": { + "linter": "eslint", + "tsConfig": ["libs/remix-ui/terminal/tsconfig.lib.json"], + "exclude": ["**/node_modules/**", "!libs/remix-ui/terminal/**/*"] + } + }, + "build": { + "builder": "@nrwl/web:package", + "options": { + "outputPath": "dist/libs/remix-ui/terminal", + "tsConfig": "libs/remix-ui/terminal/tsconfig.lib.json", + "project": "libs/remix-ui/terminal/package.json", + "entryFile": "libs/remix-ui/terminal/src/index.ts", + "external": ["react", "react-dom"], + "babelConfig": "@nrwl/react/plugins/bundle-babel", + "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "assets": [ + { + "glob": "README.md", + "input": ".", + "output": "." + } + ] + } + } + } } }, "cli": {