chore: reorganize docs apps (#7228)
* reorganize docs apps * add README * fix directory * add condition for old docs
This commit is contained in:
+10
-3
@@ -3,9 +3,16 @@
|
||||
list=""
|
||||
app="www/"
|
||||
path="../apps/$1/$2"
|
||||
exception="$path/$3"
|
||||
exceptions=("${@:3}")
|
||||
exceptionsCommand=""
|
||||
|
||||
for index in ${!exceptions[@]}
|
||||
do
|
||||
exceptionsCommand+="-not -path $path/${exceptions[$index]} "
|
||||
done
|
||||
|
||||
# get directories in content other than reference
|
||||
for i in `find $path -type d -maxdepth 1 -not -path $exception -not -path $path`
|
||||
for i in `find $path -type d -maxdepth 1 -not -path $path $exceptionsCommand`
|
||||
do
|
||||
if [ ${#list} -gt 0 ]; then
|
||||
list+=','
|
||||
@@ -13,7 +20,7 @@ do
|
||||
list+="\"$app${i#../}\""
|
||||
done
|
||||
#get files in content (not nested)
|
||||
for i in `find $path -type f -maxdepth 1 -not -path $exception`
|
||||
for i in `find $path -type f -maxdepth 1 $exceptionsCommand`
|
||||
do
|
||||
if [ ${#list} -gt 0 ]; then
|
||||
list+=','
|
||||
|
||||
@@ -4,14 +4,20 @@ list=""
|
||||
app="www/"
|
||||
path="../apps/$1/$2"
|
||||
alertLevel=$3
|
||||
exception="$path/$4"
|
||||
exceptions=("${@:4}")
|
||||
exceptionsCommand=""
|
||||
|
||||
for index in ${!exceptions[@]}
|
||||
do
|
||||
exceptionsCommand+="-not -path $path/${exceptions[$index]} "
|
||||
done
|
||||
|
||||
if [ ${#alertLevel} -eq 0 ]; then
|
||||
alertLevel="suggestion"
|
||||
fi
|
||||
|
||||
# get directories in content other than reference
|
||||
for i in `find $path -type d -maxdepth 1 -not -path $exception -not -path $path`
|
||||
for i in `find $path -type d -maxdepth 1 -not -path $path $exceptionsCommand`
|
||||
do
|
||||
if [ ${#list} -gt 0 ]; then
|
||||
list+=' '
|
||||
@@ -19,7 +25,7 @@ do
|
||||
list+="$app${i#../}"
|
||||
done
|
||||
#get files in content (not nested)
|
||||
for i in `find $path -type f -maxdepth 1 -not -path $exception`
|
||||
for i in `find $path -type f -maxdepth 1 $exceptionsCommand`
|
||||
do
|
||||
if [ ${#list} -gt 0 ]; then
|
||||
list+=' '
|
||||
|
||||
@@ -2,8 +2,9 @@ extends: existence
|
||||
message: "Avoid using first person (such as '%s')"
|
||||
link: https://medusajs.notion.site/Style-Guide-Docs-fad86dd1c5f84b48b145e959f36628e0#9f0dc7c440b841d3bfcb006df12c2652
|
||||
ignorecase: true
|
||||
level: error
|
||||
level: warning
|
||||
nonword: true
|
||||
scope: sentence
|
||||
tokens:
|
||||
- (?:^|\s)I\s
|
||||
- (?:^|\s)I,\s
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
extends: existence
|
||||
message: "Don't use end punctuation in headings."
|
||||
link: https://medusajs.notion.site/Style-Guide-Docs-fad86dd1c5f84b48b145e959f36628e0#a5043fc5f8bc4b0b84f3ba494f817e42
|
||||
nonword: true
|
||||
level: warning
|
||||
scope: heading
|
||||
action:
|
||||
name: edit
|
||||
params:
|
||||
- remove
|
||||
- '.?!'
|
||||
tokens:
|
||||
- '[a-z][.?!](?:\s|$)'
|
||||
@@ -4,7 +4,13 @@ level: error
|
||||
ignorecase: false
|
||||
tokens:
|
||||
- the [a-z]\w+ [mM]odule
|
||||
- the \w+ module
|
||||
- the [A-Z]\w+ module
|
||||
exceptions:
|
||||
- the custom module
|
||||
- the commerce module
|
||||
- the commerce module
|
||||
- the transpiled module
|
||||
- the main module
|
||||
- the same module
|
||||
- the other module
|
||||
- the referencing module
|
||||
- the link module
|
||||
@@ -7,4 +7,6 @@ tokens:
|
||||
- we
|
||||
- we'(?:ve|re)
|
||||
- us
|
||||
- let's
|
||||
- let's
|
||||
exceptions:
|
||||
- US
|
||||
@@ -0,0 +1,6 @@
|
||||
extends: existence
|
||||
message: "Consider removing or replacing %s with something else."
|
||||
level: warning
|
||||
ignorecase: true
|
||||
tokens:
|
||||
- 'you can'
|
||||
Reference in New Issue
Block a user