gitorial-cli 2.1.0 → 2.1.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "gitorial-cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "CLI tools for building and maintaining Gitorial tutorials",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -3,11 +3,12 @@
3
3
  const { program } = require('commander');
4
4
  const { buildGitorial } = require('./commands/build-gitorial');
5
5
  const { buildMdbook } = require('./commands/build-mdbook');
6
+ const { version } = require('../package.json');
6
7
 
7
8
  program
8
9
  .name('gitorial-cli')
9
10
  .description('CLI tools for building and maintaining Gitorial tutorials')
10
- .version('2.0.0');
11
+ .version(version);
11
12
 
12
13
  program
13
14
  .command('build-gitorial')
@@ -1,5 +1,5 @@
1
1
  const monacoCss = `
2
- :root {
2
+ body.gitorial-has-editor {
3
3
  --content-max-width: 100% !important;
4
4
  }
5
5
 
@@ -10,22 +10,22 @@ const monacoCss = `
10
10
  }
11
11
 
12
12
  html,
13
- body {
13
+ body.gitorial-has-editor {
14
14
  height: 100%;
15
15
  }
16
16
 
17
- .page,
18
- .content,
19
- .chapter,
20
- .content main {
17
+ body.gitorial-has-editor .page,
18
+ body.gitorial-has-editor .content,
19
+ body.gitorial-has-editor .chapter,
20
+ body.gitorial-has-editor .content main {
21
21
  height: 100%;
22
22
  }
23
23
 
24
- .page {
24
+ body.gitorial-has-editor .page {
25
25
  overflow-x: hidden;
26
26
  }
27
27
 
28
- .nav-chapters {
28
+ body.gitorial-has-editor .nav-chapters {
29
29
  top: auto;
30
30
  margin: 10px;
31
31
  font-size: 2.5em;
@@ -35,11 +35,11 @@ body {
35
35
  border-radius: 5px;
36
36
  }
37
37
 
38
- .page {
38
+ body.gitorial-has-editor .page {
39
39
  max-width: none;
40
40
  }
41
41
 
42
- .content {
42
+ body.gitorial-has-editor .content {
43
43
  max-width: none;
44
44
  padding: 0;
45
45
  overflow-x: hidden;
@@ -65,6 +65,10 @@ body {
65
65
  margin-top: 1.4em;
66
66
  }
67
67
 
68
+ .gitorial-step-text > :first-child {
69
+ margin-top: 0.25em;
70
+ }
71
+
68
72
  .gitorial-step-text p {
69
73
  line-height: 1.6;
70
74
  }
@@ -1045,6 +1049,9 @@ const monacoSetup = `
1045
1049
  if (!containers.length) {
1046
1050
  return;
1047
1051
  }
1052
+ if (document.body) {
1053
+ document.body.classList.add('gitorial-has-editor');
1054
+ }
1048
1055
  containers.forEach((container) => {
1049
1056
  if (container.dataset.gitorialInitialized === 'true') {
1050
1057
  return;