Skip to content

Commit 40839b3

Browse files
committed
initial commit
0 parents  commit 40839b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+15516
-0
lines changed

Diff for: .editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

Diff for: .eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

Diff for: .eslintrc.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nrwl/nx/typescript"],
27+
"rules": {}
28+
},
29+
{
30+
"files": ["*.js", "*.jsx"],
31+
"extends": ["plugin:@nrwl/nx/javascript"],
32+
"rules": {}
33+
}
34+
]
35+
}

Diff for: .gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
dist
5+
tmp
6+
/out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db

Diff for: .prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add files here to ignore them from prettier formatting
2+
3+
/dist
4+
/coverage

Diff for: .prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

Diff for: .vscode/extensions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"nrwl.angular-console",
4+
"esbenp.prettier-vscode",
5+
"dbaeumer.vscode-eslint",
6+
"firsttris.vscode-jest-runner"
7+
]
8+
}

Diff for: README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MyWallet
2+
3+
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
4+
5+
**This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)**
6+
7+
## Development server
8+
9+
Run `nx serve wallet` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
10+
11+
## Understand this workspace
12+
13+
Run `nx graph` to see a diagram of the dependencies of the projects.
14+
15+
## Remote caching
16+
17+
Run `npx nx connect-to-nx-cloud` to enable [remote caching](https://nx.app) and make CI faster.
18+
19+
## Further help
20+
21+
Visit the [Nx Documentation](https://nx.dev) to learn more.

Diff for: apps/.gitkeep

Whitespace-only changes.

Diff for: apps/wallet-e2e/.eslintrc.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["src/plugins/index.js"],
11+
"rules": {
12+
"@typescript-eslint/no-var-requires": "off",
13+
"no-undef": "off"
14+
}
15+
}
16+
]
17+
}

Diff for: apps/wallet-e2e/cypress.config.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from 'cypress';
2+
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
3+
4+
export default defineConfig({
5+
e2e: nxE2EPreset(__dirname, {
6+
bundler: 'vite',
7+
}),
8+
});

Diff for: apps/wallet-e2e/project.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "wallet-e2e",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "apps/wallet-e2e/src",
5+
"projectType": "application",
6+
"targets": {
7+
"e2e": {
8+
"executor": "@nrwl/cypress:cypress",
9+
"options": {
10+
"cypressConfig": "apps/wallet-e2e/cypress.config.ts",
11+
"devServerTarget": "wallet:serve:development",
12+
"testingType": "e2e"
13+
},
14+
"configurations": {
15+
"production": {
16+
"devServerTarget": "wallet:serve:production"
17+
}
18+
}
19+
},
20+
"lint": {
21+
"executor": "@nrwl/linter:eslint",
22+
"outputs": ["{options.outputFile}"],
23+
"options": {
24+
"lintFilePatterns": ["apps/wallet-e2e/**/*.{js,ts}"]
25+
}
26+
}
27+
},
28+
"tags": [],
29+
"implicitDependencies": ["wallet"]
30+
}

Diff for: apps/wallet-e2e/src/e2e/app.cy.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { getGreeting } from '../support/app.po';
2+
3+
describe('wallet', () => {
4+
beforeEach(() => cy.visit('/'));
5+
6+
it('should display welcome message', () => {
7+
// Custom command example, see `../support/commands.ts` file
8+
cy.login('[email protected]', 'myPassword');
9+
10+
// Function helper example, see `../support/app.po.ts` file
11+
getGreeting().contains('Welcome wallet');
12+
});
13+
});

Diff for: apps/wallet-e2e/src/fixtures/example.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]"
4+
}

Diff for: apps/wallet-e2e/src/support/app.po.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const getGreeting = () => cy.get('h1');

