Skip to content

Commit

Permalink
Merge branch 'next' into feature/modern-template
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchgirl authored Feb 6, 2024
2 parents c8bfb98 + 330e286 commit 3496ce3
Show file tree
Hide file tree
Showing 588 changed files with 6,371 additions and 8,721 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ storybook-static/
.yarn/
project/
*.d.ts
packages/outline-cli/
packages/tools/outline-cli/
23 changes: 2 additions & 21 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ image:

tasks:
- init: |
yarn
nvm install
yarn
command: |
yarn start
Expand All @@ -13,30 +13,11 @@ vscode:
- bradlc.vscode-tailwindcss
- pranaygp.vscode-css-peek
- runem.lit-plugin
- silvenon.mdx
- unifiedjs.vscode-mdx
- streetsidesoftware.code-spell-checker

ports:
# Used by Storybook
- port: 6042
onOpen: open-preview
visibility: public

github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: false
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: true
45 changes: 45 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/sh

if [ "$LEFTHOOK" = "0" ]; then
exit 0
fi

call_lefthook()
{
dir="$(git rev-parse --show-toplevel)"
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/')

if lefthook -h >/dev/null 2>&1
then
lefthook "$@"
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
"$dir/node_modules/lefthook/bin/index.js" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook "$@"
elif yarn lefthook -h >/dev/null 2>&1
then
yarn lefthook "$@"
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook "$@"
elif command -v npx >/dev/null 2>&1
then
npx @evilmartians/lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
}

call_lefthook run "prepare-commit-msg" "$@"
4 changes: 1 addition & 3 deletions .lintstagedrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"eslint --rule 'no-console: error' --fix",
"prettier --write"
],
"*.{json,md}": [
"prettier --write"
]
"*.{json,md}": ["prettier --write"]
}
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ outline.theme.css
**/vars-*.css
*.d.ts
*.global.scoped.css

