Skip to content

Commit 553924f

Browse files
committed
rename css folders
1 parent 3b371dc commit 553924f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+91
-2703
lines changed

.scripts/build-css.js

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
#!/usr/bin/env node
22

3-
const { promisify } = require('util');
4-
const { basename, dirname, format, relative, resolve } = require('path');
5-
const fs = require('fs');
3+
const { promisify } = require("util");
4+
const { basename, dirname, format, relative, resolve } = require("path");
5+
const fs = require("fs");
6+
7+
const dedent = require("dedent");
68

79
const readdir = promisify(fs.readdir);
810
const stat = promisify(fs.stat);
911
const readFile = promisify(fs.readFile);
1012
const writeFile = promisify(fs.writeFile);
1113

12-
const ENC = 'utf-8';
14+
const ENC = "utf-8";
1315

1416
const INLINE_REGEX = /(.*)\s*\/\/\s*inline\s*$/gimu;
1517
const DEFER_REGEX = /(.*)\s*\/\/\s*link\s*$/gimu;
1618
const INLINE_BLOCK_REGEX = /\/\/\s*>*\s*<{3,}\s*inline([\s\S]*?)\/\/\s*>{3,}.*/gimu;
1719
const DEFER_BLOCK_REGEX = /\/\/\s*>*\s*<{3,}\s*link([\s\S]*?)\/\/\s*>{3,}.*/gimu;
1820

1921
function genHeader(filename) {
20-
return `// THIS FILE IS AUTOGENERATED, DO NOT MODIFY!
21-
//
22-
// To change the contents of this file,
23-
// edit \`${filename}\`
24-
// and run \`npm run build:css\`.
25-
//
26-
// During development you can run \`npm run watch:css\`
27-
// to continuosly rebuild this file.
28-
//
29-
`;
22+
return dedent`
23+
// THIS FILE IS AUTOGENERATED, DO NOT MODIFY!
24+
//
25+
// To change the contents of this file,
26+
// edit \`${filename}\`
27+
// and run \`npm run build:css\`.
28+
//
29+
// During development you can run \`npm run watch:css\`
30+
// to continuosly rebuild this file.
31+
`;
3032
}
3133

3234
// <https://stackoverflow.com/a/45130990/870615>
@@ -36,41 +38,41 @@ async function getFiles(dir) {
3638
subdirs.map(async subdir => {
3739
const res = resolve(dir, subdir);
3840
return (await stat(res)).isDirectory() ? getFiles(res) : res;
39-
}),
41+
})
4042
);
4143
return files.reduce((a, f) => a.concat(f), []);
4244
}
4345

