Skip to content
Open

Solution #10492

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: report
path: backstop_data
name: Test
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: report
path: backstop_data
29 changes: 29 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: report
path: backstop_data
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/node_modules
/dist
**/*.test.js
/node_modules
/dist
**/*.test.js
40 changes: 20 additions & 20 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"overrides": [
{
"files": "*.html",
"options": {
"parser": "html",
"insertPragma": false,
"endOfLine": "auto",
"singleAttributePerLine": true,
"htmlWhitespaceSensitivity": "ignore"
}
}
]
}
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"overrides": [
{
"files": "*.html",
"options": {
"parser": "html",
"insertPragma": false,
"endOfLine": "auto",
"singleAttributePerLine": true,
"htmlWhitespaceSensitivity": "ignore"
}
}
]
}
50 changes: 25 additions & 25 deletions backstopConfig.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
'use strict';

// https://github.com/garris/BackstopJS#advanced-scenarios

const backstop = require('@mate-academy/backstop-config');

const { basicScenario } = backstop;

const config = {
...backstop,
fileNameTemplate: '{scenarioLabel}',
viewports: [{
name: 'custom-size',
width: 200,
height: 50,
}],
scenarios: [
{
...basicScenario,
label: 'Entire document',
referenceUrl: basicScenario.referenceUrl + '/hello-world/',
}],
};

module.exports = config;
'use strict';
// https://github.com/garris/BackstopJS#advanced-scenarios
const backstop = require('@mate-academy/backstop-config');
const { basicScenario } = backstop;
const config = {
...backstop,
fileNameTemplate: '{scenarioLabel}',
viewports: [{
name: 'custom-size',
width: 200,
height: 50,
}],
scenarios: [
{
...basicScenario,
label: 'Entire document',
referenceUrl: basicScenario.referenceUrl + '/hello-world/',
}],
};
module.exports = config;
48 changes: 24 additions & 24 deletions checklist.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
- make sure all links work and test is present
- make sure there is an empty line at the end of the file ([find out why](https://evanhahn.com/newline-necessary-at-the-end-of-javascript-files/))
- elements of type block (e.g. `div`) are already 100% wide, there is no need to write this in styles
- after you open the tag, you have to add at least one more level of indentation before you close this tag

GOOD example:
```
<div>
<div>
some text
</div
</div>
```

BAD example:
```
<div>
<div>
some text
</div
</div>
```
- do not add extra files to the PR, use `git add <file_name>` instead of `git add .` or use `.gitignore` file ([gitignore](https://git-scm.com/docs/gitignore))
- check the [style guide](https://mate-academy.github.io/style-guides/htmlcss.html)
- make sure all links work and test is present
- make sure there is an empty line at the end of the file ([find out why](https://evanhahn.com/newline-necessary-at-the-end-of-javascript-files/))
- elements of type block (e.g. `div`) are already 100% wide, there is no need to write this in styles
- after you open the tag, you have to add at least one more level of indentation before you close this tag
GOOD example:
```
<div>
<div>
some text
</div
</div>
```
BAD example:
```
<div>
<div>
some text
</div
</div>
```
- do not add extra files to the PR, use `git add <file_name>` instead of `git add .` or use `.gitignore` file ([gitignore](https://git-scm.com/docs/gitignore))
- check the [style guide](https://mate-academy.github.io/style-guides/htmlcss.html)
60 changes: 30 additions & 30 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#!/usr/bin/env bash

DEST=$1

# Commit
echo "git add ${DEST} --force"
git add ${DEST} --force

echo "git commit -m \"make build\" --no-verify"
git commit -m "make build" --no-verify

# Push to gh-pages
echo "git push --delete origin gh-pages"
git push --delete origin gh-pages

echo "git subtree push --prefix ${DEST} origin gh-pages"
git subtree push --prefix ${DEST} origin gh-pages

# Clean up
echo "git reset --soft HEAD^"
git reset --soft HEAD^

echo "rm -rf ${DEST}"
rm -rf ${DEST}

echo "git reset -- ${DEST}"
git reset -- ${DEST}

echo "git checkout ./${DEST}"
git checkout ./${DEST}
#!/usr/bin/env bash
DEST=$1
# Commit
echo "git add ${DEST} --force"
git add ${DEST} --force
echo "git commit -m \"make build\" --no-verify"
git commit -m "make build" --no-verify
# Push to gh-pages
echo "git push --delete origin gh-pages"
git push --delete origin gh-pages
echo "git subtree push --prefix ${DEST} origin gh-pages"
git subtree push --prefix ${DEST} origin gh-pages
# Clean up
echo "git reset --soft HEAD^"
git reset --soft HEAD^
echo "rm -rf ${DEST}"
rm -rf ${DEST}
echo "git reset -- ${DEST}"
git reset -- ${DEST}
echo "git checkout ./${DEST}"
git checkout ./${DEST}
Loading
Loading