# Ignore all stories (Storybook) files:
**/*.stories.ts
3 changes: 1 addition & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"embeddedLanguageFormatting": "off"
"useTabs": false
}
18 changes: 9 additions & 9 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import { dirname, join } from 'path';

module.exports = {
stories: [
// Intentionally ordering welcome page first.
'../packages/outline-docs/src/guides/welcome.mdx',
'../packages/documentation/outline-docs/src/guides/welcome.mdx',
// Component development guides.
'../packages/outline-docs/src/guides/development/component-development/**/*.mdx',
'../packages/documentation/outline-docs/src/guides/development/component-development/**/*.mdx',
// Component usage guides.
'../packages/outline-docs/src/guides/consumers/**/*.mdx',
'../packages/documentation/outline-docs/src/guides/consumers/**/*.mdx',
// QA/UAT usage guides.
'../packages/outline-docs/src/guides/qa-uat/**/*.mdx',
'../packages/documentation/outline-docs/src/guides/qa-uat/**/*.mdx',
// Tooling usage guides.
'../packages/outline-docs/src/guides/tooling/**/*.mdx',
'../packages/documentation/outline-docs/src/guides/tooling/**/*.mdx',
// Documentation stories.
'../packages/outline-docs/src/guides/**/*.@(js|ts|mdx)',
'../packages/documentation/outline-docs/src/guides/**/*.@(js|ts|mdx)',
// Modern component stories.
'../packages/**/docs/*.mdx',
// Old component stories.
'../packages/outline-storybook/stories/**/*.stories.@(js|ts|mdx)',
'../packages/documentation/outline-storybook/stories/**/*.stories.@(js|ts|mdx)',
],
typescript: {
check: false,
Expand All @@ -26,11 +27,10 @@ module.exports = {
{
name: '@storybook/addon-essentials',
},
getAbsolutePath('@storybook/addon-mdx-gfm'),
],
features: {
storyStoreV7: true,
postcss: false,
postcss: true,
buildStoriesJson: true,
modernInlineRender: true,
},
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ outline init

Detailed information regarding how to contribute to Outline development, can be found in [CONTRIBUTING.md](./CONTRIBUTING.md). **Expect this information to be refined soon.**

Please see [./docs/README.md](./docs/README.md) for information about developing for Outline.
Please see [Component Development Guide](https://github.com/phase2/outline/tree/affc18d1a7ca6a304813f97f0563afcb6967a6ef/packages/documentation/outline-docs/src/guides/development/component-development) for information about developing for Outline.

[![Deploys by Netlify](https://www.netlify.com/v3/img/components/netlify-color-accent.svg 'Deploys by Netlify')](https://www.netlify.com)
17 changes: 17 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
#
pre-commit:
parallel: true
commands:
eslint:
glob: '*.{js,ts,jsx,tsx,mdx,cjs,mjs}'
run: yarn eslint {staged_files}
4 changes: 2 additions & 2 deletions outline.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const defaultConfig = require(`@phase2/outline-config/outline.config`);

// Used to process PostCSS plugins against Storybook specific styles.
const storybookPath = 'packages/outline-storybook/config';
const storybookPath = 'packages/documentation/outline-storybook/config';
const destBasePath = 'dist';
module.exports = {
...defaultConfig,
Expand All @@ -13,7 +13,7 @@ module.exports = {
},
],
fouc: {
enabled: false,
enabled: true,
dest: `${destBasePath}/fouc.css`,
},
},
Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@
"reset:root": "rimraf ./node_modules",
"reset:install": "yarn install",
"restart": "yarn reset && yarn start",
"start": "yarn storybook dev -p ${npm_package_storybook_port}",
"start": "yarn watch",
"storybook": "storybook",
"storybook:build": "storybook build",
"test": "turbo run test"
"test": "turbo run test",
"watch": "npm-run-all -p watch:*",
"watch:storybook": "yarn storybook dev -p ${npm_package_storybook_port}",
"watch:css": "node scripts/styles.mjs --watch"
},
"keywords": [
"web-components",
Expand All @@ -87,13 +90,12 @@
"@commitlint/cli": "^17.4.0",
"@commitlint/config-conventional": "^17.4.0",
"@open-wc/testing": "^3.0.0-next.2",
"@storybook/addon-actions": "^7.3.0",
"@storybook/addon-essentials": "^7.3.0",
"@storybook/addon-links": "^7.3.0",
"@storybook/addon-mdx-gfm": "^7.3.0",
"@storybook/addon-postcss": "^3.0.0-alpha.1",
"@storybook/web-components": "^7.3.0",
"@storybook/web-components-vite": "^7.3.0",
"@storybook/addon-actions": "^7.4.6",
"@storybook/addon-docs": "^7.4.6",
"@storybook/addon-essentials": "^7.4.6",
"@storybook/addon-links": "^7.4.6",
"@storybook/web-components": "^7.4.6",
"@storybook/web-components-vite": "^7.4.6",
"@types/estree": "^0.0.47",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
Expand All @@ -107,11 +109,12 @@
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-react": "^7.23.0",
"eslint-plugin-storybook": "^0.6.13",
"eslint-plugin-storybook": "^0.6.15",
"gaze": "^1.1.3",
"husky": "^8.0.3",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
"lefthook": "^1.5.2",
"lint-staged": "^10.5.4",
"lit-analyzer": "^1.2.1",
"lit-html": "^2.3.1",
Expand All @@ -129,12 +132,12 @@
"react-syntax-highlighter": "^15.5.0",
"rimraf": "^3.0.2",
"rsync": "^0.6.1",
"storybook": "^7.3.0",
"storybook": "^7.4.6",
"svgo": "^2.8.0",
"tailwindcss": "3.0.0",
"ts-lit-plugin": "^1.2.1",
"turbo": "^1.2.16",
"vite": "^3.0.0"
"vite": "^4.1.4"
},
"dependencies": {},
"bugs": {
Expand Down
36 changes: 36 additions & 0 deletions packages/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Packages

> The `packages` directory is setup in an organized fashion to help organize more efficient package releases.
## Notes on directory structure

The following describes how packages are organized.
This is open for adjustment based on future needs.

- Primary `outline-core-*` component packages live at the root of `packages/components`.
- Dated packages to `packages/components/@deprecated`.
- These packages are either completely deprecated or in need of an update for 2023 to our new `outline-core-*` format, and pass audits for a11y, and ensuring alignment with the (currently internal) Design Starter Kit.
- Controller packages live in `packages/controllers`.
- Deprecated controllers live in `packages/controllers/@deprecated`.
- Documentation related packages and components live in `packages/documentation`.
- Tooling related packages live in `packages/tools`.

## `yarn` workspaces

Yarn workspaces are a feature of [Yarn](https://yarnpkg.com/) that allows you to manage multiple packages within a single top-level, root package. It provides a convenient way to work on interdependent packages, making it easier to develop and test changes across multiple packages simultaneously. For more information, you can refer to the [Yarn workspaces documentation](https://yarnpkg.com/features/workspaces).

To define the workspaces in your project, you can use the `workspaces` field in your `package.json` file. This field should be an array of glob patterns that specify the directories containing your packages.

Here is an example of how the current workspaces are set up:

```json
"workspaces": [
"./packages/*",
"./packages/components/*",
"./packages/components/@deprecated/*",
"./packages/documentation/*",
"./packages/controllers/*",
"./packages/controllers/@deprecated/*",
"./packages/tools/*"
],
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @phase2/outline-accordion

## 0.1.7

### Patch Changes

- d00800e0: Sweeping shuffle to reorganize the packages directory.
- Updated dependencies [d00800e0]
- @phase2/outline-icon@0.1.5
- @phase2/outline-core@0.2.5

## 0.1.6

### Patch Changes
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@phase2/outline-accordion",
"version": "0.1.6",
"version": "0.1.7",
"description": "The Outline Components for the web accordion component",
"keywords": [
"outline components",
Expand All @@ -19,16 +19,17 @@
"repository": {
"type": "git",
"url": "https://github.com/phase2/outline.git",
"directory": "packages/outline-accordion"
"directory": "packages/components/@deprecated/outline-accordion"
},
"homepage": "https://github.com/phase2/outline/tree/next/packages/components/@deprecated/outline-accordion",
"license": "BSD-3-Clause",
"scripts": {
"build": "node ../../scripts/build.js",
"build": "node ../../../../scripts/build.js",
"package": "yarn publish"
},
"dependencies": {
"@phase2/outline-core": "^0.2.3",
"@phase2/outline-icon": "^0.1.4",
"@phase2/outline-core": "^0.2.5",
"@phase2/outline-icon": "^0.1.5",
"lit": "^2.3.1",
"tslib": "^2.1.0"
},
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../../../tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "./dist"
},
"include": ["index.ts", "src/**/*", "tests/**/*"],
"references": [{ "path": "../../../outline-core/tsconfig.build.json" }]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @phase2/outline-admin-links

## 0.1.8

### Patch Changes

- d00800e0: Sweeping shuffle to reorganize the packages directory.
- Updated dependencies [d00800e0]
- @phase2/outline-core@0.2.5

## 0.1.7

### Patch Changes

- Updated template literals

## 0.1.6

### Patch Changes
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3496ce3

Please sign in to comment.