Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename directories to site and library #3550

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/testcafe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ jobs:
node-version: '16.x'
- name: Install latest dependencies
run: yarn upgrade
working-directory: aries-site
working-directory: site
- name: Log Git Repository
run: echo "$GITHUB_REPOSITORY"
# Tests are only run on headless Chrome
- name: Build and run e2e tests on Chrome
if: ${{ github.event.pull_request.head.repo.full_name == 'grommet/hpe-design-system' }}
run: yarn test:ci
working-directory: aries-site
working-directory: site
# Forked repo does not have access to APPLITOOLS_API_KEY
# Just run e2e tests but not snapshots
- name: Build and run e2e tests on Chrome, forked repo
if: ${{ github.event.pull_request.head.repo.full_name != 'grommet/hpe-design-system' }}
run: yarn test:fork
working-directory: aries-site
working-directory: site

batch-completion-notification:
needs: build-and-test
Expand Down
12 changes: 6 additions & 6 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__rootDir="$(CDPATH= cd "$($__dirname "${BASH_SOURCE[0]}")" && pwd)"

echo "..Running aries-site checks"
cd aries-site
echo "....Linting checks for aries-site"
echo "..Running site checks"
cd site
echo "....Linting checks for site"
npm run lint-fix
cd ${__rootDir}
echo "..Running aries-core checks"
cd aries-core
echo "....Linting checks for aries-core"
echo "..Running library checks"
cd library
echo "....Linting checks for library"
npm run lint-fix
cd ${__rootDir}
echo "Pre-commit checks completed."
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ NOTE: Things to be aware of while the TestCafe test suites are running.

Linting and end-to-end tests are run using husky.

#### aries-site
#### site

