ts-archetype
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

TS archetype

Archetype for creating and maintaining typescript repositories

Usage

Uses file-updater to maintain project files.

Run npm run file-updater

File: package.json

"scripts": {
    "file-updater": "file-updater"
}

File: .file-updater.mjs

import { updater } from "file-updater";
import {
    updateEslintrc,
    updateGitignore,
    updatePrettierignore,
    updatePrettierrc,
    updateVscodeSettings,
    updateEsbuild,
    updateLicense,
    updatePackageJson,
    updateReadme,
    updateTsconfig,
    createSrcDir,
    createTestDir,
} from "ts-archetype";

const config = {
    author: "Andreas Arvidsson",
    authorRepository: "https://github.com/AndreasArvidsson",
    funding: "https://github.com/sponsors/AndreasArvidsson",
    projectName: "example-project",
    displayName: "Example project",
    projectType: "vscodeExtension",
};

export default async (workspaceDir) => {
    await updater({
        ".eslintrc.json": updateEslintrc(config),
        ".gitignore": updateGitignore(config),
        ".prettierignore": updatePrettierignore(config),
        ".prettierrc.json": updatePrettierrc(config),
        ".vscode/settings.json": updateVscodeSettings(config),
        "esbuild.ts": updateEsbuild(config),
        "LICENSE": updateLicense(config),
        "package.json": updatePackageJson(config),
        "README.md": updateReadme(config),
        "tsconfig.json": updateTsconfig(config),
    });

    createSrcDir(config, workspaceDir);
    createTestDir(config, workspaceDir);
};

Readme

Keywords

none

Package Sidebar

Install

npm i ts-archetype

Weekly Downloads

6

Version

0.4.0

License

MIT

Unpacked Size

672 kB

Total Files

59

Last publish

Collaborators

  • andreas_arvidsson