Skip to content

Commit 408dcb6

Browse files
authored
docs: Update readmes and rework builds. (#1)
* Update readme. * Update workflows. * Update badges. * Rework typecheck. * Fix lint failure. * Move tests folder.
1 parent 47545c0 commit 408dcb6

29 files changed

Lines changed: 103 additions & 79 deletions
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Build
1+
name: Pipeline
22
on:
33
push:
44
branches:
55
- master
66
pull_request:
77
jobs:
8-
test:
9-
name: Test
8+
ci:
9+
name: CI
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
@@ -16,15 +16,10 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-node@v3
1818
with:
19+
cache: yarn
1920
node-version: ${{ matrix.node-version }}
21+
- uses: moonrepo/tool-version-action@v1
22+
with:
23+
node: ${{ matrix.node-version }}
2024
- run: yarn install --immutable
21-
- run: yarn run build
22-
- run: yarn run check
23-
pack:
24-
name: Pack
25-
runs-on: ubuntu-latest
26-
steps:
27-
- uses: actions/checkout@v3
28-
- uses: actions/setup-node@v3
29-
- run: yarn install --immutable
30-
- run: yarn run pack
25+
- run: yarn moon ci

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: PR
22
on: pull_request
33
jobs:
44
conventional:
5-
name: Conventional Title
5+
name: Conventional title
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ node_modules/
3838

3939
# Moon
4040
.moon/cache
41+
.moon/types

.moon/oss/project-packages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ tasks:
2525
- '--addEngines'
2626
- '--addExports'
2727
- '--declaration'
28+
- '--declarationConfig'
29+
- 'tsconfig.build.json'
2830
deps:
2931
- '^:build'
3032
inputs:

README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
1-
# moon Development
1+
# moon development
22

3-
[![Build Status](https://github.com/moonrepo/dev/workflows/Build/badge.svg)](https://github.com/moonrepo/dev/actions?query=branch%3Amaster)
4-
[![npm version](https://badge.fury.io/js/%40moon%config-babel.svg)](https://www.npmjs.com/package/@moon/config-babel)
5-
[![npm deps](https://david-dm.org/moonrepo/dev.svg?path=packages/config-babel)](https://www.npmjs.com/package/@moon/config-babel)
3+
[![Build Status](https://github.com/moonrepo/dev/workflows/Pipeline/badge.svg)](https://github.com/moonrepo/dev/actions?query=branch%3Amaster)
4+
[![npm version](https://badge.fury.io/js/%40moonrepo%dev.svg)](https://www.npmjs.com/package/@moonrepo/dev)
5+
[![npm deps](https://david-dm.org/moonrepo/dev.svg?path=packages/dev)](https://www.npmjs.com/package/@moon/dev)
66

77
This repository is a collection of moon owned and maintained configurations and presets for common
8-
developer tools -- primarily tools used by the moon project and its authors.
8+
developer tools -- primarily tools used by moonrepo and its authors.
99

10-
It aims to provide a modern, developer accessible, convention over configuration approach to
11-
TypeScript (and React) only projects!
10+
It aims to provide a strict, modern, developer accessible, convention over configuration approach to
11+
JavaScript, TypeScript, and React projects!
1212

1313
## Packages
1414

15-
The following packages are not tied to [moon](https://moon.dev) directly, and can be used
16-
stand-alone within their respective tools.
15+
The following packages are not tied to [moon](https://github.com/moonrepo/moon) directly, and can be
16+
used stand-alone within their respective tools.
1717

1818
- [babel-preset-moon](./packages/babel-preset) - Babel preset that utilizes `env`, `typescript`, and
1919
`react` presets.
2020
- [eslint-config-moon](./packages/eslint-config) - ESLint config that extends `airbnb`, `unicorn`,
2121
`react`, and a handful of other plugins.
2222
- [jest-preset-moon](./packages/jest-preset) - Jest preset that utilizes the circus runner, and
2323
provides code coverage.
24-
- [prettier-config-moon](./packages/prettier-config) - Prettier config that aligns with community
25-
standards.
26-
- [tsconfig-moon](./packages/tsconfig) - TypeScript configs for normal, react, and workspace based
24+
- [prettier-config-moon](./packages/prettier-config) - Prettier config that aligns with
25+
accessibility and community standards.
26+
- [tsconfig-moon](./packages/tsconfig) - TypeScript configs for normal, react, and reference based
2727
projects.
2828

29-
And last but not least, the `dev` package that pieces everything together to provide an official
30-
moon [configuration module](https://moon.dev/docs/provider).
31-
32-
- [@moon/dev](./packages/dev) - Pre-packaged configuration module for general use (if you don't want
33-
to manage your own).
29+
And last but not least, the [@moonrepo/dev](./packages/dev) package that provides helpers, constans,
30+
and more. This should rarely be used directly!
3431

3532
## Contributing
3633

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
22
"private": true,
33
"name": "moon-dev",
4-
"version": "0.0.0",
54
"scripts": {
6-
"check": "yarn run type && yarn run test && yarn run lint",
7-
"lint": "eslint --cache --fix packages/*/{src,tests}/**/*.ts",
5+
"moon": "$(yarn bin moon)",
86
"prerelease": "node scripts/releaseCheck.mjs && yarn run pack && yarn run check",
97
"release": "yarn prerelease && lerna version --conventional-commits --changelog-preset conventional-changelog-beemo --create-release github --push && lerna publish from-git",
10-
"setup": "moon run :build",
11-
"test": "jest",
8+
"setup": "yarn moon run :build",
129
"version": "yarn install && git add yarn.lock"
1310
},
1411
"workspaces": [

packages/babel-preset/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# babel-preset-moon
22

3-
[![Build Status](https://github.com/moonrepo/dev/workflows/Build/badge.svg)](https://github.com/moonrepo/dev/actions?query=branch%3Amaster)
3+
[![Build Status](https://github.com/moonrepo/dev/workflows/Pipeline/badge.svg)](https://github.com/moonrepo/dev/actions?query=branch%3Amaster)
44
[![npm version](https://badge.fury.io/js/babel-preset-moon.svg)](https://www.npmjs.com/package/babel-preset-moon)
55
[![npm deps](https://david-dm.org/moonrepo/dev.svg?path=packages/babel-preset)](https://www.npmjs.com/package/babel-preset-moon)
66

packages/babel-preset/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// eslint-disable-next-line no-underscore-dangle
2+
declare const __DEV__: boolean;
3+
14
export type PluginItem = string | [string, object];
25

36
export interface BabelPresetMoonOptions {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"declarationDir": "dts",
5+
"outDir": "dts",
6+
"rootDir": "src"
7+
},
8+
"include": [
9+
"src/**/*"
10+
]
11+
}
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
{
22
"extends": "../../tsconfig.options.json",
33
"compilerOptions": {
4-
"declarationDir": "dts",
5-
"outDir": "dts",
6-
"rootDir": "src"
4+
"outDir": "../../.moon/types/packages/babel-preset"
75
},
86
"include": [
9-
"src/**/*",
10-
"../../types/**/*"
7+
"src/**/*"
118
]
129
}

0 commit comments

Comments
 (0)