-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from justcoded/feat/LK-13133-setup-plop-docker
feat/LK-13133-setup-plop-docker
- Loading branch information
Showing
9 changed files
with
153 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
# tabs 4 spaces for makefiles | ||
[Makefile] | ||
indent_size = 4 | ||
indent_style = tab | ||
[*.mk] | ||
indent_size = 4 | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# phpstorm/netbeans/eclipse project files | ||
.idea | ||
.vscode | ||
nbproject | ||
.buildpath | ||
.project | ||
.settings | ||
|
||
# windows/Mac thumbnail cache | ||
Thumbs.db | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!--- BEGIN HEADER --> | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
--- | ||
<!--- END HEADER --> | ||
|
||
## [0.1.0](https://github.com/justcoded/dockerize-plop-js/compare/c11fb61e0409ea1d33490caa0d420a7768bd1286...v1.0.0) (2024-10-18) | ||
### Features | ||
|
||
* :building_construction: add docker & plop files | ||
* :memo: add changelog-config | ||
|
||
### Bug Fixes | ||
|
||
* :memo: plop console info | ||
|
||
|
||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:22.6.0 | ||
|
||
RUN mkdir /plop | ||
RUN mkdir /codebase | ||
RUN npm install -g plop tsx cross-env typescript | ||
COPY ./plop/* /plop | ||
|
||
|
||
CMD ['npm', 'run', 'plop'] | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
WORKDIR /plop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.PHONY: default chl chl-first | ||
|
||
default: | ||
@echo 'Plop helper from JustCoded' | ||
|
||
## | ||
# CHANGELOG vars and targets | ||
## | ||
CONV_CHL_IMAGE := justcoded/php-conventional-changelog:latest | ||
CONV_CHL_DR := docker run -it --rm --volume "$$PWD":/codebase ${CONV_CHL_IMAGE} bash | ||
CONV_CHL_CMD := conventional-changelog --config changelog-config.php | ||
|
||
## | ||
# @command chl Generate changelog based on conventional commits | ||
## | ||
chl: | ||
${CONV_CHL_DR} \ | ||
-c "${CONV_CHL_CMD}" | ||
|
||
## | ||
# @command chl-first Generate changelog based on conventional commits, first version | ||
## | ||
chl-first: | ||
${CONV_CHL_DR} \ | ||
-c "${CONV_CHL_CMD} --first-release" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,21 @@ | ||
# dockerize-plop-js | ||
# Dockerized Plop Repository | ||
|
||
This repository provides a Dockerized setup for [Plop.js](https://plopjs.com/), a micro-generator framework that helps you automate the creation of files and components in your projects. | ||
|
||
## Features | ||
|
||
- **Dockerized Environment**: Run Plop.js in a containerized environment. | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
- Docker installed on your machine. | ||
|
||
### Usage | ||
|
||
1. **Run the Docker image**: | ||
You can use the local image name for now, or once finalized, use the public image URL provided by GitHub Actions: | ||
```bash | ||
docker run --rm -it plop_plop | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* @see: https://github.com/marcocesarato/php-conventional-changelog/blob/main/docs/config.md | ||
*/ | ||
|
||
return [ | ||
'path' => 'CHANGELOG.md', | ||
'headerTitle' => 'Changelog', | ||
'headerDescription' => 'All notable changes to this project will be documented in this file. | ||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
---', | ||
'ignoreTypes' => ['build', 'chore', 'ci', 'docs', 'perf', 'refactor', 'revert', 'style', 'test', 'bug'], | ||
|
||
'hiddenHash' => true, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"scripts": { | ||
"plop": "cross-env NODE_OPTIONS='--import tsx' plop --plopfile=plopfile.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { NodePlopAPI } from 'plop'; | ||
|
||
|
||
export default function (plop: NodePlopAPI) { | ||
plop.setGenerator('Show README', { | ||
description: 'Show the content of README.md', | ||
actions: [ | ||
() => { | ||
console.log(` | ||
No real generators available. \n | ||
To use docker image, mount your plopfile sources in /plop directory.` | ||
); | ||
} | ||
] | ||
}); | ||
} |