-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #202 from DurhamAcademy/code-cleanup
Code cleanup
- Loading branch information
Showing
83 changed files
with
4,525 additions
and
2,899 deletions.
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,30 @@ | ||
// @ts-ignore | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
parserOptions: { | ||
parser: '@babel/eslint-parser', | ||
requireConfigFile: false, | ||
}, | ||
extends: ['@nuxtjs', 'plugin:nuxt/recommended', 'prettier'], | ||
plugins: ['prettier'], | ||
rules: { | ||
'prettier/prettier': ['error'], | ||
'no-console': 'off', | ||
'vue/html-indent': ['error', 4], | ||
'vue/singleline-html-element-content-newline': 0, | ||
'vue/component-name-in-template-casing': ['error', 'PascalCase'], | ||
'vue/valid-v-slot': [ | ||
'error', | ||
{ | ||
allowModifiers: true, | ||
}, | ||
], | ||
}, | ||
globals: { | ||
_: 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,50 @@ | ||
name: Build documentation | ||
|
||
on: | ||
push: | ||
branches: ["production", "testing", "code-cleanup"] | ||
workflow_dispatch: | ||
|
||
env: | ||
INSTANCE: 'Documentation/cid' | ||
ARTIFACT: 'webHelpCID2-all.zip' | ||
DOCKER_VERSION: '242.21870' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build docs using Documentation Docker builder | ||
uses: JetBrains/writerside-github-action@v4 | ||
with: | ||
instance: ${{ env.INSTANCE }} | ||
artifact: ${{ env.ARTIFACT }} | ||
docker-version: ${{ env.DOCKER_VERSION }} | ||
|
||
- name: Save artifact with build results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: | | ||
artifacts/${{ env.ARTIFACT }} | ||
artifacts/report.json | ||
retention-days: 7 | ||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: docs | ||
path: artifacts | ||
|
||
- name: Test documentation | ||
uses: JetBrains/writerside-checker-action@v1 | ||
with: | ||
instance: ${{ env.INSTANCE }} |
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,2 @@ | ||
Dockerfile | ||
compose.yaml |
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,15 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"quoteProps": "as-needed", | ||
"jsxSingleQuote": false, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": true, | ||
"arrowParens": "avoid", | ||
"endOfLine": "auto", | ||
"singleAttributePerLine": 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,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE categories | ||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/categories.dtd"> | ||
<categories> | ||
<category id="wrs" name="Writerside documentation" order="1"/> | ||
</categories> |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
|
||
<variables></variables> | ||
<build-profile instance="cid"> | ||
<variables> | ||
<noindex-content>true</noindex-content> | ||
</variables> | ||
</build-profile> | ||
|
||
</buildprofiles> |
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE instance-profile | ||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd"> | ||
|
||
<instance-profile id="cid" | ||
name="ChocoChip Internal Documentation" | ||
start-page="starter-topic.md"> | ||
|
||
<toc-element topic="starter-topic.md"/> | ||
<toc-element topic="Getting-Started.md"> | ||
<toc-element topic="Docker-Installation.md"/> | ||
<toc-element topic="Running-the-Website.md"/> | ||
</toc-element> | ||
<toc-element topic="Seasonal-Updates.md"> | ||
<toc-element topic="Components.md"/> | ||
</toc-element> | ||
</instance-profile> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,45 @@ | ||
# Components | ||
|
||
## Background | ||
|
||
When designing this software, we were faced with a problem. How do we allow for maximum customization year to year | ||
while still keeping the routine maintenance as low as possible? | ||
|
||
_Our solution: Custom Components._ | ||
|
||
Using Vue, we have created a selection of custom components that can be used just like any other HTML element when | ||
designing each years scouting page. You don't HAVE to use these, but you don't have a lot of time to figure out how | ||
to customize this software to fit your needs, these components make year to year changes much more cookie cutter. | ||
|
||
## Introduction to Components | ||
|
||
Navigate to the 'Components' directory inside your project. Notice how the components are organized. | ||
- Season specific components are labeled with the _year_ and then the _season's name_ (ex: 24-crescendo) | ||
- Components for the scouting page are in the 'scouting-components' folder | ||
- Other component folders are created to decrease clutter | ||
|
||
Open the SingleSelect.vue file inside the scouting-components folder | ||
|
||
Notice how components work: | ||
|
||
``` | ||
const props = defineProps<{ | ||
modelValue: number; | ||
options: Array<String>; | ||
}>(); | ||
const value = computed({ | ||
get() { | ||
return props.modelValue | ||
}, | ||
set(value) { | ||
emit('update:modelValue', value) | ||
}, | ||
}) | ||
``` | ||
|
||
Props are like parameters of a function. These allow you to provide data to the component. Meanwhile, the modelValue | ||
(the emit) acts like a return value of a function. This allows you to output data from the component back into a | ||
script you use it in. | ||
|
||
For the Single Select file, the options prop is used to define |
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,9 @@ | ||
# Docker Installation | ||
|
||
In order to run a database, which is necessary to run the website, you must first install Docker. Docker is an application we use which makes it easier to work with databases across different operating systems | ||
|
||
1. Install [Docker](https://www.docker.com/products/docker-desktop/) | ||
2. Find the "compose.yaml" file in your code editor | ||
3. Run line 91, `couch-db-setup:` | ||
|
||
Great! Now you are ready to start coding. |
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 @@ | ||
# Getting Started | ||
|
||
## Install the Project | ||
|
||
1. Navigate to the [ChocoChipScouting GitHub page](https://github.com/DurhamAcademy/ChocoChipScouting) | ||
2. Click the green "Code" button and copy the HTTPS url | ||
3. Go to WebStorm or your preferred code editor and import a project from VCS/GitHub | ||
4. Install [Node.js](https://nodejs.org/en) | ||
5. Once you are in your newly created project, open the terminal and run `npm install` in the project directory | ||
|
||
Nice! Now the project and it's dependencies are installed. |
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,8 @@ | ||
# Running the Website | ||
|
||
Awesome! You're all caught up. Now it is time to run the website for the first time. | ||
|
||
1. Navigate to the terminal inside your editor OR navigate to the project directory in your computer's terminal | ||
2. Run `npm run dev` to start the website | ||
|
||
That's it! Click the "Local" link and the website will open. It is as simple as that. |
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,3 @@ | ||
# Seasonal Updates | ||
|
||
Each season some tasks will need to be completed to update the scouting software to the new game. This section is intended to highlight what may need to be adjusted season to season and explain how to make those changes. |
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,79 @@ | ||
# About ChocoChip Internal Documentation | ||
|
||
<!--Documentation adds this topic when you create a new documentation project. | ||
You can use it as a sandbox to play with Documentation features, and remove it from the TOC when you don't need it anymore.--> | ||
|
||
## Add new topics | ||
You can create empty topics, or choose a template for different types of content that contains some boilerplate structure to help you get started: | ||
|
||
![Create new topic options](new_topic_options.png){ width=290 }{border-effect=line} | ||
|
||
## Write content | ||
%product% supports two types of markup: Markdown and XML. | ||
When you create a new help article, you can choose between two topic types, but this doesn't mean you have to stick to a single format. | ||
You can author content in Markdown and extend it with semantic attributes or inject entire XML elements. | ||
|
||
## Inject XML | ||
For example, this is how you inject a procedure: | ||
|
||
<procedure title="Inject a procedure" id="inject-a-procedure"> | ||
<step> | ||
<p>Start typing and select a procedure type from the completion suggestions:</p> | ||
<img src="completion_procedure.png" alt="completion suggestions for procedure" border-effect="line"/> | ||
</step> | ||
<step> | ||
<p>Press <shortcut>Tab</shortcut> or <shortcut>Enter</shortcut> to insert the markup.</p> | ||
</step> | ||
</procedure> | ||
|
||
## Add interactive elements | ||
|
||
### Tabs | ||
To add switchable content, you can make use of tabs (inject them by starting to type `tab` on a new line): | ||
|
||
<tabs> | ||
<tab title="Markdown"> | ||
<code-block lang="plain text">![Alt Text](new_topic_options.png){ width=450 }</code-block> | ||
</tab> | ||
<tab title="Semantic markup"> | ||
<code-block lang="xml"> | ||
<![CDATA[<img src="new_topic_options.png" alt="Alt text" width="450px"/>]]></code-block> | ||
</tab> | ||
</tabs> | ||
|
||
### Collapsible blocks | ||
Apart from injecting entire XML elements, you can use attributes to configure the behavior of certain elements. | ||
For example, you can collapse a chapter that contains non-essential information: | ||
|
||
#### Supplementary info {collapsible="true"} | ||
Content under a collapsible header will be collapsed by default, | ||
but you can modify the behavior by adding the following attribute: | ||
`default-state="expanded"` | ||
|
||
### Convert selection to XML | ||
If you need to extend an element with more functions, you can convert selected content from Markdown to semantic markup. | ||
For example, if you want to merge cells in a table, it's much easier to convert it to XML than do this in Markdown. | ||
Position the caret anywhere in the table and press <shortcut>Alt+Enter</shortcut>: | ||
|
||
<img src="convert_table_to_xml.png" alt="Convert table to XML" width="706" border-effect="line"/> | ||
|
||
## Feedback and support | ||
Please report any issues, usability improvements, or feature requests to our | ||
<a href="https://youtrack.jetbrains.com/newIssue?project=WRS">YouTrack project</a> | ||
(you will need to register). | ||
|
||
You are welcome to join our | ||
<a href="https://jb.gg/WRS_Slack">public Slack workspace</a>. | ||
Before you do, please read our [Code of conduct](https://plugins.jetbrains.com/plugin/20158-writerside/docs/writerside-code-of-conduct.html). | ||
We assume that you’ve read and acknowledged it before joining. | ||
|
||
You can also always email us at [[email protected]](mailto:[email protected]). | ||
|
||
<seealso> | ||
<category ref="wrs"> | ||
<a href="https://plugins.jetbrains.com/plugin/20158-writerside/docs/markup-reference.html">Markup reference</a> | ||
<a href="https://plugins.jetbrains.com/plugin/20158-writerside/docs/manage-table-of-contents.html">Reorder topics in the TOC</a> | ||
<a href="https://plugins.jetbrains.com/plugin/20158-writerside/docs/local-build.html">Build and publish</a> | ||
<a href="https://plugins.jetbrains.com/plugin/20158-writerside/docs/configure-search.html">Configure Search</a> | ||
</category> | ||
</seealso> |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd"> | ||
<vars> | ||
<var name="product" value="Writerside"/> | ||
</vars> |
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,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE ihp SYSTEM "https://resources.jetbrains.com/writerside/1.0/ihp.dtd"> | ||
|
||
<ihp version="2.0"> | ||
<topics dir="topics" web-path="topics"/> | ||
<images dir="images" web-path="images"/> | ||
<instance src="cid.tree"/> | ||
</ihp> |
Oops, something went wrong.