- There are pre-commit hooks in place that will run linting checks and
fixes. It will then run the test suites that we have in place for aries-site.
fixes. It will then run the test suites that we have in place for site.
- [TestCafe](https://devexpress.github.io/testcafe/documentation/getting-started/) is used as our end-to-end testing. While running the tests, your local browsers will open with TestCafe. During this time DO NOT CLOSE OR MINIMIZE YOUR BROWSER WINDOWS. The browser will need to stay in focus in order
to run and complete all of the test suites.
- The [tests will pause](https://github.com/DevExpress/testcafe/issues/1198) if they are not in focus which will lead to pre-commits taking much longer then needed.
- If your test suites are taking longer than 2.5 minutes, make sure your browser windows are in focus and running.

After the pre-commit checks are finished on aries-site, they will be run on aries-core.
After the pre-commit checks are finished on site, they will be run on library.

#### aries-core
#### library

- The pre-commit checks will run linting checks for aries-core.
- The pre-commit checks will run linting checks for library.

### Completed Pre-Commits

Expand Down
32 changes: 12 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,30 @@

[![Netlify Status](https://api.netlify.com/api/v1/badges/39e37d4a-4f9f-4946-8aeb-b8328b1821cd/deploy-status)](https://app.netlify.com/sites/keen-mayer-a86c8b/deploys) - https://design-system.hpe.design/

### Storybook

[![Netlify Status](https://api.netlify.com/api/v1/badges/e4cb8d72-f3c0-4490-a4d7-54273ac277ed/deploy-status)](https://app.netlify.com/sites/thirsty-shockley-2b7675/deploys) - http://storybook.hpe.design/

# Welcome to HPE Design System

Aries is a monorepo built from two modules.
This is a monorepo built from two modules.

1. aries-core
2. aries-site (For designers and developers. This is the documentation site for the HPE Design System.)
1. **site**: This is the documentation site for the HPE Design System.
2. **library**: This library contains templates that demonstrate best practices for how to compose atomic components together into reusable patterns. In some cases, the templates may graduate into formalized Grommet components. This library is a work in progress, and we'd greatly accept feedback about which templates are valuable.

The Monorepo is installed using [yarn](https://github.com/yarnpkg/yarn), and relies on [yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/).
The monorepo is installed using [yarn](https://github.com/yarnpkg/yarn), and relies on [yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/).

Packages are automatically linked together, meaning you can do cross-package work within the repo. woot-woot!

### Basic structure and configurations

```
aries/
aries-*/
src/js/
index.js
hpe-design-system/
site/ OR library/
package.json // package-specific deps and scripts
README.md // shown in npmjs.com. included in npm artifact

.eslintignore // eslint (linter) ignored directories/files
.eslintrc // eslint (linter) configuration based on @hpe/project-scripts
.gitignore // github's default node gitignore with customizations
.prettierrc.js // prettier (formatter) configuration based on @hpe/project-scripts
package.json // common dev deps and workspace-wide scripts WIP
package.json // common dev deps and workspace-wide scripts
README.md // workspace-wide information. shown in github
yarn.lock // the only lock file in the repo. all packages combined
```
Expand All @@ -46,22 +40,20 @@ yarn install

Running 'yarn install' anywhere in the monorepo hierarchy will always install ALL the modules in the workspaces.

Note: When installing, you may get and error saying "Integrity check failed for 'grommet' (computed integrity doesn't match our records...".
`aries-site` references the latest stable branch of grommet. Any new commits added to grommet's stable branch cause its SHA hash to be updated and become out of sync with the SHA in the yarn.lock file.
Note: When installing, you may get and error saying "Integrity check failed for 'grommet' (computed integrity doesn't match our records...".
`site` references the latest stable branch of grommet. Any new commits added to grommet's stable branch cause its SHA hash to be updated and become out of sync with the SHA in the yarn.lock file.

To fetch the latest grommet stable, remove yarn.lock and clean yarn cache, then yarn install. For example: `rm yarn.lock && yarn cache clean && yarn install`

Run aries-site in development mode:
Run site in development mode:

```
cd aries-site
cd site
yarn start
```

Running in production mode:

```
yarn build
yarn build && yarn next start
```


File renamed without changes.
4 changes: 2 additions & 2 deletions aries-core/package.json → library/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "aries-core",
"name": "library",
"version": "1.0.0",
"description": "Design System for HPE",
"license": "Apache-2.0",
Expand Down Expand Up @@ -29,7 +29,7 @@
},
"keywords": [
"aries",
"aries-core",
"library",
"accessibility",
"component",
"design system",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dotenv.config();

const repoURL = `https://${process.env.GH_TOKEN}@github.com/grommet/hpe-design-system.git`;

const localFolder = path.resolve('.tmp/aries-core');
const localFolder = path.resolve('.tmp/library');
const localDist = path.resolve('dist');

if (process.env.CI === 'true') {
Expand All @@ -22,6 +22,7 @@ if (process.env.CI === 'true') {
.then(() => git(localFolder).add(['--all', '.']))
.then(() => git(localFolder).commit('stable updated again'))
.then(() => git(localFolder).push('origin', 'stable'))
// eslint-disable-next-line max-len
.catch(err => console.error('failed: ', err)); // eslint-disable-line no-console
});
} else {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"husky": "^8.0.0"
},
"workspaces": [
"aries-core",
"aries-site"
"library",
"site"
],
"dependencies": {
"grommet": "https://github.com/grommet/grommet/tarball/stable",
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 9 additions & 7 deletions aries-site/README.md → site/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# HPE Design System Site

For HPE designers and developers, this is the documentation site for the HPE Design System.
For HPE designers and developers, this is the documentation site for the HPE Design System.

## Contributing Content

TODOs:

- Add background on markdown, .mdx files
- Include instructions for how to find and edit documentation
for templates, components, and any other MDX-based pages.
for templates, components, and any other MDX-based pages.

## Editing "What's New" Page

The ["What's New" page](https://design-system.hpe.design/whats-new) acts as a journal for which Design System stakeholders may
The ["What's New" page](https://design-system.hpe.design/whats-new) acts as a journal for which Design System stakeholders may
keep informed with the latest enhancements to the HPE Design System.

Contributors to the HPE Design System should share their contributions with
community members and stakeholders by adding a brief note about the contribution
Contributors to the HPE Design System should share their contributions with
community members and stakeholders by adding a brief note about the contribution
and hyperlinks to relevant content or GitHub issues

The "What's New" page can be found at [src/pages/whats-new.mdx](https://github.com/grommet/hpe-design-system/blob/master/aries-site/src/pages/whats-new.mdx).
- The file may be [edited directly](https://github.com/grommet/hpe-design-system/blob/master/aries-site/src/pages/whats-new.mdx) in GitHub.
The "What's New" page can be found at [src/pages/whats-new.mdx](https://github.com/grommet/hpe-design-system/blob/master/site/src/pages/whats-new.mdx).

- The file may be [edited directly](https://github.com/grommet/hpe-design-system/blob/master/site/src/pages/whats-new.mdx) in GitHub.
1. Enter edit mode
1. Make Markdown edits
1. Select "Preview changes" to ensure your edits appear as desired.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion aries-site/next.config.mjs → site/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import createTM from 'next-transpile-modules';
import createMDX from '@next/mdx';
import remarkGfm from 'remark-gfm';

const withTM = createTM(['aries-core']);
const withTM = createTM(['library']);
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions aries-site/package.json → site/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "aries-site",
"name": "site",
"version": "1.0.0",
"description": "Website documentation for HPE Design System",
"license": "Apache-2.0",
Expand All @@ -9,7 +9,7 @@
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@next/mdx": "^13.4.4",
"aries-core": "*",
"library": "*",
"next": "13.4.4",
"react-ga": "^2.7.0",
"react-syntax-highlighter": "^15.4.4",
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Loading