Skip to content

Commit

Permalink
feat(theme): without tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenji Shiroma committed Jul 11, 2023
0 parents commit 5712ef5
Show file tree
Hide file tree
Showing 102 changed files with 17,971 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['@westpac-x/eslint-config'],
};
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Make sure source files have LF (unix) line endings, not CRLF (windows/mac) line endings
* text eol=lf

# Windows bat files should be CRLF
*.bat text eol=crlf

# Don't mess with binary files
*.jar binary
*.png binary
*.eot binary
*.ttf binary
*.woff binary
*.dll binary
*.winmd binary
*.so binary
*.jpg binary
*.jpeg binary
*.crt
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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/
build
dist

# swc
.swc

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# turbo
.turbo

# IDE specifics
.idea
.vscode
storybook-static
22 changes: 22 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo "pnpm install started"
pnpm install --frozen-lockfile
echo "pnpm ended ended"

echo "pnpm format started"
pnpm format
echo "pnpm format ended"

echo "pnpm lint started"
pnpm lint
echo "pnpm lint ended"

echo "pnpm check-types started"
pnpm check-types
echo "pnpm check-types ended"

echo "pnpm test started"
pnpm test
echo "pnpm test ended"
11 changes: 11 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
engine-strict=true

# https://pnpm.io/npmrc#save-workspace-protocol
save-workspace-protocol=rolling

# https://pnpm.io/npmrc#save-prefix
save-prefix='~'

registry=https://artifactory.srv.westpac.com.au/artifactory/api/npm/A0033F_WestpacLive_npm_virtual
cafile=~/.npm/wbc-ssl-ca-trust.pem
strict-ssl=false
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
coverage
.next
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true,
"arrowParens": "avoid"
}
133 changes: 133 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Core Library Web repository

This repository provides tools (packages) to help developers build web apps.

The strategy used is a monorepo provided by [TurboRepo](https://turbo.build/repo), which allows us to condense multiple projects within a single repository. Each project within this monorepo is referenced as a `workspace`.

This turborepo requires [NodeJS](https://nodejs.org/) version 18 or higher and uses [pnpm](https://pnpm.io) as a package manager.

## Folders structure

There are 2 main folders on this monorepo:

- apps
- packages

The `apps` folder should contain workspaces for launchable apps, like Next.js, React, Angular, etc. However, this monorepo will have dummy non deployable apps for testing purposes only.

The `packages` folder should contain workspaces for packages that are used by either an app or another package.

This monorepo focuses solemnly on holding projects in the `packages` folder, allowing dummy projects in the `apps` folder to be used for testing purposes or demos only.

### Utilities

This turborepo has some additional tools already setup for you:

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
- [Changesets](https://github.com/changesets/changesets/tree/main#readme) for managing versioning and changelogs
- [Husky](https://typicode.github.io/husky/) for git hooks

### Packages

- [eslint-config-westpac-x-lint](packages/eslint-config-westpac-x-lint/README.md): Westpac `eslint` configuration.
- [test-config](packages/test-config/README.md): default configs for `jest` and `vitest` (testing libraries).
- [ts-config](packages/ts-config/README.md): default `TypeScript` configuration files.
- [fetcher](packages/fetcher/README.md): http wrapper for `Fetch API`
- [app-dynamics](packages/app-dynamics/README.md): wrapper for `App Dynamics`
- [analytics](packages/analytics/README.md): wrapper for `Adobe Analytics`

### Git Hooks

This monorepo uses a `pre-push` git hook to ensure a set of commands are executed prior to pushing code to the remote repository. You can see the list of commands in the `.husky` folder.

## Getting started

After cloning this repository, you can install all the dependencies by running the following command:

```
pnpm i --frozen-lockfile
```

The `--frozen-lockfile` will not modify the `pnpm-lock.yaml` file.

## Commands

### Build

To build all apps and packages, run the following command:

```
pnpm build
```

### Test

To test all apps and packages, run the following command:

```
pnpm test
```

### Lint

To lint all apps and packages, run the following command:

```
pnpm lint
```

You can allow `eslint` to try to fix issues automatically by running the following command:

```
pnpm lint:fix
```

### Format

To format all apps and packages files, run the following command:

```
pnpm format
```

You can allow `prettier` to try to fix issues automatically by running the following command:

```
pnpm format:fix
```

### Filtering workspaces

In order to run a command in a single workspace, use the `--filter` parameter

The command below lints the my-package and my-app workspaces only:

```
pnpm --filter my-package --filter my-app lint
```

### Scaffolding a new package

This monorepo uses default templates to generate new packages.

You can create a new package by running the following command:

```
pnpm new:package
```

The above command will prompt you with the details about the new package.

### Creating new versions of the packages

We are using https://github.com/changesets/changesets to manage the package versioning and changelogs.

#### Steps to follow

- To generate a new changeset, run `pnpm changeset` in the root of the repository.
- Run `pnpm changeset version`. This will increment the versions of packages.
- Run `pnpm install`. This will update the lockfile and rebuild packages.
- Commit the changes.
- Create a pull request.
4 changes: 4 additions & 0 deletions apps/playground-app-ui/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['@westpac-x/eslint-config/nextjs'],
};
109 changes: 109 additions & 0 deletions apps/playground-app-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# playground-app-ui

## 0.1.13

### Patch Changes

- Updated dependencies
- @westpac-x/theme@1.0.0
- @westpac-x/ui@1.0.0

## 0.1.12

### Patch Changes

- Updated dependencies
- @westpac-x/ui@0.12.0

## 0.1.11

### Patch Changes

- Updated dependencies
- @westpac-x/ui@0.11.0

## 0.1.10

### Patch Changes

- Updated dependencies
- @westpac-x/ui@0.10.0

## 0.1.9

### Patch Changes

- Updated dependencies
- @westpac-x/ui@0.9.0

## 0.1.8

### Patch Changes

- Updated dependencies [f1d1124]
- Updated dependencies
- @westpac-x/ui@0.8.0

## 0.1.7

### Patch Changes

- Updated dependencies
- @westpac-x/ui@0.7.0

## 0.1.6

### Patch Changes

- Updated dependencies [b7f18ec]
- @westpac-x/ui@0.6.0

## 0.1.5

### Patch Changes

- Updated dependencies
- @westpac-x/ui@0.5.0

## 0.1.4

### Patch Changes

- Updated dependencies [5b9661f]
- @westpac-x/ui@0.4.0

## 0.1.3

### Patch Changes

- Updated dependencies
- @westpac-x/ui@0.3.0

## 0.1.2

### Patch Changes

- Updated dependencies
- @westpac-x/theme@0.2.2
- @westpac-x/ui@0.2.2

## 0.1.1

### Patch Changes

- Updated dependencies [2a405e7]
- @westpac-x/theme@0.2.1
- @westpac-x/ui@0.2.1

## 0.1.0

### Minor Changes

- 42b6ea9: initial stage of ui package

### Patch Changes

- Updated dependencies [42b6ea9]
- Updated dependencies [98a06c0]
- @westpac-x/ui@0.2.0
- @westpac-x/theme@0.2.0
9 changes: 9 additions & 0 deletions apps/playground-app-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# App Dynamics Example Application

This project is an example project to show how to consume the `@westpact-x/ui` package from this monorepo.

> Although this sample project is within this monorepo, please consider it as an external project that consumes packages from this monorepo.
Observe that this project uses the following packages:

- @westpac-x/ui
Loading

0 comments on commit 5712ef5

Please sign in to comment.