4446
(async function main() {
4547
try {
46-
const files = process.argv.length > 2 ? [process.argv[2]] : await getFiles('_sass');
48+
const files = process.argv.length > 2 ? [process.argv[2]] : await getFiles("_sass");
4749
await Promise.all(
48-
files.filter(f => f.endsWith('.pre.scss')).map(async file => {
50+
files.filter(f => f.endsWith(".pre.scss")).map(async file => {
4951
const content = await readFile(file, ENC);
50-
const name = basename(file, '.pre.scss');
51-
const filename = format({ name, ext: '.scss' });
52+
const name = basename(file, ".pre.scss");
53+
const filename = format({ name, ext: ".scss" });
5254
const dir = dirname(file);
5355

5456
const inline = content
55-
.replace(INLINE_REGEX, '$1')
56-
.replace(INLINE_BLOCK_REGEX, '$1')
57-
.replace(DEFER_REGEX, '// $1')
58-
.replace(DEFER_BLOCK_REGEX, '');
57+
.replace(INLINE_REGEX, "$1")
58+
.replace(INLINE_BLOCK_REGEX, "$1")
59+
.replace(DEFER_REGEX, "// $1")
60+
.replace(DEFER_BLOCK_REGEX, "");
5961

6062
const defer = content
61-
.replace(DEFER_REGEX, '$1')
62-
.replace(DEFER_BLOCK_REGEX, '$1')
63-
.replace(INLINE_REGEX, '// $1')
64-
.replace(INLINE_BLOCK_REGEX, '');
63+
.replace(DEFER_REGEX, "$1")
64+
.replace(DEFER_BLOCK_REGEX, "$1")
65+
.replace(INLINE_REGEX, "// $1")
66+
.replace(INLINE_BLOCK_REGEX, "");
6567

6668
const path = relative(resolve(), dirname(file));
67-
const header = genHeader([path, basename(file)].join('/'));
69+
const header = genHeader([path, basename(file)].join("/"));
6870

6971
return Promise.all([
70-
writeFile(resolve(dir, '__inline', filename), header + inline, ENC),
71-
writeFile(resolve(dir, '__link', filename), header + defer, ENC),
72+
writeFile(resolve(dir, ".__inline__", filename), header + "\n\n" + inline, ENC),
73+
writeFile(resolve(dir, ".__link__", filename), header + "\n\n" + defer, ENC),
7274
]);
73-
}),
75+
})
7476
);
7577
process.exit(0);
7678
} catch (e) {

_includes/styles/inline.scss

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,29 @@ $font-family: {{ site.font | default:"Noto Sans, Helvetica, Aria
2525
@import "my-variables";
2626
@import "mixins";
2727

28-
@import "pooleparty/__inline/base";
29-
@import "pooleparty/__inline/type";
30-
@import "pooleparty/__inline/table";
31-
@import "pooleparty/__inline/footer";
32-
@import "pooleparty/__inline/footnotes";
33-
@import "pooleparty/__inline/code";
34-
@import "pooleparty/__inline/posts";
35-
@import "pooleparty/__inline/related";
36-
@import "pooleparty/__inline/read-more";
37-
@import "pooleparty/__inline/message";
38-
@import "pooleparty/__inline/pagination";
28+
@import "pooleparty/.__inline__/base";
29+
@import "pooleparty/.__inline__/type";
30+
@import "pooleparty/.__inline__/table";
31+
@import "pooleparty/.__inline__/footer";
32+
@import "pooleparty/.__inline__/footnotes";
33+
@import "pooleparty/.__inline__/code";
34+
@import "pooleparty/.__inline__/posts";
35+
@import "pooleparty/.__inline__/related";
36+
@import "pooleparty/.__inline__/read-more";
37+
@import "pooleparty/.__inline__/message";
38+
@import "pooleparty/.__inline__/pagination";
3939

40-
@import "hydejack/__inline/base";
41-
@import "hydejack/__inline/utilities";
42-
@import "hydejack/__inline/links";
43-
@import "hydejack/__inline/images";
44-
@import "hydejack/__inline/sidebar";
45-
@import "hydejack/__inline/social";
46-
@import "hydejack/__inline/menu";
47-
@import "hydejack/__inline/content";
48-
@import "hydejack/__inline/avatar";
49-
@import "hydejack/__inline/katex";
50-
@import "hydejack/__inline/footer";
40+
@import "hydejack/.__inline__/base";
41+
@import "hydejack/.__inline__/utilities";
42+
@import "hydejack/.__inline__/links";
43+
@import "hydejack/.__inline__/images";
44+
@import "hydejack/.__inline__/sidebar";
45+
@import "hydejack/.__inline__/social";
46+
@import "hydejack/.__inline__/menu";
47+
@import "hydejack/.__inline__/content";
48+
@import "hydejack/.__inline__/avatar";
49+
@import "hydejack/.__inline__/katex";
50+
@import "hydejack/.__inline__/footer";
5151

5252
@import "my-inline";
5353
// @import "my-style";

_includes/styles/style.scss

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,35 @@ $font-family: {{ site.font | default:"Noto Sans, Helvetica, Aria
2828
@import "reboot-mod";
2929

3030
{% unless site.hydejack.no_inline_css or jekyll.environment == 'development' %}
31-
@import "pooleparty/__link/base";
32-
@import "pooleparty/__link/type";
33-
@import "pooleparty/__link/table";
34-
@import "pooleparty/__link/footer";
35-
@import "pooleparty/__link/footnotes";
36-
@import "pooleparty/__link/code";
37-
@import "pooleparty/__link/posts";
38-
@import "pooleparty/__link/related";
39-
@import "pooleparty/__link/read-more";
40-
@import "pooleparty/__link/message";
41-
@import "pooleparty/__link/pagination";
31+
@import "pooleparty/.__link__/base";
32+
@import "pooleparty/.__link__/type";
33+
@import "pooleparty/.__link__/table";
34+
@import "pooleparty/.__link__/footer";
35+
@import "pooleparty/.__link__/footnotes";
36+
@import "pooleparty/.__link__/code";
37+
@import "pooleparty/.__link__/posts";
38+
@import "pooleparty/.__link__/related";
39+
@import "pooleparty/.__link__/read-more";
40+
@import "pooleparty/.__link__/message";
41+
@import "pooleparty/.__link__/pagination";
4242

43-
@import "hydejack/__link/base";
44-
@import "hydejack/__link/utilities";
45-
@import "hydejack/__link/links";
46-
@import "hydejack/__link/images";
47-
@import "hydejack/__link/sidebar";
48-
@import "hydejack/__link/social";
49-
@import "hydejack/__link/menu";
50-
@import "hydejack/__link/content";
51-
@import "hydejack/__link/avatar";
52-
@import "hydejack/__link/katex";
53-
@import "hydejack/__link/footer";
43+
@import "hydejack/.__link__/base";
44+
@import "hydejack/.__link__/utilities";
45+
@import "hydejack/.__link__/links";
46+
@import "hydejack/.__link__/images";
47+
@import "hydejack/.__link__/sidebar";
48+
@import "hydejack/.__link__/social";
49+
@import "hydejack/.__link__/menu";
50+
@import "hydejack/.__link__/content";
51+
@import "hydejack/.__link__/avatar";
52+
@import "hydejack/.__link__/katex";
53+
@import "hydejack/.__link__/footer";
5454

5555
{% unless site.hydejack.no_mark_external or site.no_mark_external %}
56-
@import "hydejack/__link/mark-external";
56+
@import "hydejack/__link__/mark-external";
5757
{% endunless %}
5858
{% unless site.hydejack.no_break_layout %}
59-
@import "hydejack/__link/break-layout";
59+
@import "hydejack/__link__/break-layout";
6060
{% endunless %}
6161

6262
@import "syntax";

_sass/hydejack/__inline/_avatar.scss

Lines changed: 0 additions & 48 deletions
This file was deleted.

_sass/hydejack/__inline/_base.scss

Lines changed: 0 additions & 73 deletions
This file was deleted.

_sass/hydejack/__inline/_break-layout.scss

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)