-
Notifications
You must be signed in to change notification settings - Fork 234
chore: command orchestration #5791
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
base: barebones
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"overrides": [ | ||
{ | ||
"extends": ["plugin:jsonc/recommended-with-jsonc"], | ||
"files": ["*.json"], | ||
"parser": "jsonc-eslint-parser", | ||
"rules": { | ||
"jsonc/sort-keys": ["warn"] | ||
} | ||
}, | ||
{ | ||
"extends": ["plugin:jsonc/recommended-with-jsonc"], | ||
"files": ["package.json"], | ||
"parser": "jsonc-eslint-parser", | ||
"rules": { | ||
"jsonc/sort-keys": [ | ||
"warn", | ||
{ | ||
"hasProperties": ["type"], | ||
"order": [ | ||
"$schema", | ||
"name", | ||
"version", | ||
"private", | ||
"description", | ||
"license", | ||
"author", | ||
"maintainers", | ||
"contributors", | ||
"homepage", | ||
"repository", | ||
"bugs", | ||
"type", | ||
"exports", | ||
"main", | ||
"module", | ||
"browser", | ||
"man", | ||
"preferGlobal", | ||
"bin", | ||
"files", | ||
"directories", | ||
"scripts", | ||
"config", | ||
"sideEffects", | ||
"types", | ||
"typings", | ||
"workspaces", | ||
"resolutions", | ||
"dependencies", | ||
"bundleDependencies", | ||
"bundledDependencies", | ||
"peerDependencies", | ||
"peerDependenciesMeta", | ||
"optionalDependencies", | ||
"devDependencies", | ||
"keywords", | ||
"engines", | ||
"engineStrict", | ||
"os", | ||
"cpu", | ||
"publishConfig" | ||
], | ||
"pathPattern": "^$" | ||
}, | ||
{ | ||
"order": { "type": "asc" }, | ||
"pathPattern": "^(?!exports\\[).*" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"extends": ["./first-gen/.eslintrc.json"], | ||
"files": ["first-gen/**/*"] | ||
}, | ||
{ | ||
"extends": ["./second-gen/.eslintrc.json"], | ||
"files": ["second-gen/**/*"] | ||
} | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"root": true, | ||
"rules": { | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": ["warn", "error"] | ||
} | ||
], | ||
"no-debugger": 2 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "@adobe/spectrum-web-components-2nd-gen", | ||
"name": "@adobe/swc", | ||
"version": "0.0.1", | ||
"private": true, | ||
"description": "Second generation Spectrum Web Components with modern tooling and architecture", | ||
|
@@ -16,10 +16,10 @@ | |
}, | ||
"type": "module", | ||
"scripts": { | ||
"build": "yarn workspaces foreach --from '@swc/*' run build", | ||
"clean": "yarn workspaces foreach --from '@swc/*' run clean", | ||
"build": "yarn workspaces foreach --from '@swc/*' --recursive run build", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will force Yarn to traverse downstream dependents, rebuilding or cleaning even when nothing changed. Is this what we need? We can do caching or parallelisation here too. Let me know your setup |
||
"clean": "yarn workspaces foreach --from '@swc/*' --recursive run clean", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you just want to delete the SWC output you can avoid the cascading clean. You can just run this? yarn workspaces foreach --from '@swc/*' run clean |
||
"lint": "eslint . --ext .ts,.js,.json", | ||
"storybook": "yarn workspace @swc/components storybook", | ||
"start": "yarn workspace @swc/components storybook", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, wouldn't this also depend on core running in dev mode? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yarn start needs yarn build and yarn build will build the core as well as the second-gen/first-gen depending on what is required and that's enough to run the storybook There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but without There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may also want to get the CEM analyzer to run in |
||
"storybook:build": "yarn workspace @swc/components storybook:build", | ||
"test": "yarn workspace @swc/components test" | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is strictly a curiosity I had: can you explain why you chose
build-first-gen
over something likebuild:first-gen
? I've just seen the colon syntax more often, that's all.Sort of along these lines, if we went with the colon syntax instead, could we do something like:
Does the order of building first-gen or second-gen matter? I honestly don't know what order something like
yarn build:*
would build each project, so maybe this is not even a good idea! 😆