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

feat: migrate to nx workspace #1483

Draft
wants to merge 21 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 15 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
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {}
}
86 changes: 0 additions & 86 deletions .eslintrc.js

This file was deleted.

53 changes: 53 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
40 changes: 37 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
node_modules/
pattern_exports/
.DS_Store
Thumbs.db
.nyc_output/
.idea/
.env
packages/core/test/public
packages/*/public
!packages/core/test/patterns/public/.gitkeep
!packages/core/test/patterns/testDependencyGraph.json
lerna-debug.log
packages/edition-node-gulp/dependencyGraph.json
packages/uikit-workshop/dist
.yarn

yarn-error.log

# compiled output
dist
tmp
/out-tsc

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
.env

# System Files
.DS_Store
Thumbs.db

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# npx --no-install commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install pretty-quick --staged
# npx --no-install pretty-quick --staged
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
**/*.json
**/README.md
**/node_modules/
**/bower_components/
Expand All @@ -9,9 +8,10 @@ packages/core/scripts/api.handlebars
packages/core/scripts/events.handlebars
packages/core/test/files/annotations.js
packages/**/annotations.js
*.json
*.md
**/reset.scss
**/_meta/_head.*
**/_meta/_foot.*
**/development-edition*/source/_patterns/**
/dist
/coverage
7 changes: 6 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"singleQuote": true,
"endOfLine": "auto"
"endOfLine": "auto",
"trailingComma": "all",
"printWidth": 112,
"arrowParens": "always",
"useTabs": false,
"tabWidth": 2
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["editorconfig.editorconfig", "henrynguyen5-vsc.vsc-nvm"]
"recommendations": ["editorconfig.editorconfig", "henrynguyen5-vsc.vsc-nvm", "firsttris.vscode-jest-runner"]
}
3 changes: 0 additions & 3 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@

# uikit-workshop owner
/packages/uikit-workshop @sghoweri

# engine-nunjucks owner
/packages/engine-nunjucks @danwhite85
27 changes: 0 additions & 27 deletions babel.config.js

This file was deleted.

1 change: 1 addition & 0 deletions dev/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn.lock
17 changes: 17 additions & 0 deletions dev/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/@pattern-lab/**"
]
},
"private": true,
"scripts": {
"preview:hbs": "cd packages/development-edition-engine-handlebars && yarn pl:starterkit && yarn pl:build",
"preview:twig": "cd packages/development-edition-engine-twig && yarn pl:starterkit && yarn pl:build",
"preview:twig-php": "cd packages/development-edition-engine-twig-php && yarn pl:starterkit && yarn pl:build",
"postinstall": "yarn preview:hbs && yarn preview:twig"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Thumbs.db
.idea/
public
dependencyGraph.json
source
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"pl:help": "patternlab --help",
"pl:install": "patternlab install --config ./patternlab-config.json",
"pl:serve": "patternlab serve --config ./patternlab-config.json",
"pl:starterkit": "patternlab add --starterkits @pattern-lab/starterkit-handlebars-demo",
"pl:version": "patternlab --version",
"dev": "node ./node_modules/@pattern-lab/uikit-workshop/build-tools.js"
"pl:starterkit": "patternlab install --starterkits @pattern-lab/starterkit-handlebars-demo",
"pl:version": "patternlab --version"
},
"keywords": [
"Pattern Lab",
Expand All @@ -29,12 +28,12 @@
"node": ">=14.21.1"
},
"dependencies": {
"@pattern-lab/cli": "^6.0.1",
"@pattern-lab/core": "^6.0.1",
"@pattern-lab/engine-handlebars": "^6.0.0",
"@pattern-lab/engine-mustache": "^6.0.0",
"@pattern-lab/plugin-tab": "^6.0.0",
"@pattern-lab/starterkit-handlebars-demo": "^6.0.0",
"@pattern-lab/uikit-workshop": "^6.0.1"
"@pattern-lab/cli": "file:../../../dist/packages/cli",
"@pattern-lab/core": "file:../../../dist/packages/core",
"@pattern-lab/engine-handlebars": "file:../../../dist/packages/engine-handlebars",
"@pattern-lab/engine-mustache": "file:../../../dist/packages/engine-mustache",
"@pattern-lab/plugin-tab": "file:../../../dist/packages/plugin-tab",
"@pattern-lab/starterkit-handlebars-demo": "file:../../../dist/packages/starterkit-handlebars-demo",
"@pattern-lab/uikit-workshop": "file:../../../dist/packages/uikit-workshop"
}
}
43 changes: 43 additions & 0 deletions dev/packages/development-edition-engine-twig-php/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "@pattern-lab/development-edition-engine-twig-php",
"private": true,
"version": "6.0.1",
"description": "The tree of components we use to test, develop and validate the twig engine (not engine-twig-php)",
"scripts": {
"pl:build": "patternlab build --config ./patternlab-config.json",
"pl:help": "patternlab --help",
"pl:install": "patternlab install --config ./patternlab-config.json",
"pl:serve": "patternlab serve --config ./patternlab-config.json",
"pl:starterkit": "patternlab install --starterkits @pattern-lab/starterkit-twig-demo",
"pl:version": "patternlab --version"
},
"keywords": [
"Pattern Lab",
"Atomic Web Design",
"Node",
"Twig",
"Edition"
],
"author": "Ringo De Smet",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/pattern-lab/patternlab-node.git"
},
"engines": {
"node": ">=14.21.1"
},
"dependencies": {
"@pattern-lab/cli": "file:../../../dist/packages/cli",
"@pattern-lab/core": "file:../../../dist/packages/core",
"@pattern-lab/engine-twig-php": "file:../../../dist/packages/engine-twig-php",
"@pattern-lab/engine-mustache": "file:../../../dist/packages/engine-mustache",
"@pattern-lab/starterkit-twig-demo": "file:../../../dist/packages/starterkit-twig-demo",
"@pattern-lab/uikit-workshop": "file:../../../dist/packages/uikit-workshop"
},
"workspaces": {
"nohoist": [
"**/@pattern-lab/starterkit-twig-demo"
]
}
}
Loading