Skip to content

Commit

Permalink
Replace makenew boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
seambot committed Jan 11, 2024
1 parent 8453048 commit 7553e98
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 269 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
["^\\u0000"],
["^node:"],
["^@?\\w"],
["@seamapi/makenew-tsmodule"],
["seam"],
["^lib/"],
["^"],
["^\\."]
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @seambot
* @razor-x
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
write-mode: overwrite
path: index.js
contents: |
import '@seamapi/makenew-tsmodule'
import 'seam'
- name: Install
run: npm install --save ${{ steps.packages.outputs.paths }}
- name: Run
Expand Down
95 changes: 0 additions & 95 deletions .github/workflows/makenew.yml

This file was deleted.

92 changes: 11 additions & 81 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,20 @@
# TypeScript Module Package Skeleton
# Seam JavaScript SDK

[![npm](https://img.shields.io/npm/v/@seamapi/makenew-tsmodule.svg)](https://www.npmjs.com/package/@seamapi/makenew-tsmodule)
[![GitHub Actions](https://github.com/seamapi/makenew-tsmodule/actions/workflows/check.yml/badge.svg)](https://github.com/seamapi/makenew-tsmodule/actions/workflows/check.yml)
[![npm](https://img.shields.io/npm/v/seam.svg)](https://www.npmjs.com/package/seam)
[![GitHub Actions](https://github.com/seamapi/javascript-next/actions/workflows/check.yml/badge.svg)](https://github.com/seamapi/javascript-next/actions/workflows/check.yml)

Package skeleton for a TypeScript module.
JavaScript SDK for the Seam API written in TypeScript.

## Description

Bootstrap a new TypeScript module in five minutes or less.

### Features

- Strongly typed JavaScript with [TypeScript].
- Native [ECMAScript module] compatible with [Node.js].
- Package management with [npm].
- Publish as a package to [GitHub Packages] and [npm].
- Examples with configurable options and arguments powered by [yargs] with [landlubber].
- Linting with the [JavaScript Standard Style] using [ESLint].
- [Prettier] code.
- Futuristic debuggable unit testing with [AVA].
- Code coverage reporting with [Istanbul] and [c8].
- Robust static dependency analysis with [DPDM].
- Fully automated version management and package publishing with [semantic-release].
- Continuous testing and package publishing with [GitHub Actions].
- Consistent coding with [EditorConfig].
- Start coding instantly with [GitHub Codespaces].
- Get PR reviews directly from [code owners].
- Automatically close [stale] Issues and Pull Requests.
- Badges from [Shields.io].

[AVA]: https://github.com/avajs/ava
[code owners]: https://github.blog/2017-07-06-introducing-code-owners/
[DPDM]: https://github.com/acrazing/dpdm
[ECMAScript module]: https://nodejs.org/api/esm.html
[ESLint]: https://eslint.org/
[EditorConfig]: https://editorconfig.org/
[GitHub Actions]: https://github.com/features/actions
[GitHub Codespaces]: https://github.com/features/packages
[GitHub Packages]: https://github.com/features/packages
[Istanbul]: https://istanbul.js.org/
[JavaScript Standard Style]: https://standardjs.com/
[Node.js]: https://nodejs.org/
[Prettier]: https://prettier.io/
[semantic-release]: https://semantic-release.gitbook.io/
[Shields.io]: https://shields.io/
[stale]: https://github.com/marketplace/stale
[TypeScript]: https://www.typescriptlang.org/
[c8]: https://github.com/bcoe/c8
[landlubber]: https://github.com/razor-x/landlubber
[npm]: https://www.npmjs.com/
[yargs]: https://yargs.js.org/

### Bootstrapping a new project

1. [Trigger a makenew workflow from this repository][makenew workflow]. 🚀
- Provide a value for each required input.
- There are no defaults.
- Example values are shown in parentheses.
2. When the workflow completes, clone your new repo and start coding!

[makenew workflow]: https://github.com/seamapi/makenew-tsmodule/actions/workflows/makenew.yml

### Updating from this skeleton

If you want to pull in future updates from this skeleton,
you can fetch and merge in changes from this repository.

Add this as a new remote with

```
$ git remote add makenew git@github.com:seamapi/makenew-tsmodule.git
```

You can then fetch and merge changes with

```
$ git fetch --no-tags makenew
$ git merge makenew/main
```
TODO

## Installation

Add this as a dependency to your project using [npm] with

```
$ npm install @seamapi/makenew-tsmodule
$ npm install seam
```

[npm]: https://www.npmjs.com/
Expand All @@ -94,8 +24,8 @@ $ npm install @seamapi/makenew-tsmodule
### Quickstart

```
$ git clone https://github.com/seamapi/makenew-tsmodule.git
$ cd makenew-tsmodule
$ git clone https://github.com/seamapi/javascript-next.git
$ cd javascript-next
$ nvm install
$ npm install
$ npm run test:watch
Expand All @@ -115,10 +45,10 @@ The [source code] is hosted on GitHub.
Clone the project with

```
$ git clone git@github.com:seamapi/makenew-tsmodule.git
$ git clone git@github.com:seamapi/javascript-next.git
```

[source code]: https://github.com/seamapi/makenew-tsmodule
[source code]: https://github.com/seamapi/javascript-next

### Requirements

Expand Down Expand Up @@ -171,7 +101,7 @@ $ gh workflow run version.yml --raw-field version=<version>

[GitHub CLI]: https://cli.github.com/
[npm-version]: https://docs.npmjs.com/cli/version
[version workflow_dispatch on GitHub Actions]: https://github.com/seamapi/makenew-tsmodule/actions?query=workflow%3Aversion
[version workflow_dispatch on GitHub Actions]: https://github.com/seamapi/javascript-next/actions?query=workflow%3Aversion

## GitHub Actions

Expand Down
2 changes: 1 addition & 1 deletion examples/todo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Builder, Command, Describe, Handler } from 'landlubber'

import { todo } from '@seamapi/makenew-tsmodule'
import { todo } from 'seam'

interface Options {
x: string
Expand Down
78 changes: 0 additions & 78 deletions makenew.sh

This file was deleted.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@seamapi/makenew-tsmodule",
"version": "1.3.0",
"description": "Package skeleton for a TypeScript module.",
"name": "seam",
"version": "0.0.0",
"description": "JavaScript SDK for the Seam API written in TypeScript.",
"type": "module",
"main": "index.js",
"types": "index.d.ts",
Expand All @@ -16,9 +16,9 @@
"keywords": [
"node"
],
"homepage": "https://github.com/seamapi/makenew-tsmodule",
"bugs": "https://github.com/seamapi/makenew-tsmodule/issues",
"repository": "seamapi/makenew-tsmodule",
"homepage": "https://github.com/seamapi/javascript-next",
"bugs": "https://github.com/seamapi/javascript-next/issues",
"repository": "seamapi/javascript-next",
"license": "MIT",
"author": {
"name": "Seam Labs, Inc.",
Expand Down
2 changes: 1 addition & 1 deletion test/todo.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'ava'

import { todo } from '@seamapi/makenew-tsmodule'
import { todo } from 'seam'

test('todo: returns argument', (t) => {
t.is(todo('todo'), 'todo', 'returns input')
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"forceConsistentCasingInFileNames": true,
"baseUrl": "./",
"paths": {
"@seamapi/makenew-tsmodule": ["./src/index.ts"],
"seam": ["./src/index.ts"],
"lib/*": ["./src/lib/*"]
}
},
Expand Down

0 comments on commit 7553e98

Please sign in to comment.