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: add npx starter template #285

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
**/helpers
/packages/components/**
!/packages/components/scripts
packages/create-dbux/src/templates
/showcases/patternhub/pages/components/**
18 changes: 13 additions & 5 deletions .github/scripts/publish-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ echo "goto build-outputs"
cd build-outputs || exit 1

# TODO: Add other build as well
for PACKAGE in 'eslint-plugin' 'foundations' 'components' 'ngx-components' 'react-components' 'v-components' 'web-components'; do
for PACKAGE in 'create-dbux' 'foundations' 'components' 'ngx-components' 'react-components' 'v-components' 'web-components'; do
echo "Start $PACKAGE bundle:"

echo "🆚 Update Version"
npm version --no-git-tag-version "$VALID_SEMVER_VERSION" --workspace=@db-ui/"$PACKAGE"

if [[ $PACKAGE != 'foundations' && $PACKAGE != 'eslint-plugin' ]]; then
if [[ $PACKAGE != 'foundations' && $PACKAGE != 'eslint-plugin' && $PACKAGE != 'create-dbux' ]]; then
echo "🕵️‍ Set foundations dependency"
npm pkg set dependencies.@db-ui/foundations="$VALID_SEMVER_VERSION" --workspace=@db-ui/"$PACKAGE"
if [[ $PACKAGE != 'components' ]]; then
Expand All @@ -32,7 +32,11 @@ for PACKAGE in 'eslint-plugin' 'foundations' 'components' 'ngx-components' 'reac
fi

echo "📦 Create npm package"
npm pack --quiet --workspace=@db-ui/"$PACKAGE"
if [[ $PACKAGE == 'create-dbux' ]]; then
npm pack --quiet --workspace="$PACKAGE"
else
npm pack --quiet --workspace=@db-ui/"$PACKAGE"
fi
done

TAG="latest"
Expand All @@ -58,8 +62,12 @@ for REGISTRY in 'GITHUB' 'NPM'; do
fi

# TODO: Add other build as well
for PACKAGE in 'eslint-plugin' 'foundations' 'components' 'ngx-components' 'react-components' 'v-components' 'web-components'; do
for PACKAGE in 'create-dbux' 'foundations' 'components' 'ngx-components' 'react-components' 'v-components' 'web-components'; do
echo "⤴ Publish $PACKAGE with tag $TAG to $REGISTRY"
npm publish --tag "$TAG" db-ui-"$PACKAGE"-"$VALID_SEMVER_VERSION".tgz
if [[ $PACKAGE == 'create-dbux' ]]; then
npm publish --tag "$TAG" "$PACKAGE"-"$VALID_SEMVER_VERSION".tgz
else
npm publish --tag "$TAG" db-ui-"$PACKAGE"-"$VALID_SEMVER_VERSION".tgz
fi
done
done
1 change: 1 addition & 0 deletions .jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"**/__snapshots__/**",
"**/.next/**",
"**/.github/**",
"**/templates/**",
"**/next-showcase/components/**",
"**/patternhub/**/components/**",
"**/*-example/index.html",
Expand Down
Loading