Skip to content

Commit

Permalink
Project update. [p][robotic]
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswrks committed Aug 25, 2023
1 parent adc6486 commit c7b1fc8
Show file tree
Hide file tree
Showing 14 changed files with 392 additions and 352 deletions.
2 changes: 1 addition & 1 deletion dev/.files/bin/includes/core-projects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
updates: {
ignore: [],
order: [
'skeleton-dev-deps',
'dev-deps',
'skeleton',
'madrun',

Expand Down
10 changes: 5 additions & 5 deletions dev/.files/bin/includes/utilities.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ export default class u {
if (!$is.plainObject(updates)) {
throw new Error('u.updatePkg: Unable to parse `' + updatesFile + '`.');
}
if (await u.isPkgRepo('clevercanyon/skeleton-dev-deps')) {
if (updates.$ꓺdefaults?.['devDependenciesꓺ@clevercanyon/skeleton-dev-deps']) {
delete updates.$ꓺdefaults['devDependenciesꓺ@clevercanyon/skeleton-dev-deps'];
if (await u.isPkgRepo('clevercanyon/dev-deps')) {
if (updates.$ꓺdefaults?.['devDependenciesꓺ@clevercanyon/dev-deps']) {
delete updates.$ꓺdefaults['devDependenciesꓺ@clevercanyon/dev-deps'];
}
if ($is.array(updates.$ꓺunset)) {
updates.$ꓺunset.push('devDependenciesꓺ@clevercanyon/skeleton-dev-deps');
updates.$ꓺunset.push('devDependenciesꓺ@clevercanyon/dev-deps');
} else {
updates.$ꓺunset = ['devDependenciesꓺ@clevercanyon/skeleton-dev-deps'];
updates.$ꓺunset = ['devDependenciesꓺ@clevercanyon/dev-deps'];
}
}
$obj.patchDeep(pkg, updates); // Potentially declarative ops.
Expand Down
2 changes: 1 addition & 1 deletion dev/.files/bin/updater/data/package.json/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"optionalDependencies": {},
"bundleDependencies": [],
"devDependencies": {},
"devDependenciesꓺ@clevercanyon/skeleton-dev-deps": "*",
"devDependenciesꓺ@clevercanyon/dev-deps": "*",
"overrides": {},

"cpu": [],
Expand Down
18 changes: 9 additions & 9 deletions dev/.files/bin/updater/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ export default async ({ projDir }) => {
if (!$is.plainObject(jsonUpdates)) {
throw new Error('updater: Unable to parse `' + jsonUpdatesFile + '`.');
}
if ('./package.json' === relPath && (await isPkgRepo('clevercanyon/skeleton-dev-deps'))) {
if (jsonUpdates.$ꓺdefaults?.['devDependenciesꓺ@clevercanyon/skeleton-dev-deps']) {
delete jsonUpdates.$ꓺdefaults['devDependenciesꓺ@clevercanyon/skeleton-dev-deps'];
if ('./package.json' === relPath && (await isPkgRepo('clevercanyon/dev-deps'))) {
if (jsonUpdates.$ꓺdefaults?.['devDependenciesꓺ@clevercanyon/dev-deps']) {
delete jsonUpdates.$ꓺdefaults['devDependenciesꓺ@clevercanyon/dev-deps'];
}
if ($is.array(jsonUpdates.$ꓺunset)) {
jsonUpdates.$ꓺunset.push('devDependenciesꓺ@clevercanyon/skeleton-dev-deps');
jsonUpdates.$ꓺunset.push('devDependenciesꓺ@clevercanyon/dev-deps');
} else {
jsonUpdates.$ꓺunset = ['devDependenciesꓺ@clevercanyon/skeleton-dev-deps'];
jsonUpdates.$ꓺunset = ['devDependenciesꓺ@clevercanyon/dev-deps'];
}
}
$obj.patchDeep(json, jsonUpdates); // Potentially declarative ops.
Expand All @@ -197,10 +197,10 @@ export default async ({ projDir }) => {
}

/**
* Updates `@clevercanyon/skeleton-dev-deps` in project dir.
* Updates `@clevercanyon/dev-deps` in project dir.
*/
if (!(await isPkgRepo('clevercanyon/skeleton-dev-deps'))) {
log($chalk.green('Updating project to latest `@clevercanyon/skeleton-dev-deps`.'));
await $cmd.spawn('npm', ['udpate', '@clevercanyon/skeleton-dev-deps'], { cwd: projDir });
if (!(await isPkgRepo('clevercanyon/dev-deps'))) {
log($chalk.green('Updating project to latest `@clevercanyon/dev-deps`.'));
await $cmd.spawn('npm', ['udpate', '@clevercanyon/dev-deps'], { cwd: projDir });
}
};
4 changes: 2 additions & 2 deletions dev/.files/docs/build-info/app-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Four Basic `appType` Options

- `spa` Single-page app. Must use an `index.html` entry.
- `mpa` Multipage app. Must use `index.html` entries.
- `spa` Single-page app. Must use `.html` entry.
- `mpa` Multipage app. Must use `.html` entries.
- `cma` Custom-made app. Must use `.{ts,tsx}` entries.
- `lib` Library code. Must use `.{ts,tsx}` entries.
121 changes: 121 additions & 0 deletions dev/.files/docs/build-info/possibilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# `appType` + `targetEnv` Possibilities

## Default Skeleton + Dependencies

- [clevercanyon/skeleton](https://github.com/clevercanyon/skeleton) (`cma` on `any`)
- [clevercanyon/dev-deps](https://github.com/clevercanyon/dev-deps)

## Naming Convention

All skeleton repos should have a name in this format, at minimum.

- `clevercanyon/skeleton`.`[app-type]`.`[target-env]`

Skeleton variants should use a `.` separator preceding their slug.

- `clevercanyon/skeleton`.`[app-type]`.`[target-env]`.`[variant]`

## All Possible Combinations

Our build system supports `appType` on `targetEnv` directives. However, not all combinations actually make sense. For example, we're not likely to create a `mpa` app and target a `webw` environment. The same with an `mpa` on `any`, because a multipage app needs to target something that will serve it as HTML. Likewise, creating a `cma` on `cfp` makes little sense. Instead, we'd create an `spa` or `mpa` on `cfp` app.

### Single-Page Apps

- clevercanyon/skeleton.spa `any`
- clevercanyon/skeleton.spa.node
- clevercanyon/skeleton.spa.cfw
- clevercanyon/skeleton.spa.cfp
- clevercanyon/skeleton.spa.web
- clevercanyon/skeleton.spa.webw

### Multipage Apps

- clevercanyon/skeleton.mpa `any`
- clevercanyon/skeleton.mpa.node
- clevercanyon/skeleton.mpa.cfw
- clevercanyon/skeleton.mpa.cfp
- clevercanyon/skeleton.mpa.web
- clevercanyon/skeleton.mpa.webw

### Custom Apps

- clevercanyon/skeleton (`cma` on `any`)
- clevercanyon/skeleton.cma.node
- clevercanyon/skeleton.cma.cfw
- clevercanyon/skeleton.cma.cfp
- clevercanyon/skeleton.cma.web
- clevercanyon/skeleton.cma.webw

### Library Apps

- clevercanyon/skeleton.lib `any`
- clevercanyon/skeleton.lib.node
- clevercanyon/skeleton.lib.cfw
- clevercanyon/skeleton.lib.cfp
- clevercanyon/skeleton.lib.web
- clevercanyon/skeleton.lib.webw

## All Rational Combinations

These lists include those from above that actually make sense, at least in theory.

### Single-Page Apps

- clevercanyon/skeleton.spa.node
- clevercanyon/skeleton.spa.cfw
- clevercanyon/skeleton.spa.cfp
- clevercanyon/skeleton.spa.web

### Multipage Apps

- clevercanyon/skeleton.mpa.node
- clevercanyon/skeleton.mpa.cfw
- clevercanyon/skeleton.mpa.cfp
- clevercanyon/skeleton.mpa.web

### Custom Apps

- clevercanyon/skeleton (`cma` on `any`)
- clevercanyon/skeleton.cma.node
- clevercanyon/skeleton.cma.cfw
- clevercanyon/skeleton.cma.cfp
- clevercanyon/skeleton.cma.web
- clevercanyon/skeleton.cma.webw

### Library Apps

- clevercanyon/skeleton.lib `any`
- clevercanyon/skeleton.lib.node
- clevercanyon/skeleton.lib.cfw
- clevercanyon/skeleton.lib.cfp
- clevercanyon/skeleton.lib.web
- clevercanyon/skeleton.lib.webw

## Skeletons We Actually Need

What do we really care about most, or will likely need?

### Single-Page Apps

- [clevercanyon/skeleton.spa.cfp](https://github.com/clevercanyon/skeleton.spa.cfp): Single-page Preact apps with static assets, functions, routes, middleware, and more. This covers most of our needs for general sites, services, and even purpose-built apps.

### Custom Apps (Easily Converted To Libs As Needed)

- [clevercanyon/skeleton](https://github.com/clevercanyon/skeleton) (`cma` on `any`)

- Base skeleton that all others have their dotfiles updated by.

- [clevercanyon/skeleton.cma.node](https://github.com/clevercanyon/skeleton.cma.node)

- Apps targeting Node. Let's create this skeleton along with variants that cover common use cases; e.g., CLI tools.

- [clevercanyon/skeleton.cma.cfw](https://github.com/clevercanyon/skeleton.cma.cfw)

- Apps targeting Cloudflare workers for backend APIs. Let's create this skeleton along with variants that cover common use cases; e.g., scheduled events.

- [clevercanyon/skeleton.cma.web](https://github.com/clevercanyon/skeleton.cma.web)

- Apps targeting web browsers. Let's create this skeleton along with variants that cover common use cases; e.g., DOM manipulation and other purely web-focused components.

- [clevercanyon/skeleton.cma.webw](https://github.com/clevercanyon/skeleton.cma.webw)
- Apps targeting workers that run in a browser.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## `targetEnv` Utilities

- [clevercanyon/utilities](https://github.com/clevercanyon/utilities)
- [clevercanyon/utilities.cfp](https://github.com/clevercanyon/utilities.cfp)
- [clevercanyon/utilities.cfw](https://github.com/clevercanyon/utilities.cfw)
- [clevercanyon/utilities.node](https://github.com/clevercanyon/utilities.node)
- [clevercanyon/utilities.cfw](https://github.com/clevercanyon/utilities.cfw)
- [clevercanyon/utilities.cfp](https://github.com/clevercanyon/utilities.cfp)
- [clevercanyon/utilities.web](https://github.com/clevercanyon/utilities.web)
- [clevercanyon/utilities.webw](https://github.com/clevercanyon/utilities.webw)
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
### JavaScript/TypeScript

- [clevercanyon/utilities](https://github.com/clevercanyon/utilities)
- [clevercanyon/utilities.cfp](https://github.com/clevercanyon/utilities.cfp)
- [clevercanyon/utilities.cfw](https://github.com/clevercanyon/utilities.cfw)
- [clevercanyon/utilities.node](https://github.com/clevercanyon/utilities.node)
- [clevercanyon/utilities.cfw](https://github.com/clevercanyon/utilities.cfw)
- [clevercanyon/utilities.cfp](https://github.com/clevercanyon/utilities.cfp)
- [clevercanyon/utilities.web](https://github.com/clevercanyon/utilities.web)
- [clevercanyon/utilities.webw](https://github.com/clevercanyon/utilities.webw)

Expand Down
3 changes: 0 additions & 3 deletions dev/.files/docs/misc/emojis.md

This file was deleted.

89 changes: 0 additions & 89 deletions dev/.files/docs/misc/possibilities.md

This file was deleted.

7 changes: 4 additions & 3 deletions dev/.files/docs/usage/bin-scripts/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ See Also: [Prerequisites](./prerequisites.md)
```

These are the properties that we explicitly disallow.
- Instead of `"scripts"` we use `$ madrun` to configure scripts. See: [Prerequisites](./prerequisites.md).

- Instead of `"scripts"` we use `$ madrun` to configure scripts. See: [Prerequisites](./prerequisites.md).

```json
["typings", "scripts", "workspaces"]
Expand All @@ -52,7 +53,7 @@ See Also: [Prerequisites](./prerequisites.md)
"typesVersions": {}
```

- Note the absence of `"files": []` in the lists above, which we discourage. Instead, use `./.npmignore` as the recommended way to establish which files are part of a package. However, `files` is not forbidden, so define and customize `files`, if you must. Just keep in mind that `./.npmignore` is meaningless if you use `files`.
- Note the absence of `"files": []` in the lists above, which we discourage. Instead, use `./.npmignore` as the recommended way to establish which files are part of a package. However, `files` is not forbidden, so define and customize `files`, if you must. Just keep in mind that `./.npmignore` is meaningless if you use `files`.

## Updates Project

Expand Down Expand Up @@ -110,10 +111,10 @@ _Note: This list of projects is not a suggestion regarding which repos to clone,
```text
~/Projects/clevercanyon
- madrun
- dev-deps
- my-project
- project.fork
- skeleton
- skeleton-dev-deps
- skeleton.cma.web
- utilities
- utilities.node
Expand Down
Loading

0 comments on commit c7b1fc8

Please sign in to comment.