-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(monorepo): initial commit to create the create-pkg monorepo
- Loading branch information
Showing
27 changed files
with
211 additions
and
124 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,12 @@ | ||
version: 2 | ||
updates: | ||
- directory: / | ||
package-ecosystem: github-actions | ||
rebase-strategy: auto | ||
schedule: | ||
interval: daily | ||
- directory: / | ||
package-ecosystem: npm | ||
rebase-strategy: auto | ||
schedule: | ||
interval: daily |
Validating CODEOWNERS rules …
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 @@ | ||
* @wesleytodd @rxmarbles |
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: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
node-version: | ||
- '18' | ||
- '20' | ||
- '21' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
cache-dependency-path: 'package-lock.json' | ||
- name: Install Deps | ||
run: npm ci | ||
- name: Run Tests | ||
run: npm test | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
package-lock=false | ||
registry=https://registry.npmjs.org |
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 |
---|---|---|
@@ -1,83 +1,3 @@ | ||
# Scaffold a Package | ||
# Create PKG | ||
|
||
[![NPM Version](https://img.shields.io/npm/v/create-pkg.svg)](https://npmjs.org/package/create-pkg) | ||
[![NPM Downloads](https://img.shields.io/npm/dm/create-pkg.svg)](https://npmjs.org/package/create-pkg) | ||
[![test](https://github.com/pkgjs/create/workflows/Test/badge.svg)](https://github.com/pkgjs/create/actions?query=workflow%3ATest) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard) | ||
|
||
## Usage | ||
|
||
``` | ||
$ npm init pkg | ||
# or | ||
$ npx create-pkg | ||
# or | ||
$ npm install -g create-pkg | ||
$ create-pkg | ||
``` | ||
|
||
### CLI Usage | ||
|
||
``` | ||
$ create-pkg --help | ||
create-git | ||
initalize a package | ||
Options: | ||
--help Show help [boolean] | ||
--version Show version number [boolean] | ||
--cwd, -d Directory to run in [default: process.cwd()] | ||
# TODO | ||
``` | ||
|
||
### Programmatic Usage | ||
|
||
```javascript | ||
const createPkg = require('@pkgjs/create-pkg') | ||
|
||
await createPkg({ | ||
// TODO | ||
}) | ||
``` | ||
|
||
#### Composition with other `create-*` packages | ||
|
||
This generator is built on top of `opta`, a helper library for collecting | ||
user input from multiple interfaces: CLI via `yargs`, interactive prompts via `inquirer` | ||
and via a JS interface. To compose with other `opta` based input collection, | ||
you can use `.options` to access the cli/prompt/js configurations. | ||
|
||
```javascript | ||
const createPkg = require('create-pkg') | ||
const opta = require('opta') | ||
|
||
const opts = opta({ | ||
commandDescription: 'Your description', | ||
options: { | ||
// Spread the options from createGPkg | ||
...createPkg.options, | ||
} | ||
}) | ||
|
||
// Our generator main | ||
module.exports = async function (input) { | ||
// Add our input as overrides on the opta instance | ||
options.overrides(input) | ||
|
||
// Prompt the user, | ||
await options.prompt() | ||
|
||
// Get the current values from the opta instance | ||
let opts = options.values() | ||
|
||
// Call create git | ||
await createPkg(opts) | ||
} | ||
``` | ||
|
||
For more information check out the [docs for `opta`](https://www.npmjs.com/package/opta). | ||
TODO: Add specificities here |
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 |
---|---|---|
@@ -1,47 +1,21 @@ | ||
{ | ||
"name": "create-pkg", | ||
"version": "0.0.0", | ||
"description": "Scaffold a package", | ||
"author": "Wes Todd <[email protected]>", | ||
"keywords": [ | ||
"scaffold", | ||
"package", | ||
"git", | ||
"module", | ||
"package.json", | ||
"readme", | ||
"mocha", | ||
"standard" | ||
], | ||
"license": "ISC", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:pkgjs/create.git" | ||
}, | ||
"bin": { | ||
"create-package": "bin/create-package" | ||
}, | ||
"name": "create-pkg-monorepo", | ||
"version": "1.0.0", | ||
"description": "The mono-repo for all create-pkg packages", | ||
"scripts": { | ||
"test": "standard && mocha --timeout=60000", | ||
"test:debug": "mocha --inspect --inspect-brk --timeout=0", | ||
"release": "npm t && standard-version && npm publish", | ||
"postpublish": "git push origin && git push origin --tags" | ||
"test": "npm test -ws --if-present" | ||
}, | ||
"dependencies": { | ||
"cptmpl": "0.0.5", | ||
"create-git": "^1.0.0-2", | ||
"create-package-json": "^1.0.0-2", | ||
"loggerr": "^3.0.0-3", | ||
"opta": "0.0.6", | ||
"semver": "^7.3.2" | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/pkgjs/create-pkg.git" | ||
}, | ||
"devDependencies": { | ||
"fs-extra": "^8.0.1", | ||
"fs-test-fixtures": "^0.1.3", | ||
"mocha": "^6.2.2", | ||
"standard": "^14.3.1", | ||
"standard-version": "^9.0.0" | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/pkgjs/create-pkg/issues" | ||
}, | ||
"support": true | ||
"homepage": "https://github.com/pkgjs/create-pkg#readme", | ||
"workspaces": [ | ||
"packages/*" | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,83 @@ | ||
# Scaffold a Package | ||
|
||
[![NPM Version](https://img.shields.io/npm/v/create-pkg.svg)](https://npmjs.org/package/create-pkg) | ||
[![NPM Downloads](https://img.shields.io/npm/dm/create-pkg.svg)](https://npmjs.org/package/create-pkg) | ||
[![test](https://github.com/pkgjs/create/workflows/Test/badge.svg)](https://github.com/pkgjs/create/actions?query=workflow%3ATest) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard) | ||
|
||
## Usage | ||
|
||
``` | ||
$ npm init pkg | ||
# or | ||
$ npx create-pkg | ||
# or | ||
$ npm install -g create-pkg | ||
$ create-pkg | ||
``` | ||
|
||
### CLI Usage | ||
|
||
``` | ||
$ create-pkg --help | ||
create-git | ||
initalize a package | ||
Options: | ||
--help Show help [boolean] | ||
--version Show version number [boolean] | ||
--cwd, -d Directory to run in [default: process.cwd()] | ||
# TODO | ||
``` | ||
|
||
### Programmatic Usage | ||
|
||
```javascript | ||
const createPkg = require('@pkgjs/create-pkg') | ||
|
||
await createPkg({ | ||
// TODO | ||
}) | ||
``` | ||
|
||
#### Composition with other `create-*` packages | ||
|
||
This generator is built on top of `opta`, a helper library for collecting | ||
user input from multiple interfaces: CLI via `yargs`, interactive prompts via `inquirer` | ||
and via a JS interface. To compose with other `opta` based input collection, | ||
you can use `.options` to access the cli/prompt/js configurations. | ||
|
||
```javascript | ||
const createPkg = require('create-pkg') | ||
const opta = require('opta') | ||
|
||
const opts = opta({ | ||
commandDescription: 'Your description', | ||
options: { | ||
// Spread the options from createGPkg | ||
...createPkg.options, | ||
} | ||
}) | ||
|
||
// Our generator main | ||
module.exports = async function (input) { | ||
// Add our input as overrides on the opta instance | ||
options.overrides(input) | ||
|
||
// Prompt the user, | ||
await options.prompt() | ||
|
||
// Get the current values from the opta instance | ||
let opts = options.values() | ||
|
||
// Call create git | ||
await createPkg(opts) | ||
} | ||
``` | ||
|
||
For more information check out the [docs for `opta`](https://www.npmjs.com/package/opta). |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,47 @@ | ||
{ | ||
"name": "create-pkg", | ||
"version": "0.0.0", | ||
"description": "Scaffold a package", | ||
"author": "Wes Todd <[email protected]>", | ||
"keywords": [ | ||
"scaffold", | ||
"package", | ||
"git", | ||
"module", | ||
"package.json", | ||
"readme", | ||
"mocha", | ||
"standard" | ||
], | ||
"license": "ISC", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:pkgjs/create.git" | ||
}, | ||
"bin": { | ||
"create-package": "bin/create-package" | ||
}, | ||
"scripts": { | ||
"test": "standard && mocha --timeout=60000", | ||
"test:debug": "mocha --inspect --inspect-brk --timeout=0", | ||
"release": "npm t && standard-version && npm publish", | ||
"postpublish": "git push origin && git push origin --tags" | ||
}, | ||
"dependencies": { | ||
"cptmpl": "0.0.5", | ||
"create-git": "^1.0.0-2", | ||
"create-package-json": "^1.0.0-2", | ||
"loggerr": "^3.0.0-3", | ||
"opta": "0.0.6", | ||
"semver": "^7.3.2" | ||
}, | ||
"devDependencies": { | ||
"fs-extra": "^8.0.1", | ||
"fs-test-fixtures": "^0.1.3", | ||
"mocha": "^6.2.2", | ||
"standard": "^14.3.1", | ||
"standard-version": "^9.0.0" | ||
}, | ||
"support": true | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
package-lock=false |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
# tmp | ||
|
||
[![NPM Version](https://img.shields.io/npm/v/tmp.svg)](https://npmjs.org/package/tmp) | ||
[![NPM Downloads](https://img.shields.io/npm/dm/tmp.svg)](https://npmjs.org/package/tmp) | ||
[![test](https://github.com/pkgjs/__tmp/workflows/Test/badge.svg)](https://github.com/pkgjs/__tmp/actions?query=workflow%3ATest) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard) | ||
|
||
|
||
|
||
``` | ||
$ npm i tmp | ||
``` |
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 @@ | ||
'use strict' | ||
|
||
module.exports = function () { | ||
return 'Hello World' | ||
} |