Skip to content

Commit 38867fb

Browse files
committed
Initial code. Based on impresscms-dev/[email protected]
1 parent 5183ece commit 38867fb

17 files changed

+10590
-2
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*.{js, ts}]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
lib/
3+
node_modules/

.eslintrc.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"plugins": [
3+
"jest",
4+
"@typescript-eslint"
5+
],
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:jest/recommended",
9+
"plugin:@typescript-eslint/recommended"
10+
],
11+
"parser": "@typescript-eslint/parser",
12+
"parserOptions": {
13+
"ecmaVersion": 9,
14+
"sourceType": "module",
15+
"project": "./tsconfig.json"
16+
},
17+
"rules": {
18+
"eslint-comments/no-use": "off",
19+
"import/no-namespace": "off",
20+
"no-unused-vars": "off",
21+
"@typescript-eslint/no-unused-vars": "error",
22+
"@typescript-eslint/explicit-member-accessibility": [
23+
"error",
24+
{
25+
"accessibility": "no-public"
26+
}
27+
],
28+
"@typescript-eslint/no-require-imports": "off",
29+
"@typescript-eslint/array-type": "error",
30+
"@typescript-eslint/await-thenable": "error",
31+
"@typescript-eslint/ban-ts-comment": "error",
32+
"camelcase": "off",
33+
"@typescript-eslint/explicit-function-return-type": [
34+
"error",
35+
{
36+
"allowExpressions": true
37+
}
38+
],
39+
"@typescript-eslint/func-call-spacing": [
40+
"error",
41+
"never"
42+
],
43+
"@typescript-eslint/no-array-constructor": "error",
44+
"@typescript-eslint/no-empty-interface": "error",
45+
"@typescript-eslint/no-extraneous-class": "error",
46+
"@typescript-eslint/no-for-in-array": "error",
47+
"@typescript-eslint/no-inferrable-types": "error",
48+
"@typescript-eslint/no-misused-new": "error",
49+
"@typescript-eslint/no-namespace": "error",
50+
"@typescript-eslint/no-non-null-assertion": "warn",
51+
"@typescript-eslint/no-unnecessary-qualifier": "error",
52+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
53+
"@typescript-eslint/no-useless-constructor": "error",
54+
"@typescript-eslint/no-var-requires": "error",
55+
"@typescript-eslint/prefer-for-of": "warn",
56+
"@typescript-eslint/prefer-function-type": "warn",
57+
"@typescript-eslint/prefer-includes": "error",
58+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
59+
"@typescript-eslint/promise-function-async": "error",
60+
"@typescript-eslint/require-array-sort-compare": "error",
61+
"@typescript-eslint/restrict-plus-operands": "error",
62+
"semi": "off",
63+
"@typescript-eslint/semi": [
64+
"error",
65+
"never"
66+
],
67+
"@typescript-eslint/type-annotation-spacing": "error",
68+
"no-useless-escape": "off",
69+
"import/no-anonymous-default-export": "off",
70+
"@typescript-eslint/no-explicit-any": "off",
71+
"@typescript-eslint/unbound-method": "off"
72+
},
73+
"env": {
74+
"node": true,
75+
"es6": true,
76+
"jest/globals": true
77+
}
78+
}