Diff for: apps/wallet-e2e/src/support/commands.ts

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
11+
// eslint-disable-next-line @typescript-eslint/no-namespace
12+
declare namespace Cypress {
13+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
14+
interface Chainable<Subject> {
15+
login(email: string, password: string): void;
16+
}
17+
}
18+
//
19+
// -- This is a parent command --
20+
Cypress.Commands.add('login', (email, password) => {
21+
console.log('Custom command example: Login', email, password);
22+
});
23+
//
24+
// -- This is a child command --
25+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
26+
//
27+
//
28+
// -- This is a dual command --
29+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
30+
//
31+
//
32+
// -- This will overwrite an existing command --
33+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

Diff for: apps/wallet-e2e/src/support/e2e.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands';

Diff for: apps/wallet-e2e/tsconfig.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"sourceMap": false,
5+
"outDir": "../../dist/out-tsc",
6+
"allowJs": true,
7+
"types": ["cypress", "node"]
8+
},
9+
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"]
10+
}

Diff for: apps/wallet/.eslintrc.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
}
17+
]
18+
}

Diff for: apps/wallet/index.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Wallet</title>
6+
<base href="/" />
7+
8+
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
10+
</head>
11+
<body>
12+
<div id="root"></div>
13+
<script type="module" src="/src/main.tsx"></script>
14+
</body>
15+
</html>

Diff for: apps/wallet/project.json

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "wallet",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "apps/wallet/src",
5+
"projectType": "application",
6+
"targets": {
7+
"build": {
8+
"executor": "@nrwl/vite:build",
9+
"outputs": ["{options.outputPath}"],
10+
"defaultConfiguration": "production",
11+
"options": {
12+
"outputPath": "dist/apps/wallet"
13+
},
14+
"configurations": {
15+
"development": {
16+
"mode": "development"
17+
},
18+
"production": {
19+
"mode": "production"
20+
}
21+
}
22+
},
23+
"serve": {
24+
"executor": "@nrwl/vite:dev-server",
25+
"defaultConfiguration": "development",
26+
"options": {
27+
"buildTarget": "wallet:build"
28+
},
29+
"configurations": {
30+
"development": {
31+
"buildTarget": "wallet:build:development",
32+
"hmr": true
33+
},
34+
"production": {
35+
"buildTarget": "wallet:build:production",
36+
"hmr": false
37+
}
38+
}
39+
},
40+
"preview": {
41+
"executor": "@nrwl/vite:preview-server",
42+
"defaultConfiguration": "development",
43+
"options": {
44+
"buildTarget": "wallet:build"
45+
},
46+
"configurations": {
47+
"development": {
48+
"buildTarget": "wallet:build:development"
49+
},
50+
"production": {
51+
"buildTarget": "wallet:build:production"
52+
}
53+
}
54+
},
55+
"test": {
56+
"executor": "@nrwl/vite:test",
57+
"outputs": ["coverage/apps/wallet"],
58+
"options": {
59+
"passWithNoTests": true,
60+
"reportsDirectory": "../../coverage/apps/wallet"
61+
}
62+
},
63+
"lint": {
64+
"executor": "@nrwl/linter:eslint",
65+
"outputs": ["{options.outputFile}"],
66+
"options": {
67+
"lintFilePatterns": ["apps/wallet/**/*.{ts,tsx,js,jsx}"]
68+
}
69+
}
70+
},
71+
"tags": []
72+
}

Diff for: apps/wallet/public/favicon.ico

14.7 KB
Binary file not shown.

Diff for: apps/wallet/src/app/app.spec.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { render } from '@testing-library/react';
2+
3+
import App from './app';
4+
5+
describe('App', () => {
6+
it('should render successfully', () => {
7+
const { baseElement } = render(<App />);
8+
expect(baseElement).toBeTruthy();
9+
});
10+
11+
it('should have a greeting as the title', () => {
12+
const { getByText } = render(<App />);
13+
expect(getByText(/Welcome wallet/gi)).toBeTruthy();
14+
});
15+
});

0 commit comments

Comments
 (0)