Compare commits
No commits in common. "b69e6a36c3d6db7623bf34bd0a319996a1266c01" and "f95226c7f0eea6a5a3a1b2b6eb730226ec5ddf46" have entirely different histories.
b69e6a36c3
...
f95226c7f0
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,4 +3,3 @@
|
|||||||
|
|
||||||
# stryker temp files
|
# stryker temp files
|
||||||
.stryker-tmp
|
.stryker-tmp
|
||||||
*.log
|
|
||||||
|
@ -10,10 +10,9 @@ import path from 'path';
|
|||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import { Confirm, Input, AutoComplete } from 'enquirer';
|
import { Confirm, Input, AutoComplete } from 'enquirer';
|
||||||
// eslint-disable-next-line id-match
|
// eslint-disable-next-line id-match
|
||||||
import { findLicense, getLicense } from 'license';
|
import { findLicense } from 'license';
|
||||||
import { Snippet } from '../../Snippet';
|
import { Snippet } from '../../Snippet';
|
||||||
import { DialogHandler } from '../../dialog';
|
import { DialogHandler } from '../../dialog';
|
||||||
import { modify_json } from '../../Helper';
|
|
||||||
import { CopyrightGenerator } from './copyright_generator';
|
import { CopyrightGenerator } from './copyright_generator';
|
||||||
import { FileMapper } from './file_mapper';
|
import { FileMapper } from './file_mapper';
|
||||||
import { CopyrightOptions } from './copyright_options';
|
import { CopyrightOptions } from './copyright_options';
|
||||||
@ -34,24 +33,6 @@ export default class Copyright implements Snippet {
|
|||||||
this.fix_file_license.bind (this)
|
this.fix_file_license.bind (this)
|
||||||
);
|
);
|
||||||
|
|
||||||
modify_json ((json) => {
|
|
||||||
json.author = `${this.options.author} <${this.options.email}>`;
|
|
||||||
json.license = this.options.has_license
|
|
||||||
? this.options.license
|
|
||||||
: 'UNLICENSED';
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this.options.has_license) {
|
|
||||||
await fs.writeFile (
|
|
||||||
path.join (cwd, 'LICENSE'),
|
|
||||||
getLicense (this.options.license, {
|
|
||||||
name: this.options.author,
|
|
||||||
email: this.options.email,
|
|
||||||
project: this.options.software
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.loaded_from_config && await new Confirm (
|
if (!this.loaded_from_config && await new Confirm (
|
||||||
{ message: 'should those settings be saved for the next run?' }
|
{ message: 'should those settings be saved for the next run?' }
|
||||||
)
|
)
|
||||||
|
@ -56,10 +56,8 @@ export default class Node implements Snippet {
|
|||||||
lint: 'eslint . --ext .js,.jsx,.ts,.tsx,.vue,.mjs',
|
lint: 'eslint . --ext .js,.jsx,.ts,.tsx,.vue,.mjs',
|
||||||
test: 'nyc ava'
|
test: 'nyc ava'
|
||||||
};
|
};
|
||||||
if (use_ts) {
|
if (use_ts)
|
||||||
(obj.scripts as Record<string, unknown>).compile = 'tsc';
|
(obj.scripts as Record<string, unknown>).compile = 'tsc';
|
||||||
(obj.scripts as Record<string, unknown>).test = 'tsc && nyc ava';
|
|
||||||
}
|
|
||||||
return obj;
|
return obj;
|
||||||
}, path.join (folder, 'package.json'));
|
}, path.join (folder, 'package.json'));
|
||||||
}
|
}
|
||||||
|
1825
yarn-error.log
Normal file
1825
yarn-error.log
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user