@newhighsco/press-start 2.0.2 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newhighsco/press-start",
3
3
  "description": "Chipset + Next.js site starter by New High Score",
4
- "version": "2.0.2",
4
+ "version": "2.1.1",
5
5
  "author": "New High Score <hello@newhighsco.re>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -18,43 +18,42 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "prepare": "yarn --cwd template install",
21
- "prestart": "yarn start:yalc",
21
+ "prestart": "yalc publish && cd template && yalc link $npm_package_name",
22
22
  "start": "yarn --cwd template start",
23
- "prebuild": "yarn yalc",
23
+ "prebuild": "yarn format:deps",
24
24
  "build": "yarn --cwd template build",
25
25
  "serve": "yarn --cwd template serve",
26
26
  "test": "yarn lint",
27
27
  "lint": "npm-run-all --parallel lint:*",
28
- "lint:js": "eslint --cache --ext .js,.json,.jsx,.mdx .",
29
- "lint:css": "stylelint '**/*.{css,scss}' --cache",
28
+ "lint:js": "eslint --cache --ignore-path .gitignore --ext .js,.json,.jsx,.mdx .",
29
+ "lint:css": "stylelint '**/*.{css,scss}' --cache --ignore-path .gitignore",
30
+ "lint:deps": "cd template && yalc check",
30
31
  "format": "npm-run-all --parallel format:*",
31
32
  "format:js": "yarn lint:js --fix",
32
33
  "format:css": "yarn lint:css --fix",
33
- "yalc": "yalc publish && cd template && yalc add $npm_package_name",
34
- "yalc:check": "cd template && yalc check",
35
- "yalc:remove": "cd template && yalc remove $npm_package_name"
34
+ "format:deps": "cd template && yalc remove $npm_package_name && yarn unlink $npm_package_name && yarn install --check-files"
36
35
  },
37
36
  "dependencies": {
38
- "next-seo": "4.27.0"
37
+ "next-seo": "4.29.0"
39
38
  },
40
39
  "devDependencies": {
41
- "@commitlint/cli": "13.1.0",
42
- "@newhighsco/commitlint-config": "1.0.14",
40
+ "@commitlint/cli": "16.0.3",
41
+ "@newhighsco/commitlint-config": "1.0.21",
43
42
  "@newhighsco/editor-config": "1.1.2",
44
- "@newhighsco/eslint-config": "2.3.28",
45
- "@newhighsco/prettier-config": "2.0.14",
46
- "@newhighsco/release-config": "1.0.68",
47
- "@newhighsco/stylelint-config": "2.0.46",
48
- "eslint": "7.32.0",
49
- "husky": "7.0.2",
43
+ "@newhighsco/eslint-config": "2.3.57",
44
+ "@newhighsco/prettier-config": "2.0.16",
45
+ "@newhighsco/release-config": "1.1.4",
46
+ "@newhighsco/stylelint-config": "3.0.9",
47
+ "eslint": "8.7.0",
48
+ "husky": "7.0.4",
50
49
  "npm-run-all": "4.1.5",
51
- "prettier": "2.4.1",
52
- "semantic-release": "18.0.0",
53
- "stylelint": "13.13.1",
50
+ "prettier": "2.5.1",
51
+ "semantic-release": "18.0.1",
52
+ "stylelint": "14.2.0",
54
53
  "yalc": "1.0.0-pre.53"
55
54
  },
56
55
  "peerDependencies": {
57
- "next": "11.1.2"
56
+ "next": "12.0.8"
58
57
  },
59
58
  "commitlint": {
60
59
  "extends": [
@@ -69,7 +68,7 @@
69
68
  "husky": {
70
69
  "hooks": {
71
70
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
72
- "pre-commit": "yarn yalc:check && yarn lint"
71
+ "pre-commit": "yarn lint"
73
72
  }
74
73
  },
75
74
  "prettier": "@newhighsco/prettier-config",
@@ -85,6 +84,16 @@
85
84
  ],
86
85
  "baseBranches": [
87
86
  "main"
87
+ ],
88
+ "pathRules": [
89
+ {
90
+ "paths": [
91
+ "template/package.json"
92
+ ],
93
+ "extends": [
94
+ "@newhighsco"
95
+ ]
96
+ }
88
97
  ]
89
98
  },
90
99
  "stylelint": {
@@ -5,40 +5,47 @@ import { DefaultSeo } from 'next-seo'
5
5
  import { SiteContainer, ThemeProvider } from '@newhighsco/chipset'
6
6
 
7
7
  const AppPage = ({ Component, pageProps, theme, config, meta }) => {
8
- const { name, description, openGraphImage, twitterHandle, themeColor, logo } =
9
- config
10
- const url = process.env.NEXT_PUBLIC_SITE_URL
8
+ const {
9
+ name,
10
+ description,
11
+ openGraphImage,
12
+ twitterHandle,
13
+ themeColor,
14
+ logo,
15
+ url
16
+ } = config
17
+ const icon = logo?.vector || logo?.bitmap
11
18
 
12
19
  meta = {
13
20
  ...meta,
14
- titleTemplate: `%s | ${name}`,
21
+ titleTemplate: name && `%s | ${name}`,
15
22
  description,
16
23
  openGraph: {
17
24
  site_name: name,
18
25
  type: 'website',
19
- images: [{ url: urlJoin(url, openGraphImage) }]
26
+ ...(openGraphImage && { images: [{ url: urlJoin(url, openGraphImage) }] })
20
27
  },
21
- twitter: {
28
+ twitter: twitterHandle && {
22
29
  cardType: 'summary',
23
30
  site: `@${twitterHandle}`,
24
31
  handle: `@${twitterHandle}`
25
32
  },
26
33
  additionalMetaTags: [
27
34
  ...(meta?.additionalMetaTags || []),
28
- { name: 'theme-color', content: themeColor }
29
- ],
35
+ themeColor && { name: 'theme-color', content: themeColor }
36
+ ].filter(Boolean),
30
37
  additionalLinkTags: [
31
38
  ...(meta?.additionalLinkTags || []),
32
- {
39
+ icon && {
33
40
  rel: 'icon',
34
- href: logo.vector
41
+ href: icon
35
42
  },
36
43
  {
37
44
  rel: 'sitemap',
38
45
  type: 'application/xml',
39
46
  href: '/sitemap.xml'
40
47
  }
41
- ]
48
+ ].filter(Boolean)
42
49
  }
43
50
 
44
51
  return (