fixes
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@sapphirecode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import child_process from 'child_process';
|
||||
import fs from 'fs-extra';
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
export interface Snippet {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
export class DialogHandler {
|
||||
|
2
lib/enquirer.d.ts
vendored
2
lib/enquirer.d.ts
vendored
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
declare module 'enquirer';
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import { CopyrightOptions } from './copyright_options';
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
export class CopyrightOptions {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
/* eslint-disable no-await-in-loop */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
/* eslint-disable no-await-in-loop */
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import { ColumnType } from './ColumnType';
|
||||
import { Relation } from './Relation';
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
export enum ColumnType {
|
||||
string = 'string',
|
||||
text = 'text',
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import { Table } from './Table';
|
||||
|
||||
export class Database {
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import { Database } from './Database';
|
||||
|
||||
export interface PatchAction {
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
export enum PatchActions {
|
||||
rename_column = 'rc',
|
||||
add_column = 'ac',
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
export class Relation {
|
||||
public column: string;
|
||||
public table: string;
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
export interface Serializable {
|
||||
serialize(): string;
|
||||
}
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import { Column } from './Column';
|
||||
|
||||
export class Table {
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import { Snippet } from '../../Snippet';
|
||||
|
||||
export default class Database implements Snippet {
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import { Serializable } from '../classes/Serializable';
|
||||
import { PatchAction } from '../classes/PatchAction';
|
||||
import { Database } from '../classes/Database';
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
/* eslint-disable max-len */
|
||||
|
||||
import { files } from '@sapphirecode/standard';
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import { Confirm } from 'enquirer';
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
const eslintrc = `module.exports = {
|
||||
env: {
|
||||
commonjs: true,
|
||||
@ -5,7 +12,7 @@ const eslintrc = `module.exports = {
|
||||
node: true
|
||||
},
|
||||
extends: [
|
||||
'@scode'
|
||||
'@sapphirecode'
|
||||
],
|
||||
globals: {
|
||||
Atomics: 'readonly',
|
||||
@ -24,7 +31,7 @@ const eslintrc_ts = `module.exports = {
|
||||
node: true
|
||||
},
|
||||
extends: [
|
||||
'@scode/eslint-config-ts'
|
||||
'@sapphirecode/eslint-config-ts'
|
||||
],
|
||||
globals: {
|
||||
Atomics: 'readonly',
|
||||
@ -42,9 +49,6 @@ const gitignore = `/node_modules/
|
||||
/coverage/
|
||||
`;
|
||||
|
||||
const npmrc = `@scode:registry=https://npm.scode.ovh
|
||||
`;
|
||||
|
||||
const tsconfig = `{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
@ -63,4 +67,4 @@ const eslintignore = `/dist/
|
||||
*.d.ts
|
||||
`;
|
||||
|
||||
export { eslintrc, gitignore, npmrc, tsconfig, eslintrc_ts, eslintignore };
|
||||
export { eslintrc, gitignore, tsconfig, eslintrc_ts, eslintignore };
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) SapphireCode - All Rights Reserved
|
||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, April 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
@ -12,7 +12,7 @@ import { Snippet } from '../../Snippet';
|
||||
import { apply_template, modify_json, run_command } from '../../Helper';
|
||||
|
||||
import {
|
||||
eslintrc, gitignore, npmrc,
|
||||
eslintrc, gitignore,
|
||||
tsconfig, eslintrc_ts, eslintignore
|
||||
} from './Assets';
|
||||
|
||||
@ -75,7 +75,6 @@ export default class Node implements Snippet {
|
||||
.run ();
|
||||
|
||||
await apply_template (eslintrc, path.join (folder, '.eslintrc.js'));
|
||||
await apply_template (npmrc, path.join (folder, '.npmrc'));
|
||||
await apply_template (gitignore, path.join (folder, '.gitignore'));
|
||||
await apply_template (
|
||||
eslintignore,
|
||||
@ -91,7 +90,7 @@ export default class Node implements Snippet {
|
||||
run_command ('git init', folder);
|
||||
run_command ('yarn init -y', folder);
|
||||
run_command (
|
||||
`yarn add --dev @scode/eslint-config${use_ts
|
||||
`yarn add --dev @sapphirecode/eslint-config${use_ts
|
||||
? '-ts typescript @ava/typescript'
|
||||
: ''} eslint nyc ava`,
|
||||
folder
|
||||
|
Reference in New Issue
Block a user