@thegetty/quire-cli 1.0.0-rc.35 → 1.0.0-rc.36
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/CHANGELOG.md +36 -0
- package/README.md +9 -0
- package/bin/cli.js +19 -1
- package/package.json +21 -8
- package/patches/README.md +19 -0
- package/patches/install-npm-version+1.0.9.patch +12119 -0
- package/schemas/objects.schema.json +12 -38
- package/schemas/publication.schema.json +0 -22
- package/schemas/references.schema.json +0 -1
- package/src/Command.js +26 -6
- package/src/Command.spec.js +99 -0
- package/src/commands/README.md +213 -122
- package/src/commands/build.js +46 -37
- package/src/commands/build.spec.js +113 -0
- package/src/commands/build.test.js +402 -0
- package/src/commands/clean.js +25 -19
- package/src/commands/clean.spec.js +108 -0
- package/src/commands/clean.test.js +260 -0
- package/src/commands/config.js +251 -0
- package/src/commands/config.spec.js +107 -0
- package/src/commands/config.test.js +715 -0
- package/src/commands/create.js +42 -14
- package/src/commands/create.spec.js +112 -0
- package/src/commands/create.test.js +415 -0
- package/src/commands/epub.js +59 -30
- package/src/commands/epub.spec.js +114 -0
- package/src/commands/epub.test.js +503 -0
- package/src/commands/index.js +9 -2
- package/src/commands/info.js +18 -24
- package/src/commands/info.spec.js +64 -0
- package/src/commands/info.test.js +415 -0
- package/src/commands/pdf.js +58 -84
- package/src/commands/pdf.spec.js +114 -0
- package/src/commands/pdf.test.js +464 -0
- package/src/commands/preview.js +26 -31
- package/src/commands/preview.spec.js +97 -0
- package/src/commands/preview.test.js +250 -0
- package/src/commands/use.js +56 -0
- package/src/commands/use.spec.js +61 -0
- package/src/commands/use.test.js +280 -0
- package/src/commands/validate.js +31 -19
- package/src/commands/validate.spec.js +82 -0
- package/src/commands/validate.test.js +234 -0
- package/src/commands/workflows.js +70 -0
- package/src/errors/build/build-failed-error.js +19 -0
- package/src/errors/build/config-field-missing-error.js +20 -0
- package/src/errors/build/config-file-not-found-error.js +20 -0
- package/src/errors/build/index.js +11 -0
- package/src/errors/index.js +48 -0
- package/src/errors/install/dependency-install-error.js +19 -0
- package/src/errors/install/directory-not-empty-error.js +25 -0
- package/src/errors/install/index.js +12 -0
- package/src/errors/install/invalid-path-error.js +31 -0
- package/src/errors/install/invalid-starter-error.js +27 -0
- package/src/errors/install/version-not-found-error.js +35 -0
- package/src/errors/output/epub-generation-error.js +19 -0
- package/src/errors/output/index.js +14 -0
- package/src/errors/output/invalid-epub-library-error.js +20 -0
- package/src/errors/output/invalid-pdf-library-error.js +20 -0
- package/src/errors/output/missing-build-output-error.js +21 -0
- package/src/errors/output/pdf-generation-error.js +24 -0
- package/src/errors/output/tool-not-found-error.js +37 -0
- package/src/errors/project/index.js +10 -0
- package/src/errors/project/not-in-project-error.js +20 -0
- package/src/errors/project/project-create-error.js +21 -0
- package/src/errors/quire-error.js +27 -0
- package/src/errors/validation/validation-error.js +20 -11
- package/src/helpers/clean.js +1 -1
- package/src/helpers/docs-url.js +32 -0
- package/src/helpers/test-cwd.js +5 -6
- package/src/helpers/test-cwd.test.js +192 -0
- package/src/helpers/which.js +10 -4
- package/src/lib/11ty/README.md +135 -19
- package/src/lib/11ty/api.js +176 -93
- package/src/lib/11ty/cli.js +77 -35
- package/src/lib/11ty/index.js +64 -5
- package/src/lib/11ty/index.test.js +655 -0
- package/src/lib/README.md +275 -0
- package/src/lib/commander/index.js +100 -0
- package/src/lib/commander/index.test.js +86 -0
- package/src/lib/commander/options.js +195 -0
- package/src/lib/commander/options.test.js +109 -0
- package/src/lib/conf/README.md +84 -73
- package/src/lib/conf/config.js +5 -3
- package/src/lib/conf/config.test.js +281 -0
- package/src/lib/conf/defaults.js +44 -0
- package/src/lib/conf/format.js +60 -0
- package/src/lib/conf/format.test.js +106 -0
- package/src/lib/conf/helpers.js +91 -0
- package/src/lib/conf/helpers.test.js +136 -0
- package/src/lib/conf/index.js +22 -0
- package/src/lib/conf/schema.js +53 -8
- package/src/lib/epub/README.md +133 -2
- package/src/lib/epub/engines.js +46 -0
- package/src/lib/epub/epub.js +36 -11
- package/src/lib/epub/index.js +111 -21
- package/src/lib/epub/index.test.js +518 -0
- package/src/lib/epub/pandoc.js +33 -4
- package/src/lib/epub/pandoc.test.js +122 -0
- package/src/lib/epub/schema.js +21 -0
- package/src/lib/error/README.md +170 -0
- package/src/lib/error/handler.js +107 -0
- package/src/lib/git/README.md +151 -2
- package/src/lib/git/index.js +217 -13
- package/src/lib/git/index.spec.js +80 -0
- package/src/lib/git/index.test.js +453 -0
- package/src/lib/installer/index.js +309 -0
- package/src/lib/installer/index.spec.js +83 -0
- package/src/lib/installer/index.test.js +545 -0
- package/src/lib/logger/README.md +424 -0
- package/src/lib/logger/debug.js +90 -0
- package/src/lib/logger/debug.spec.js +130 -0
- package/src/lib/logger/index.js +228 -0
- package/src/lib/logger/index.spec.js +131 -0
- package/src/lib/logger/index.test.js +477 -0
- package/src/lib/npm/README.md +127 -0
- package/src/lib/npm/index.js +198 -0
- package/src/lib/npm/index.spec.js +60 -0
- package/src/lib/npm/index.test.js +355 -0
- package/src/lib/pdf/README.md +131 -0
- package/src/lib/pdf/engines.js +46 -0
- package/src/lib/pdf/index.js +124 -21
- package/src/lib/pdf/index.test.js +708 -0
- package/src/lib/pdf/paged.js +100 -52
- package/src/lib/pdf/paged.test.js +366 -0
- package/src/lib/pdf/prince.js +115 -37
- package/src/lib/pdf/prince.test.js +202 -0
- package/src/lib/pdf/schema.js +21 -0
- package/src/lib/pdf/split.js +61 -33
- package/src/lib/pdf/split.test.js +445 -0
- package/src/lib/process/manager.js +110 -0
- package/src/lib/process/manager.test.js +55 -0
- package/src/lib/project/build.js +143 -0
- package/src/lib/project/build.test.js +253 -0
- package/src/lib/project/config.js +48 -0
- package/src/lib/project/config.test.js +134 -0
- package/src/{helpers/is-quire.js → lib/project/detect.js} +5 -3
- package/src/lib/project/detect.test.js +157 -0
- package/src/lib/project/index.js +40 -0
- package/src/lib/project/paths.js +224 -0
- package/src/lib/project/version.js +110 -0
- package/src/lib/project/version.test.js +350 -0
- package/src/lib/reporter/README.md +211 -2
- package/src/lib/reporter/index.js +512 -0
- package/src/lib/reporter/index.test.js +593 -0
- package/src/main.js +134 -47
- package/src/main.spec.js +61 -0
- package/src/main.test.js +347 -0
- package/src/validators/utils.js +2 -1
- package/src/commands/conf.js +0 -43
- package/src/commands/version.js +0 -43
- package/src/lib/11ty/paths.js +0 -103
- package/src/lib/i18n/README.md +0 -3
- package/src/lib/i18n/config.js +0 -53
- package/src/lib/i18n/index.js +0 -43
- package/src/lib/i18n/localeService.js +0 -58
- package/src/lib/quire/README.md +0 -19
- package/src/lib/quire/index.js +0 -350
package/src/commands/conf.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import Command from '#src/Command.js'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Quire CLI `conf` Command
|
|
5
|
-
*
|
|
6
|
-
* @class ConfCommand
|
|
7
|
-
* @extends {Command}
|
|
8
|
-
*/
|
|
9
|
-
export default class ConfCommand extends Command {
|
|
10
|
-
static definition = {
|
|
11
|
-
name: 'conf',
|
|
12
|
-
aliases: ['config', 'configure'],
|
|
13
|
-
description: 'Manage the Quire CLI configuration.',
|
|
14
|
-
summary: 'read/write quire-cli configuration options',
|
|
15
|
-
version: '1.0.0',
|
|
16
|
-
options: [
|
|
17
|
-
[ '--debug', 'run command in debug mode' ],
|
|
18
|
-
],
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
constructor() {
|
|
22
|
-
super(ConfCommand.definition)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @param {Object} options
|
|
27
|
-
* @return {Promise}
|
|
28
|
-
*/
|
|
29
|
-
async action(key, value, options = {}) {
|
|
30
|
-
if (options.debug) {
|
|
31
|
-
console.info('Command \'%s\' called with options %o', this.name(), options)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// this.outputHelp()
|
|
35
|
-
|
|
36
|
-
console.info('quire-cli configuration %s', this.config.path)
|
|
37
|
-
|
|
38
|
-
for (const [ key, value ] of Object.entries(this.config.store)) {
|
|
39
|
-
if (key.startsWith('__internal__') && !options.debug) continue
|
|
40
|
-
console.info('%s: %O', key, value)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
package/src/commands/version.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import Command from '#src/Command.js'
|
|
2
|
-
import { paths, projectRoot } from '#lib/11ty/index.js'
|
|
3
|
-
import * as quire from '#lib/quire/index.js'
|
|
4
|
-
import testcwd from '#helpers/test-cwd.js'
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Quire CLI `version` Command
|
|
8
|
-
*
|
|
9
|
-
* Running `quire version` sets the `quire-11ty` version for a project.
|
|
10
|
-
* The version is written to a `.quire` file in the project directory
|
|
11
|
-
* or to the `quire-cli` package `.quire` when the `global` flag is used.
|
|
12
|
-
*
|
|
13
|
-
* @class VersionCommand
|
|
14
|
-
* @extends {Command}
|
|
15
|
-
*/
|
|
16
|
-
export default class VersionCommand extends Command {
|
|
17
|
-
static definition = {
|
|
18
|
-
name: 'version',
|
|
19
|
-
description: 'Sets the Quire version to use when running commands on the project.',
|
|
20
|
-
summary: 'set the @thegetty/quire-11ty version',
|
|
21
|
-
version: '1.0.0',
|
|
22
|
-
args: [
|
|
23
|
-
[ '<version>', 'the local quire version to use' ],
|
|
24
|
-
],
|
|
25
|
-
options: [
|
|
26
|
-
// [ '-g', '--global', 'set the quire version globally' ],
|
|
27
|
-
],
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
constructor() {
|
|
31
|
-
super(VersionCommand.definition)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
action(args, options = {}) {
|
|
35
|
-
if (options.debug) {
|
|
36
|
-
console.info('Command \'%s\' called with options %o', this.name, options)
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
preAction(command) {
|
|
41
|
-
testcwd(command)
|
|
42
|
-
}
|
|
43
|
-
}
|
package/src/lib/11ty/paths.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url'
|
|
2
|
-
import fs from 'fs-extra'
|
|
3
|
-
import path from 'node:path'
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
6
|
-
const __dirname = path.dirname(__filename)
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Eleventy configuration paths
|
|
10
|
-
* @see https://www.11ty.dev/docs/config/#configuration-options
|
|
11
|
-
*
|
|
12
|
-
* Resolve the absolute path to the Eleventy configuration module,
|
|
13
|
-
* `eleventyRoot` is _relative_ to `main.js`, the CLI entry point.
|
|
14
|
-
* Both `input` and `output` are _relative_ to the `config` module.
|
|
15
|
-
*
|
|
16
|
-
* @todo
|
|
17
|
-
* - refactor the paths module as a concern of the `lib/quire` module
|
|
18
|
-
* - refactor resolving an absolute path to the correct eleventy version root;
|
|
19
|
-
* this needs to use the correct `quire-11ty` version for the project
|
|
20
|
-
* and correctly resolve the path to the target of the 'latest' symlink
|
|
21
|
-
*/
|
|
22
|
-
const cliRoot = path.resolve(__dirname, path.join('..', '..'))
|
|
23
|
-
const eleventyConfig = '.eleventy.js'
|
|
24
|
-
const version = 'latest'
|
|
25
|
-
|
|
26
|
-
export const projectRoot = process.cwd()
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Absolute path to the latest installed version of `quire-11ty`
|
|
30
|
-
* @todo use version read from the project `.quire-version` file
|
|
31
|
-
*/
|
|
32
|
-
const libQuirePath = path.resolve(__dirname, path.join(cliRoot, 'lib', 'quire', 'versions', version))
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Absolute path to the current version of `quire-11ty`
|
|
36
|
-
* Nota bene: to get a relative path to the `eleventyRoot`,
|
|
37
|
-
* for example when the version is specified is 'latest',
|
|
38
|
-
* it must be set to the real path to the symlink target.
|
|
39
|
-
*
|
|
40
|
-
* @todo refactor how and *when* the eleventyRoot is determined:
|
|
41
|
-
* - we only need eleventyRoot for cli commands that run 11ty
|
|
42
|
-
* - paths module is a concern of the `quire` module
|
|
43
|
-
* - global quire-cli installation
|
|
44
|
-
* - local quire-cli installation
|
|
45
|
-
*
|
|
46
|
-
* For an excellent developer experience, the quire-11ty code should be
|
|
47
|
-
* installed into an `11ty` or `quire-11ty` directory in the `projectRoot`
|
|
48
|
-
* this will allow us to more easily manage symlinks for local development
|
|
49
|
-
* using unpublished `quire-11ty` code.
|
|
50
|
-
* @example
|
|
51
|
-
* ```sh
|
|
52
|
-
* blargh/
|
|
53
|
-
* .git/
|
|
54
|
-
* .gitignore
|
|
55
|
-
* .node-version
|
|
56
|
-
* .quire-version
|
|
57
|
-
* 11ty@ --> /Users/mph/Code/Getty/quire/packages/11ty
|
|
58
|
-
* content/
|
|
59
|
-
* CHANGELOG.md
|
|
60
|
-
* LICENSE
|
|
61
|
-
* README.md
|
|
62
|
-
* package.json
|
|
63
|
-
* package-lock.json
|
|
64
|
-
* ```
|
|
65
|
-
* Installing to a directory will allow more cleanly `eject` and `uneject`
|
|
66
|
-
* using a symlink or single directory `rm -rf`.
|
|
67
|
-
* Should the `11ty` directory be a dot directory to hide the complexity from
|
|
68
|
-
* users or should it be visible to be more explicit when project is ejected?
|
|
69
|
-
*/
|
|
70
|
-
const getEleventyRoot = () => {
|
|
71
|
-
// try {
|
|
72
|
-
// return fs.readdirSync(projectRoot).includes(eleventyConfig)
|
|
73
|
-
// ? projectRoot
|
|
74
|
-
// : fs.realpathSync(libQuirePath)
|
|
75
|
-
// } catch (error) {
|
|
76
|
-
// throw new Error(`[CLI:11ty] Unable to read project directory for eleventy config ${error}`)
|
|
77
|
-
// }
|
|
78
|
-
return projectRoot
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export const eleventyRoot = getEleventyRoot()
|
|
82
|
-
|
|
83
|
-
const inputDir = path.join(projectRoot, 'content')
|
|
84
|
-
|
|
85
|
-
export default {
|
|
86
|
-
/**
|
|
87
|
-
* An abolsute path to eleventy config module
|
|
88
|
-
*/
|
|
89
|
-
config: path.join(eleventyRoot, '.eleventy.js'),
|
|
90
|
-
/**
|
|
91
|
-
* Paths _relative to_ the eleventy config module
|
|
92
|
-
*/
|
|
93
|
-
input: path.relative(eleventyRoot, inputDir),
|
|
94
|
-
output: path.relative(eleventyRoot, path.join(projectRoot, '_site')),
|
|
95
|
-
epub: path.relative(eleventyRoot, path.join(projectRoot, '_epub')),
|
|
96
|
-
/**
|
|
97
|
-
* Paths _relative to_ the `input` directory
|
|
98
|
-
*/
|
|
99
|
-
data: '_computed',
|
|
100
|
-
includes: path.relative(inputDir, path.join(eleventyRoot, '_includes')),
|
|
101
|
-
layouts: path.relative(inputDir, path.join(eleventyRoot, '_layouts')),
|
|
102
|
-
public: './public',
|
|
103
|
-
}
|
package/src/lib/i18n/README.md
DELETED
package/src/lib/i18n/config.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* i18next configuration
|
|
3
|
-
* @see https://www.i18next.com/overview/configuration-options
|
|
4
|
-
*
|
|
5
|
-
* @todo
|
|
6
|
-
* set debug using cli `--debug` option
|
|
7
|
-
* set resources by loading data files
|
|
8
|
-
*/
|
|
9
|
-
const configuration = {
|
|
10
|
-
debug: true,
|
|
11
|
-
/**
|
|
12
|
-
* Languages
|
|
13
|
-
*/
|
|
14
|
-
fallbackLng: 'en',
|
|
15
|
-
lng: 'en',
|
|
16
|
-
supportedLngs: ['en'],
|
|
17
|
-
/**
|
|
18
|
-
* Namespaces
|
|
19
|
-
*/
|
|
20
|
-
defaultNS: 'translation',
|
|
21
|
-
fallbackNS: false,
|
|
22
|
-
ns: 'translation',
|
|
23
|
-
/**
|
|
24
|
-
* Resources
|
|
25
|
-
*/
|
|
26
|
-
partialBundledLanguages: false,
|
|
27
|
-
resources: {
|
|
28
|
-
en: {
|
|
29
|
-
translation: {
|
|
30
|
-
'gradoo': 'blargh',
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
/**
|
|
35
|
-
* Missing Keys
|
|
36
|
-
* @ https://www.i18next.com/overview/configuration-options#missing-keys
|
|
37
|
-
*/
|
|
38
|
-
saveMissing: false,
|
|
39
|
-
/**
|
|
40
|
-
* Translation defaults
|
|
41
|
-
* @ https://www.i18next.com/overview/configuration-options#translation-defaults
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Plugin options
|
|
46
|
-
* @see https://www.i18next.com/overview/configuration-options#plugin-options
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Other
|
|
51
|
-
* @see https://www.i18next.com/overview/configuration-options#others
|
|
52
|
-
*/
|
|
53
|
-
}
|
package/src/lib/i18n/index.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { LocaleService } from './LocaleService.js'
|
|
2
|
-
import I18nextCLILanguageDetector from 'i18next-cli-language-detector'
|
|
3
|
-
import i18next from 'i18next'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* i18next configuration
|
|
7
|
-
* @see https://www.i18next.com/overview/configuration-options
|
|
8
|
-
*
|
|
9
|
-
* @todo
|
|
10
|
-
* set debug using cli `--debug` option
|
|
11
|
-
* set resources by loading data files
|
|
12
|
-
*/
|
|
13
|
-
const configuration = {
|
|
14
|
-
debug: true,
|
|
15
|
-
/**
|
|
16
|
-
* Languages
|
|
17
|
-
*/
|
|
18
|
-
fallbackLng: 'en',
|
|
19
|
-
lng: 'en',
|
|
20
|
-
supportedLngs: ['en'],
|
|
21
|
-
/**
|
|
22
|
-
* Namespaces
|
|
23
|
-
*/
|
|
24
|
-
defaultNS: 'translation',
|
|
25
|
-
fallbackNS: false,
|
|
26
|
-
ns: 'translation',
|
|
27
|
-
/**
|
|
28
|
-
* Resources
|
|
29
|
-
*/
|
|
30
|
-
resources: {
|
|
31
|
-
en: {
|
|
32
|
-
translation: {
|
|
33
|
-
'gradoo': 'blargh',
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
await i18next
|
|
40
|
-
.use(I18nextCLILanguageDetector)
|
|
41
|
-
.init(configuration)
|
|
42
|
-
|
|
43
|
-
export default new LocaleService(i18next)
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Localization service
|
|
3
|
-
*
|
|
4
|
-
* @class LocaleService
|
|
5
|
-
*/
|
|
6
|
-
export class LocaleService {
|
|
7
|
-
/**
|
|
8
|
-
* @param {Object} i18nProvider
|
|
9
|
-
*/
|
|
10
|
-
constructor(i18nProvider) {
|
|
11
|
-
this.i18nProvider = i18nProvider
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Gets the current locale
|
|
16
|
-
*
|
|
17
|
-
* @return {String} current locale code
|
|
18
|
-
*/
|
|
19
|
-
getCurrentLocale() {
|
|
20
|
-
return this.i18nProvider.getLocale()
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Get a list of supported locales
|
|
25
|
-
*
|
|
26
|
-
* @return {Array} List of supported locale codes
|
|
27
|
-
*/
|
|
28
|
-
getLocales() {
|
|
29
|
-
return this.i18nProvider.getLocales()
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Sets the current locale
|
|
34
|
-
*
|
|
35
|
-
* @param {String} locale i18n locale code
|
|
36
|
-
* @return {String} the current locale code
|
|
37
|
-
*/
|
|
38
|
-
setLocale(locale) {
|
|
39
|
-
const locales = this.getLocales()
|
|
40
|
-
if (!locales.includes(locale)) {
|
|
41
|
-
throw new Error(`
|
|
42
|
-
Unknown locale code ${locale} Unable to set current locale;
|
|
43
|
-
supported locales: ${locales}
|
|
44
|
-
`)
|
|
45
|
-
}
|
|
46
|
-
return this.i18nProvider.setLocale(locale)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Translate a string
|
|
51
|
-
*
|
|
52
|
-
* @param {String} string string to translate
|
|
53
|
-
* @param {Object} options translation options
|
|
54
|
-
*/
|
|
55
|
-
translate(string, options) {
|
|
56
|
-
return this.i18nProvider.t(string)
|
|
57
|
-
}
|
|
58
|
-
}
|
package/src/lib/quire/README.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
## CLI Quire Module
|
|
2
|
-
|
|
3
|
-
The primary concern of the Quire CLI `quire` module is to decouple the `11ty` package from the publication content templates and manage the version of the [Quire/11ty package](packages/11ty) that is used to build a Quire project.
|
|
4
|
-
|
|
5
|
-
The [Quire/11ty package](packages/11ty) contains the Eleventy [configuration](packages/11ty/.eleventy.js), [includes](packages/11ty/_includes), [layouts](packages/11ty/_layouts), and [plugins](packages/11ty/_plugins) for [universal template shortcodes](packages/11ty/_plugins/shortcodes) and [components](packages/11ty/_includes/components) to build Quire publications.
|
|
6
|
-
|
|
7
|
-
When the Quire CLI is installed the latest version of the [11ty package](packages/11ty) is installed in in the `cli/quire/versions/` directory.
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
cli/
|
|
11
|
-
quire/
|
|
12
|
-
versions/
|
|
13
|
-
1.0.0/
|
|
14
|
-
_includes/
|
|
15
|
-
_layouts/
|
|
16
|
-
_plugins/
|
|
17
|
-
.eleventy.js
|
|
18
|
-
package.json
|
|
19
|
-
```
|