.gitignore

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
node_modules/
2+
build/
3+
4+
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# Diagnostic reports (https://nodejs.org/api/report.html)
14+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
15+
16+
# Runtime data
17+
pids
18+
*.pid
19+
*.seed
20+
*.pid.lock
21+
22+
# Directory for instrumented libs generated by jscoverage/JSCover
23+
lib-cov
24+
25+
# Coverage directory used by tools like istanbul
26+
coverage
27+
*.lcov
28+
29+
# nyc test coverage
30+
.nyc_output
31+
32+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33+
.grunt
34+
35+
# Bower dependency directory (https://bower.io/)
36+
bower_components
37+
38+
# node-waf configuration
39+
.lock-wscript
40+
41+
# Compiled binary addons (https://nodejs.org/api/addons.html)
42+
build/Release
43+
44+
# Dependency directories
45+
jspm_packages/
46+
47+
# TypeScript v1 declaration files
48+
typings/
49+
50+
# TypeScript cache
51+
*.tsbuildinfo
52+
53+
# Optional npm cache directory
54+
.npm
55+
56+
# Optional eslint cache
57+
.eslintcache
58+
59+
# Optional REPL history
60+
.node_repl_history
61+
62+
# Output of 'npm pack'
63+
*.tgz
64+
65+
# Yarn Integrity file
66+
.yarn-integrity
67+
68+
# dotenv environment variables file
69+
.env
70+
.env.test
71+
72+
# parcel-bundler cache (https://parceljs.org/)
73+
.cache
74+
75+
# next.js build output
76+
.next
77+
78+
# nuxt.js build output
79+
.nuxt
80+
81+
# vuepress build output
82+
.vuepress/dist
83+
84+
# Serverless directories
85+
.serverless/
86+
87+
# FuseBox cache
88+
.fusebox/
89+
90+
# DynamoDB Local files
91+
.dynamodb/
92+
93+
# OS metadata
94+
.DS_Store
95+
Thumbs.db
96+
97+
# Ignore built ts files
98+
__tests__/runner/*
99+
lib/**/*
100+
101+
.idea/

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
node_modules/

.prettierrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true,
7+
"trailingComma": "none",
8+
"bracketSpacing": false,
9+
"arrowParens": "avoid",
10+
"parser": "typescript"
11+
}

.whitesource

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"checkRunSettings": {
3+
"vulnerableCheckRunConclusionLevel": "failure"
4+
},
5+
"issueSettings": {
6+
"minSeverityLevel": "LOW"
7+
}
8+
}

README.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,65 @@
1-
# flattern-markdown-folder-structure-action
2-
GitHub action to flattern file structure with markdown data
1+
[![License](https://img.shields.io/github/license/impresscms-dev/flattern-markdown-folder-structure-action.svg)](LICENSE)
2+
[![GitHub release](https://img.shields.io/github/release/impresscms-dev/flattern-markdown-folder-structure-action.svg)](https://github.com/impresscms-dev/generate-php-project-classes-list-file-action/releases)
3+
4+
# Flatter MarkDown folder structure
5+
6+
GitHub action to flattern file structure with [MarkDown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) data.
7+
8+
## Usage
9+
10+
To use this action in your project, create workflow in your project similar to this code (Note: some parts and arguments needs to be altered):
11+
```yaml
12+
name: Generate documentation
13+
14+
on:
15+
push:
16+
17+
jobs:
18+
get_php_classes_list:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkouting project code...
22+
uses: actions/checkout@v2
23+
24+
- name: Install PHP
25+
uses: shivammathur/setup-php@master
26+
with:
27+
php-version: 8.1
28+
extensions: curl, gd, pdo_mysql, json, mbstring, pcre, session
29+
ini-values: post_max_size=256M
30+
coverage: none
31+
tools: composer:v2
32+
33+
- name: Install Composer dependencies (with dev)
34+
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
35+
36+
- name: Generating documentation...
37+
uses: impresscms-dev/[email protected]
38+
with:
39+
class_root_namespace: ImpressCMS\
40+
included_classes: ImpressCMS\**
41+
output_path: ./docs/
42+
43+
- name: Flattering documentation...
44+
uses: impresscms-dev/[email protected]
45+
with:
46+
path: ./docs/
47+
48+
- uses: actions/upload-artifact@v3
49+
with:
50+
name: my-artifact
51+
path: ./docs/
52+
```
53+
54+
## Arguments
55+
56+
This action supports such arguments (used in `with` keyword):
57+
| Argument | Required | Default value | Description |
58+
|-------------|----------|----------------------|-----------------------------------|
59+
| path | Yes | | Folder to flattern |
60+
61+
## How to contribute?
62+
63+
If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try [interactive GitHub tutorial](https://try.github.io).
64+
65+
If you found any bug or have some questions, use [issues tab](https://github.com/impresscms-dev/flattern-markdown-folder-structure-action/issues) and write there your questions.

action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Flattern Markdown files folder structure'
2+
description: "GitHub action to flattern file structure with markdown data"
3+
branding:
4+
icon: file-text
5+
color: orange
6+
7+
inputs:
8+
path:
9+
description: Folder to make flat
10+
required: true
11+
12+
runs:
13+
using: 'node16'
14+
main: 'dist/index.js'

dist/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)