Skip to content

Commit 1596490

Browse files
committed
chore: prettier removed singleQuote & default options
1 parent 416cb60 commit 1596490

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

.prettierrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
22
"printWidth": 120,
3-
"trailingComma": "es5",
4-
"singleQuote": true,
53
"useTabs": true
64
}

cli.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
11
#!/usr/bin/env node
2-
'use strict';
3-
const yargs_parser = require('yargs-parser');
4-
const path = require('path');
5-
const chalk = require('chalk');
6-
const ora = require('ora');
7-
const { extract } = require('pacote');
8-
const fs = require('fs-extra');
9-
const os = require('os');
10-
const packageName = 'html5-boilerplate';
2+
"use strict";
3+
const yargs_parser = require("yargs-parser");
4+
const path = require("path");
5+
const chalk = require("chalk");
6+
const ora = require("ora");
7+
const { extract } = require("pacote");
8+
const fs = require("fs-extra");
9+
const os = require("os");
10+
const packageName = "html5-boilerplate";
1111
const tempDir = os.tmpdir() + `/${packageName}-staging`;
12-
const elapsed = require('elapsed-time-logger');
12+
const elapsed = require("elapsed-time-logger");
1313

1414
module.exports = async () => {
15-
const argv = yargs_parser(process.argv.slice(2), { alias: { release: ['r'] } });
15+
const argv = yargs_parser(process.argv.slice(2), {
16+
alias: { release: ["r"] },
17+
});
1618
const timer = elapsed.start();
17-
const version = argv['release'] || 'latest';
18-
const targetDir = path.resolve(argv['_'][0] || './');
19+
const version = argv["release"] || "latest";
20+
const targetDir = path.resolve(argv["_"][0] || "./");
1921
const spinner = ora(`Downloading ${packageName} version '${version}' to ${targetDir}`).start();
2022
await fs.ensureDir(tempDir);
2123
try {
22-
const { from: nameWithVersion } = await extract(packageName + '@' + version, tempDir, {});
24+
const { from: nameWithVersion } = await extract(packageName + "@" + version, tempDir, {});
2325
spinner.text = `${nameWithVersion} copied to ${targetDir} in ${timer.get()}. Have fun!`;
2426
} catch (err) {
2527
await fs.remove(tempDir);
26-
if (err.code === 'ETARGET') {
28+
if (err.code === "ETARGET") {
2729
spinner.fail(chalk.red(`version '${err.wanted}' not found in npm registry\navailable versions:`));
28-
console.log(err.versions.reverse().join(' | '));
30+
console.log(err.versions.reverse().join(" | "));
2931
process.exit(1);
3032
} /* istanbul ignore next */ else {
31-
spinner.fail('Unexpected error');
33+
spinner.fail("Unexpected error");
3234
console.error(err);
3335
process.exit(-1);
3436
}
3537
return;
3638
}
37-
await fs.copy(tempDir + '/dist', targetDir);
39+
await fs.copy(tempDir + "/dist", targetDir);
3840
await fs.remove(tempDir);
3941
spinner.succeed();
4042
return;

0 commit comments

Comments
 (0)