Skip to content

Commit 233a246

Browse files
authored
Adapt remaining arcticicestudio "fade-out" changes (#18)
With the retirement of the "Arctic Ice Studio" personal & Nord project brand [1] various migrations to the `svengreb` GitHub account [2] of other projects were also completed within the last weeks. There are also changes in Nord projects like `nordtheme/web` that other projects depended on and can now be adapted as well. Therefore all Nord projects must adapt these changes which includes... - the migration and repository name change of `arcticicestudio/nord-docs`[2] - all references must be updated. - the migration of the `arcticicestudio/styleguide-git` repository to the `svengreb` "real-in-person" identity [3] - all references and used npm packages must be updated. - the migration of the `arcticicestudio/styleguide-javascript` repository to the `svengreb` "real-in-person" identity [4] - all references and used npm packages must be updated. - the migration of the `arcticicestudio/styleguide-markdown` repository to the `svengreb` "real-in-person" identity [5] - all references and used npm packages must be updated. [1]: https://github.com/orgs/nordtheme/discussions/183#retire-arctic-ice-studio-as-nord-brand [2]: nordtheme/web#241 [3]: svengreb/styleguide-git#12 [4]: svengreb/styleguide-javascript#88 [5]: svengreb/styleguide-markdown#63 GH-17
1 parent 1c88303 commit 233a246

17 files changed

+2063
-1703
lines changed

.eslintignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@ node_modules/
1111
# ESLint automatically applies ignore pattern for "dotfiles" by default to prevent accidentally lint over paths like
1212
# `.git` or any other critical paths.
1313
!**/.eslintrc.js
14-
!.remarkrc.js
15-
!lint-staged.config.js
16-
!prettier.config.js
14+
!.remarkrc.mjs

.eslintrc.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2016-present Sven Greb <[email protected]>
3-
* This source code is licensed under the MIT license found in the license file.
3+
* This source code is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license found in the license file.
44
*/
55

66
/**
@@ -12,7 +12,15 @@
1212
*/
1313
module.exports = {
1414
root: true,
15-
extends: ["@arcticicestudio/eslint-config-base", "@arcticicestudio/eslint-config-base/prettier"],
15+
extends: [
16+
"@svengreb/eslint-config-base",
17+
/*
18+
* Enable support for projects using Prettier.
19+
* Note that this must always be placed after the `@svengreb/eslint-config-base` preset to take precedence, otherwise it won't prevent errors
20+
* due to useless and possibly conflicting rules!
21+
*/
22+
"@svengreb/eslint-config-base/prettier",
23+
],
1624
overrides: [
1725
{
1826
files: ["*.js"],

.husky/pre-commit

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/sh
22

33
# Copyright (c) 2016-present Sven Greb <[email protected]>
4-
# This source code is licensed under the MIT license found in the license file.
4+
# This source code is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license found in the license file.
5+
6+
# Git "pre-commit" hook for husky.
7+
# References:
8+
# 1. https://github.com/typicode/husky
9+
# 2. https://git-scm.com/docs/githooks#_pre_commit
510

611
. "$(dirname "$0")/_/husky.sh"
712

.npmrc

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
# Configurations for npm.
55
# See https://docs.npmjs.com/cli/v7/configuring-npm/npmrc for more details.
66

7+
# Disable the vulnerability auditing and checks which includes often way too many false-positives, insignificant
8+
# problems that are only for local development, and many other warnings that are overhelming.
9+
# Use dedicated vulnerability tools instead to filter and identify issue that really impact the project.
10+
# References:
11+
# 1. https://docs.npmjs.com/cli/v9/commands/npm-audit
12+
audit=false
13+
714
# Only use a lockfile for single-consumer projects, like applications, but not for multi-consumer projects like
815
# libraries.
916
# It helps to pin dependency versions, improves the security through integrity checksums, prevents possible errors

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
**/*.png
99
.husky/_/
1010
node_modules/
11+
go.*

.remarkignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
# See https://github.com/unifiedjs/unified-engine/blob/HEAD/doc/ignore.md for more details.
66

77
node_modules/
8+
license

.remarkrc.js renamed to .remarkrc.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
* @see https://github.com/remarkjs/remark-lint
99
* @see https://remark.js.org
1010
*/
11-
module.exports = {
12-
plugins: ["@arcticicestudio/remark-preset-lint"],
11+
export default {
12+
plugins: ["@svengreb/remark-preset-lint"],
1313
};

cmd/srgb-to-hex/main.go

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// Forked from https://git.dim13.org/itermcolors.git/tree/main.go
2+
// Inspired by https://github.com/F1LT3R/itermcolors-to-hex/blob/master/index.js
3+
package main
4+
5+
import (
6+
"flag"
7+
"fmt"
8+
"io/ioutil"
9+
"math"
10+
"os"
11+
"path/filepath"
12+
"strings"
13+
"text/template"
14+
15+
"howett.net/plist"
16+
)
17+
18+
type Scheme struct {
19+
Name string
20+
Ansi0 Color `plist:"Ansi 0 Color"`
21+
Ansi1 Color `plist:"Ansi 1 Color"`
22+
Ansi2 Color `plist:"Ansi 2 Color"`
23+
Ansi3 Color `plist:"Ansi 3 Color"`
24+
Ansi4 Color `plist:"Ansi 4 Color"`
25+
Ansi5 Color `plist:"Ansi 5 Color"`
26+
Ansi6 Color `plist:"Ansi 6 Color"`
27+
Ansi7 Color `plist:"Ansi 7 Color"`
28+
Ansi8 Color `plist:"Ansi 8 Color"`
29+
Ansi9 Color `plist:"Ansi 9 Color"`
30+
Ansi10 Color `plist:"Ansi 10 Color"`
31+
Ansi11 Color `plist:"Ansi 11 Color"`
32+
Ansi12 Color `plist:"Ansi 12 Color"`
33+
Ansi13 Color `plist:"Ansi 13 Color"`
34+
Ansi14 Color `plist:"Ansi 14 Color"`
35+
Ansi15 Color `plist:"Ansi 15 Color"`
36+
Background Color `plist:"Background Color"`
37+
Badge Color `plist:"Badge Color"`
38+
Bold Color `plist:"Bold Color"`
39+
Cursor Color `plist:"Cursor Color"`
40+
CursorGuide Color `plist:"Cursor Guide Color"`
41+
CursorText Color `plist:"Cursor Text Color"`
42+
Foreground Color `plist:"Foreground Color"`
43+
Link Color `plist:"Link Color"`
44+
SelectedText Color `plist:"Selected Text Color"`
45+
Selection Color `plist:"Selection Color"`
46+
}
47+
48+
type Color struct {
49+
Alpha float64 `plist:"Alpha Component"`
50+
Red float64 `plist:"Red Component"`
51+
Green float64 `plist:"Green Component"`
52+
Blue float64 `plist:"Blue Component"`
53+
Space string `plist:"Color Space"`
54+
}
55+
56+
func (c Color) String() string {
57+
r := int(math.MaxUint8 * c.Red)
58+
g := int(math.MaxUint8 * c.Green)
59+
b := int(math.MaxUint8 * c.Blue)
60+
return fmt.Sprintf("#%02x%02x%02x", r, g, b)
61+
}
62+
63+
func name(s string) string {
64+
return strings.TrimSuffix(filepath.Base(s), filepath.Ext(s))
65+
}
66+
67+
func exitErr(code int, err error) {
68+
fmt.Println(err)
69+
os.Exit(code)
70+
}
71+
72+
func main() {
73+
file := flag.String("file", "", "Color scheme .itemcolors")
74+
tmpl := flag.String("tmpl", "scheme.tmpl", "Xresources template")
75+
out := flag.String("out", "-", "output")
76+
flag.Parse()
77+
78+
body, err := ioutil.ReadFile(*file)
79+
if err != nil {
80+
exitErr(1, err)
81+
}
82+
83+
var s Scheme
84+
if _, err := plist.Unmarshal(body, &s); err != nil {
85+
exitErr(1, err)
86+
}
87+
s.Name = name(*file)
88+
fd := os.Stdout
89+
90+
if *out != "-" {
91+
fd, err = os.Create(*out)
92+
if err != nil {
93+
exitErr(1, err)
94+
}
95+
}
96+
97+
t, err := template.ParseFiles(*tmpl)
98+
if err != nil {
99+
exitErr(1, err)
100+
}
101+
102+
if err := t.Execute(fd, s); err != nil {
103+
exitErr(1, err)
104+
}
105+
}
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
! Color scheme {{.Name}}
2+
*VT100*foreground: {{.Foreground}}
3+
*VT100*background: {{.Background}}
4+
*VT100*cursorColor: {{.Cursor}}
5+
! Black
6+
*VT100*color0: {{.Ansi0}}
7+
*VT100*color8: {{.Ansi8}}
8+
! Red
9+
*VT100*color1: {{.Ansi1}}
10+
*VT100*color9: {{.Ansi9}}
11+
! Green
12+
*VT100*color2: {{.Ansi2}}
13+
*VT100*color10: {{.Ansi10}}
14+
! Yellow
15+
*VT100*color3: {{.Ansi3}}
16+
*VT100*color11: {{.Ansi11}}
17+
! Blue
18+
*VT100*color4: {{.Ansi4}}
19+
*VT100*color12: {{.Ansi12}}
20+
! Magenta
21+
*VT100*color5: {{.Ansi5}}
22+
*VT100*color13: {{.Ansi13}}
23+
! Cyan
24+
*VT100*color6: {{.Ansi6}}
25+
*VT100*color14: {{.Ansi14}}
26+
! White
27+
*VT100*color7: {{.Ansi7}}
28+
*VT100*color15: {{.Ansi15}}
29+
! Bold
30+
*VT100*colorBD: {{.Bold}}
31+
!*colorIT:
32+
!*colorUL:

cmd/srgb-to-hex/templates/yml.tmpl

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "{{.Name}}"
2+
terminal:
3+
# nord4
4+
foreground: "{{.Foreground}}"
5+
# nord0
6+
background: "{{.Background}}"
7+
# nord4
8+
cursorColor: "{{.Cursor}}"
9+
colors:
10+
black:
11+
# nord0
12+
color0: "{{.Ansi0}}"
13+
# nord3
14+
color8: "{{.Ansi8}}"
15+
red:
16+
# nord11
17+
color1: "{{.Ansi1}}"
18+
# nord11
19+
color9: "{{.Ansi9}}"
20+
green:
21+
# nord14
22+
color2: "{{.Ansi2}}"
23+
# nord14
24+
color10: "{{.Ansi10}}"
25+
yellow:
26+
# nord13
27+
color3: "{{.Ansi3}}"
28+
# nord13
29+
color11: "{{.Ansi11}}"
30+
blue:
31+
# nord9
32+
color4: "{{.Ansi4}}"
33+
# nord9
34+
color12: "{{.Ansi12}}"
35+
magenta:
36+
# nord15
37+
color5: "{{.Ansi5}}"
38+
# nord15
39+
color13: "{{.Ansi13}}"
40+
cyan:
41+
# nord8
42+
color6: "{{.Ansi6}}"
43+
# nord7
44+
color14: "{{.Ansi14}}"
45+
white:
46+
# nord5
47+
color7: "{{.Ansi7}}"
48+
# nord6
49+
color15: "{{.Ansi15}}"
50+
font:
51+
bold: "{{.Bold}}"
52+
italic:
53+
underline:

go.mod

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module github.com/nordtheme/iterm2
2+
3+
go 1.15
4+
5+
require howett.net/plist v0.0.0-20201026045517-117a925f2150

go.sum

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
2+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
3+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
4+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
5+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
6+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
7+
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
8+
howett.net/plist v0.0.0-20201026045517-117a925f2150 h1:s7O/9fwMNd6O1yXyQ8zv+U7dfl8k+zdiLWAY8h7XdVI=
9+
howett.net/plist v0.0.0-20201026045517-117a925f2150/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=

lint-staged.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
module.exports = {
1111
"*.{itermcolors,json,svg}": "prettier --check --ignore-unknown --no-editorconfig",
12-
"*.js": ["eslint", "prettier --check --ignore-unknown --no-editorconfig"],
12+
"*.{js,mjs}": ["eslint", "prettier --check --ignore-unknown --no-editorconfig"],
1313
"*.md": ["remark --no-stdout", "prettier --check --ignore-unknown --no-editorconfig"],
1414
".husky/pre-*": "prettier --check --ignore-unknown --no-editorconfig",
1515
};

0 commit comments

Comments
 (0)