@newhighsco/press-start 2.0.0 → 2.0.4

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/README.md CHANGED
@@ -1,40 +1,14 @@
1
- # ⚡️ Press Start [![Github version](https://img.shields.io/github/v/release/newhighsco/press-start)](https://github.com/newhighsco/press-start/releases)
1
+ # ⚡️ Press Start [![NPM version](https://img.shields.io/npm/v/@newhighsco/press-start.svg)](https://npmjs.com/@newhighsco/press-start)
2
2
 
3
- Get a theme-able Next.js site up and running quickly
4
-
5
- ## Setup
6
-
7
- Install dependencies
3
+ [Chipset](https://chipset.newhighsco.re/) + Next.js site starter
8
4
 
9
- ```
10
- nvm install
11
- yarn install
12
- ```
5
+ ## Usage
13
6
 
14
- ## Run
15
-
16
- All project processes can be started using the following:
17
-
18
- ```
19
- yarn start
20
- ```
21
-
22
- ## Testing
23
-
24
- Runs all the automated QA tools
25
-
26
- This can be run using:
7
+ Get a theme-able Next.js site up and running quickly
27
8
 
28
9
  ```
29
- yarn test
10
+ npx create-next-app -e https://github.com/newhighsco/press-start --example-path template
30
11
  ```
31
12
 
32
- ## Build
33
-
34
- Generate a production build of the site using the following:
35
-
36
- ```
37
- yarn build
38
- ```
39
13
 
40
14
  ## [CHANGELOG](CHANGELOG.md)
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.0",
4
+ "version": "2.0.4",
5
5
  "author": "New High Score <hello@newhighsco.re>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -17,33 +17,32 @@
17
17
  "src"
18
18
  ],
19
19
  "scripts": {
20
- "postinstall": "yarn --cwd template install",
21
- "prestart": "yarn start:yalc",
20
+ "prepare": "yarn --cwd template install",
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
28
  "lint:js": "eslint --cache --ext .js,.json,.jsx,.mdx .",
29
29
  "lint:css": "stylelint '**/*.{css,scss}' --cache",
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.28.1"
39
38
  },
40
39
  "devDependencies": {
41
- "@commitlint/cli": "13.1.0",
42
- "@newhighsco/commitlint-config": "1.0.14",
40
+ "@commitlint/cli": "13.2.0",
41
+ "@newhighsco/commitlint-config": "1.0.15",
43
42
  "@newhighsco/editor-config": "1.1.2",
44
- "@newhighsco/eslint-config": "2.3.28",
43
+ "@newhighsco/eslint-config": "2.3.30",
45
44
  "@newhighsco/prettier-config": "2.0.14",
46
- "@newhighsco/release-config": "1.0.68",
45
+ "@newhighsco/release-config": "1.0.71",
47
46
  "@newhighsco/stylelint-config": "2.0.46",
48
47
  "eslint": "7.32.0",
49
48
  "husky": "7.0.2",
@@ -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": {
@@ -7,38 +7,39 @@ import { SiteContainer, ThemeProvider } from '@newhighsco/chipset'
7
7
  const AppPage = ({ Component, pageProps, theme, config, meta }) => {
8
8
  const { name, description, openGraphImage, twitterHandle, themeColor, logo } =
9
9
  config
10
+ const icon = logo?.vector || logo?.bitmap
10
11
  const url = process.env.NEXT_PUBLIC_SITE_URL
11
12
 
12
13
  meta = {
13
14
  ...meta,
14
- titleTemplate: `%s | ${name}`,
15
+ titleTemplate: name && `%s | ${name}`,
15
16
  description,
16
17
  openGraph: {
17
18
  site_name: name,
18
19
  type: 'website',
19
- images: [{ url: urlJoin(url, openGraphImage) }]
20
+ ...(openGraphImage && { images: [{ url: urlJoin(url, openGraphImage) }] })
20
21
  },
21
- twitter: {
22
+ twitter: twitterHandle && {
22
23
  cardType: 'summary',
23
24
  site: `@${twitterHandle}`,
24
25
  handle: `@${twitterHandle}`
25
26
  },
26
27
  additionalMetaTags: [
27
28
  ...(meta?.additionalMetaTags || []),
28
- { name: 'theme-color', content: themeColor }
29
- ],
29
+ themeColor && { name: 'theme-color', content: themeColor }
30
+ ].filter(Boolean),
30
31
  additionalLinkTags: [
31
32
  ...(meta?.additionalLinkTags || []),
32
- {
33
+ icon && {
33
34
  rel: 'icon',
34
- href: logo.vector
35
+ href: icon
35
36
  },
36
37
  {
37
38
  rel: 'sitemap',
38
39
  type: 'application/xml',
39
40
  href: '/sitemap.xml'
40
41
  }
41
- ]
42
+ ].filter(Boolean)
42
43
  }
43
44
 
44
45
  return (