diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c924c4d..c20ec58 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - build + - test - deploy build: @@ -15,11 +16,17 @@ build: script: - npm run build artifacts: - name: '$CI_JOB_ID' + name: "$CI_JOB_ID" paths: - ./public expire_in: 30 mins +prettier: + image: node:slim + stage: test + script: + - npm run prettier + deploy: image: dokku/ci-docker-image:latest stage: deploy diff --git a/.prettierignore b/.prettierignore new file mode 120000 index 0000000..3e4e48b --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +.gitignore \ No newline at end of file diff --git a/gatsby-config.js b/gatsby-config.js index 3de1cfa..54aa505 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -1,29 +1,29 @@ module.exports = { siteMetadata: { - title: 'Notes', - description: 'Notes and snippets and things', - author: 'TheOrangeOne', - siteUrl: 'https://notes.theorangeone.net' + title: "Notes", + description: "Notes and snippets and things", + author: "TheOrangeOne", + siteUrl: "https://notes.theorangeone.net", }, plugins: [ { - resolve: 'gatsby-theme-code-notes', + resolve: "gatsby-theme-code-notes", options: { - contentPath: 'notes', - basePath: '/', + contentPath: "notes", + basePath: "/", showThemeInfo: false, showDescriptionInSidebar: true, }, }, - 'gatsby-plugin-robots-txt', - 'gatsby-plugin-sitemap', - 'gatsby-plugin-sri', + "gatsby-plugin-robots-txt", + "gatsby-plugin-sitemap", + "gatsby-plugin-sri", { - resolve: 'gatsby-plugin-plausible', + resolve: "gatsby-plugin-plausible", options: { - domain: 'notes.theorangeone.net', - customDomain: 'elbisualp.theorangeone.net' - } - } + domain: "notes.theorangeone.net", + customDomain: "elbisualp.theorangeone.net", + }, + }, ], -} +}; diff --git a/notes/aws/cross-account-transfer.md b/notes/aws/cross-account-transfer.md index 4212eed..39ba284 100644 --- a/notes/aws/cross-account-transfer.md +++ b/notes/aws/cross-account-transfer.md @@ -12,15 +12,14 @@ emoji: 🪣 ```json { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": "*", - "Resource": "arn:aws:s3:::/*" - - } - ] + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": "*", + "Resource": "arn:aws:s3:::/*" + } + ] } ``` @@ -28,18 +27,16 @@ emoji: 🪣 ```json { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Principal": { - "AWS": "arn:aws:iam:::user/" - }, - "Action": "*", - "Resource": [ - "arn:aws:s3:::/*" - ] - } - ] + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam:::user/" + }, + "Action": "*", + "Resource": ["arn:aws:s3:::/*"] + } + ] } ``` diff --git a/notes/ffmpeg-remove-stream.md b/notes/ffmpeg-remove-stream.md index 1715193..5673edc 100644 --- a/notes/ffmpeg-remove-stream.md +++ b/notes/ffmpeg-remove-stream.md @@ -12,7 +12,6 @@ ls -1 *.mp4 | xargs -I{} ffmpeg -y -i {} -map 0 -map -0:a:0 -c copy /path/to/out `-map -0:a:0` removes the 0th audio stream. - - v - video, such as `-map -0:v` - a - audio, such as `-map -0:a` - s - subtitles, such as `-map -0:s` diff --git a/package-lock.json b/package-lock.json index 6f1bc73..7e7662c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,9 @@ "gatsby-theme-code-notes": "2.3.0", "react": "17.0.2", "react-dom": "17.0.2" + }, + "devDependencies": { + "prettier": "2.7.1" } }, "node_modules/@alexcarpenter/slugify": { diff --git a/package.json b/package.json index 9064521..4ff63a6 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "license": "MIT", "scripts": { "build": "gatsby clean && gatsby build", - "start": "gatsby develop" + "start": "gatsby develop", + "prettier": "prettier --write ." }, "dependencies": { "gatsby": "3.14.6", @@ -21,5 +22,8 @@ "repository": { "type": "git", "url": "https://github.com/RealOrangeOne/notes" + }, + "devDependencies": { + "prettier": "2.7.1" } } diff --git a/renovate.json b/renovate.json index cee4c0d..a086ad1 100644 --- a/renovate.json +++ b/renovate.json @@ -1,9 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base", - ":disableDependencyDashboard" - ], + "extends": ["config:base", ":disableDependencyDashboard"], "prHourlyLimit": 0, "prConcurrentLimit": 0 }