-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
6,023 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.{js,json,.yml}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2019, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"ignorePatterns": ["**/coverage", "**/lib", "**/temp"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.yarn/** linguist-vendored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: yarn install | ||
- run: yarn ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.repo_pat }} | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: yarn install | ||
- run: yarn ci | ||
- run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Graphitation Service Account" | ||
- run: yarn types | ||
- run: yarn release -y -n $NPM_AUTHTOKEN --access public | ||
env: | ||
NPM_AUTHTOKEN: ${{ secrets.npm_authtoken }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_modules | ||
lib | ||
.tsbuildinfo | ||
|
||
# This is purely pre-cautionary; when linting becomes slow, delete this eslintcache entry | ||
.eslintcache | ||
|
||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
pipeline: { | ||
types: ["^types"], | ||
build: [], | ||
test: ["build"], | ||
lint: [], | ||
}, | ||
npmClient: "yarn", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "@nova/monorepo", | ||
"private": true, | ||
"workspaces": { | ||
"packages": [ | ||
"packages/*", | ||
"scripts" | ||
] | ||
}, | ||
"scripts": { | ||
"clean": "git clean -fdx -e node_modules", | ||
"build": "lage build", | ||
"types": "lage types", | ||
"test": "lage test", | ||
"lint": "lage lint", | ||
"lage": "lage", | ||
"ci": "yarn lage build types test lint && yarn checkchange", | ||
"beachball": "beachball -b origin/main", | ||
"change": "yarn beachball change", | ||
"checkchange": "yarn beachball check", | ||
"release": "yarn beachball publish" | ||
}, | ||
"devDependencies": { | ||
"beachball": "2.10.2", | ||
"lage": "0.32.1", | ||
"prettier": "^2.2.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "@nova/a-package", | ||
"version": "0.1.0", | ||
"main": "./src/index.ts", | ||
"scripts": { | ||
"build": "monorepo-scripts build", | ||
"lint": "monorepo-scripts lint", | ||
"test": "monorepo-scripts test", | ||
"types": "monorepo-scripts types", | ||
"just": "monorepo-scripts" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^26.0.22", | ||
"monorepo-scripts": "*" | ||
}, | ||
"publishConfig": { | ||
"main": "./lib/index", | ||
"types": "./lib/index.d.ts", | ||
"access": "public" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe("index", () => { | ||
it("runs", async () => { | ||
expect(true).toEqual(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const aThing = "thing"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
const path = require("path"); | ||
const { addResolvePath } = require("just-scripts"); | ||
addResolvePath(path.join(__dirname, "..")); | ||
|
||
// Calling the CLI | ||
require("just-scripts/bin/just-scripts"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
preset: "ts-jest", | ||
rootDir: process.cwd(), | ||
roots: ["<rootDir>/src"], | ||
testPathIgnorePatterns: ["node_modules", "__generated__"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { | ||
tscTask, | ||
esbuildTask, | ||
jestTask, | ||
eslintTask, | ||
argv, | ||
parallel, | ||
EsbuildBuildOptions, | ||
} from "just-scripts"; | ||
import * as path from "path"; | ||
import * as glob from "fast-glob"; | ||
|
||
export const types = tscTask({ emitDeclarationOnly: true }); | ||
|
||
export const build = () => { | ||
const baseEsbuildOptions: EsbuildBuildOptions = { | ||
entryPoints: glob.sync(["src/**/*.{ts,tsx}", "!src/**/__tests__/**"]), | ||
outdir: "lib", | ||
target: "es6", | ||
}; | ||
return parallel( | ||
esbuildTask({ | ||
...baseEsbuildOptions, | ||
format: "esm", | ||
outExtension: { ".js": ".mjs" }, | ||
}), | ||
esbuildTask({ | ||
...baseEsbuildOptions, | ||
format: "cjs", | ||
}) | ||
); | ||
}; | ||
|
||
export const test = () => { | ||
return jestTask({ | ||
config: path.join(__dirname, "config", "jest.config.js"), | ||
watch: argv().watch, | ||
_: argv()._, | ||
}); | ||
}; | ||
|
||
export const lint = eslintTask({ | ||
files: [path.join(process.cwd(), "src")], | ||
extensions: ".ts,.tsx", | ||
cache: true, | ||
fix: process.argv.includes("--fix"), | ||
timing: process.argv.includes("--timing"), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "monorepo-scripts", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"private": true, | ||
"bin": { | ||
"monorepo-scripts": "bin/monorepo-scripts.js" | ||
}, | ||
"devDependencies": { | ||
"jest": "^26.6.3", | ||
"typescript": "^4.2.3", | ||
"ts-jest": "^26.5.4", | ||
"just-scripts": "^1.5.3", | ||
"ts-node": "^9.1.1", | ||
"esbuild": "^0.11.5", | ||
"eslint": "^7.23.0", | ||
"@typescript-eslint/parser": "^4.21.0", | ||
"@typescript-eslint/eslint-plugin": "4.7.0", | ||
"fast-glob": "^3.2.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2019", | ||
"module": "ES6", | ||
"moduleResolution": "Node", | ||
"declaration": true, | ||
"declarationMap": true, | ||
"strict": true, | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true | ||
} | ||
} |
Oops, something went wrong.