fixes
This commit is contained in:
parent
ab66113c89
commit
c25b352041
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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 = {
|
module.exports = {
|
||||||
|
30
LICENSE
30
LICENSE
@ -1,29 +1,11 @@
|
|||||||
Copyright (c) 2020, Timo Hocker
|
Copyright (c) <year> <author>. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
All rights reserved.
|
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of snippeteer nor the names of its contributors
|
|
||||||
may be used to endorse or promote products derived from this software
|
|
||||||
without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
||||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,39 +0,0 @@
|
|||||||
pipeline {
|
|
||||||
agent any
|
|
||||||
|
|
||||||
environment {
|
|
||||||
VERSION = VersionNumber([
|
|
||||||
versionNumberString:
|
|
||||||
'${BUILDS_ALL_TIME}',
|
|
||||||
versionPrefix: '1.0.',
|
|
||||||
worstResultForIncrement: 'SUCCESS'
|
|
||||||
])
|
|
||||||
publish = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage('Setup') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
currentBuild.displayName = env.VERSION
|
|
||||||
}
|
|
||||||
echo 'Setting up test environment'
|
|
||||||
sh 'echo setup'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
success {
|
|
||||||
script {
|
|
||||||
publish = sh script: "git log -1 | grep '\\[no publish\\]'", returnStatus: true
|
|
||||||
if (publish != 0) {
|
|
||||||
echo 'Deploying'
|
|
||||||
sh 'echo deploy'
|
|
||||||
} else {
|
|
||||||
echo 'Build successful, Commit not marked for deploying'
|
|
||||||
currentBuild.result = "UNSTABLE"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
pipeline {
|
|
||||||
agent any
|
|
||||||
|
|
||||||
environment {
|
|
||||||
VERSION = VersionNumber([
|
|
||||||
versionNumberString:
|
|
||||||
'${BUILDS_ALL_TIME}',
|
|
||||||
versionPrefix: '1.0.',
|
|
||||||
worstResultForIncrement: 'SUCCESS'
|
|
||||||
])
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage('Building') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
currentBuild.displayName = env.VERSION
|
|
||||||
}
|
|
||||||
sh 'yarn ci ${VERSION}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
/* eslint-disable no-process-exit */
|
|
||||||
/* eslint-disable no-console */
|
|
||||||
/* eslint-disable no-sync */
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
const fs = require ('fs');
|
|
||||||
const child_process = require ('child_process');
|
|
||||||
|
|
||||||
const pkg = JSON.parse (fs.readFileSync ('package.json', 'utf-8'));
|
|
||||||
[
|
|
||||||
,, pkg.version
|
|
||||||
] = process.argv;
|
|
||||||
fs.writeFileSync ('package.json', JSON.stringify (pkg, null, 2));
|
|
||||||
|
|
||||||
child_process.execSync ('yarn lint', { stdio: 'inherit' });
|
|
||||||
if (typeof pkg.scripts !== 'undefined' && typeof pkg.scripts.test === 'string')
|
|
||||||
child_process.execSync ('yarn test', { stdio: 'inherit' });
|
|
||||||
if (typeof pkg.scripts !== 'undefined' && typeof pkg.scripts.compile === 'string')
|
|
||||||
child_process.execSync ('yarn compile', { stdio: 'inherit' });
|
|
||||||
|
|
||||||
child_process.exec ('git log -1 | grep \'\\[no publish\\]\'')
|
|
||||||
.addListener ('exit', (code) => {
|
|
||||||
if (code === 0) {
|
|
||||||
console.log ('build not marked for deployment');
|
|
||||||
process.exit (1);
|
|
||||||
}
|
|
||||||
else { child_process.execSync ('yarn publish'); }
|
|
||||||
});
|
|
2
index.js
2
index.js
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -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 no-process-exit */
|
/* eslint-disable no-process-exit */
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
/* eslint-disable no-sync */
|
/* eslint-disable no-sync */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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 = {
|
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 path from 'path';
|
||||||
import child_process from 'child_process';
|
import child_process from 'child_process';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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 {
|
export interface Snippet {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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 {
|
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
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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';
|
declare module 'enquirer';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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';
|
import path from 'path';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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';
|
import { CopyrightOptions } from './copyright_options';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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 {
|
export class CopyrightOptions {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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 */
|
/* eslint-disable no-await-in-loop */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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 */
|
/* 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 { ColumnType } from './ColumnType';
|
||||||
import { Relation } from './Relation';
|
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 {
|
export enum ColumnType {
|
||||||
string = 'string',
|
string = 'string',
|
||||||
text = 'text',
|
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';
|
import { Table } from './Table';
|
||||||
|
|
||||||
export class Database {
|
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';
|
import { Database } from './Database';
|
||||||
|
|
||||||
export interface PatchAction {
|
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 {
|
export enum PatchActions {
|
||||||
rename_column = 'rc',
|
rename_column = 'rc',
|
||||||
add_column = 'ac',
|
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 {
|
export class Relation {
|
||||||
public column: string;
|
public column: string;
|
||||||
public table: 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 {
|
export interface Serializable {
|
||||||
serialize(): string;
|
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';
|
import { Column } from './Column';
|
||||||
|
|
||||||
export class Table {
|
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';
|
import { Snippet } from '../../Snippet';
|
||||||
|
|
||||||
export default class Database implements 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 { Serializable } from '../classes/Serializable';
|
||||||
import { PatchAction } from '../classes/PatchAction';
|
import { PatchAction } from '../classes/PatchAction';
|
||||||
import { Database } from '../classes/Database';
|
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 */
|
/* eslint-disable max-len */
|
||||||
|
|
||||||
import { files } from '@sapphirecode/standard';
|
import { files } from '@sapphirecode/standard';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (C) SapphireCode - All Rights Reserved
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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';
|
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 = {
|
const eslintrc = `module.exports = {
|
||||||
env: {
|
env: {
|
||||||
commonjs: true,
|
commonjs: true,
|
||||||
@ -5,7 +12,7 @@ const eslintrc = `module.exports = {
|
|||||||
node: true
|
node: true
|
||||||
},
|
},
|
||||||
extends: [
|
extends: [
|
||||||
'@scode'
|
'@sapphirecode'
|
||||||
],
|
],
|
||||||
globals: {
|
globals: {
|
||||||
Atomics: 'readonly',
|
Atomics: 'readonly',
|
||||||
@ -24,7 +31,7 @@ const eslintrc_ts = `module.exports = {
|
|||||||
node: true
|
node: true
|
||||||
},
|
},
|
||||||
extends: [
|
extends: [
|
||||||
'@scode/eslint-config-ts'
|
'@sapphirecode/eslint-config-ts'
|
||||||
],
|
],
|
||||||
globals: {
|
globals: {
|
||||||
Atomics: 'readonly',
|
Atomics: 'readonly',
|
||||||
@ -42,9 +49,6 @@ const gitignore = `/node_modules/
|
|||||||
/coverage/
|
/coverage/
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const npmrc = `@scode:registry=https://npm.scode.ovh
|
|
||||||
`;
|
|
||||||
|
|
||||||
const tsconfig = `{
|
const tsconfig = `{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
@ -63,4 +67,4 @@ const eslintignore = `/dist/
|
|||||||
*.d.ts
|
*.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
|
* Copyright (C) SapphireCode - All Rights Reserved
|
||||||
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
||||||
* See file 'LICENSE' for full license details.
|
* 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';
|
import path from 'path';
|
||||||
@ -12,7 +12,7 @@ import { Snippet } from '../../Snippet';
|
|||||||
import { apply_template, modify_json, run_command } from '../../Helper';
|
import { apply_template, modify_json, run_command } from '../../Helper';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
eslintrc, gitignore, npmrc,
|
eslintrc, gitignore,
|
||||||
tsconfig, eslintrc_ts, eslintignore
|
tsconfig, eslintrc_ts, eslintignore
|
||||||
} from './Assets';
|
} from './Assets';
|
||||||
|
|
||||||
@ -75,7 +75,6 @@ export default class Node implements Snippet {
|
|||||||
.run ();
|
.run ();
|
||||||
|
|
||||||
await apply_template (eslintrc, path.join (folder, '.eslintrc.js'));
|
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 (gitignore, path.join (folder, '.gitignore'));
|
||||||
await apply_template (
|
await apply_template (
|
||||||
eslintignore,
|
eslintignore,
|
||||||
@ -91,7 +90,7 @@ export default class Node implements Snippet {
|
|||||||
run_command ('git init', folder);
|
run_command ('git init', folder);
|
||||||
run_command ('yarn init -y', folder);
|
run_command ('yarn init -y', folder);
|
||||||
run_command (
|
run_command (
|
||||||
`yarn add --dev @scode/eslint-config${use_ts
|
`yarn add --dev @sapphirecode/eslint-config${use_ts
|
||||||
? '-ts typescript @ava/typescript'
|
? '-ts typescript @ava/typescript'
|
||||||
: ''} eslint nyc ava`,
|
: ''} eslint nyc ava`,
|
||||||
folder
|
folder
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"/dist/",
|
"/dist/",
|
||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"author": "Timo Hocker",
|
"author": "Timo Hocker <timo@scode.ovh>",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sapphirecode/eslint-config-ts": "^1.0.22",
|
"@sapphirecode/eslint-config-ts": "^1.0.22",
|
||||||
@ -38,4 +38,4 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user