Skip to content

webservco/component-common

Repository files navigation

webservco/component-common

Common dependencies for component projects.


Component workflow

  • public
  • do not check anything else (no README, etc, make sure repo will be empty initially).

Set up project name

COMPONENT_NAME='COMPONENT_NAME';

Run customization commands (clone component-skeleton)

cd ~/p/webservco-components && \
git clone git@github.com:webservco/component-skeleton.git $COMPONENT_NAME && \
cd $COMPONENT_NAME && \
git remote set-url origin git@github.com:webservco/$COMPONENT_NAME.git && \
rm -f src/WebServCo/.gitignore && git add src/WebServCo && git commit -m 'Init src' && \
printf '%s\n' "# webservco/$COMPONENT_NAME" '' 'A PHP component/library.' '' '---' > README.md && \
sed -i -e "s|\"name\" : \"webservco/component-skeleton\"|\"name\" : \"webservco/$COMPONENT_NAME\"|g" composer.json && \
sed -i -e "s|name: component-skeleton|name: $COMPONENT_NAME|g" .ddev/config.yaml && \
git add README.md && \
git add composer.json && \
git commit -m 'Customize' && \
git push -u origin main && \
mkdir bin config public resources tests

Add code

Development

Only useful if one can not provide environment on local, otherwise it is more complex to work in this way.

# Customize
DOCKER_IMAGE_TAG="webservco-component-${COMPONENT_NAME}";
DOCKER_CONTAINER_NAME="webservco-component-${COMPONENT_NAME}-container";

# Download Docker configuration
svn export --force https://github.com/webservco/component-common.git/trunk/.docker

# Build and run
docker build --tag ${DOCKER_IMAGE_TAG} -f .docker/config/php84-cli-copy/Dockerfile .
docker run -it --rm --name ${DOCKER_CONTAINER_NAME} ${DOCKER_IMAGE_TAG} /bin/bash -c "composer check:phpcs"

# Cleanup
docker image rm ${DOCKER_IMAGE_TAG}

Add dependencies

Publish tag

Update index


Index

About

No description, website, or topics provided.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published