Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/docs export-ignore
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# The documentation site: the shared docs workflow of phalcon/assets builds,
# checks and publishes it. The pin is the commit of the kit tag in the comment,
# the same version as docs/package.json (`docs-kit test` checks it).
name: Documentation

on:
push:
branches:
- master
paths: ['docs/**', '.github/workflows/docs.yml', 'CHANGELOG.md']
pull_request:
paths: ['docs/**', '.github/workflows/docs.yml', 'CHANGELOG.md']
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'

permissions:
contents: write

concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: false

jobs:
site:
uses: phalcon/assets/.github/workflows/docs-site.yml@1897144231b73a1c44f760786c6063b1c3136a7f # kit-v2.0.0
with:
node-version: 26
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
push:
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
workflow_dispatch:

Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@ tests/_output/*
!tests/_output/.gitignore
.env
.phpunit.result.cache
docs/node_modules/
docs/dist/
docs/.astro/
docs/.nimbus/
docs/.tmp/
docs/src/components.ts
docs/src/content.config.ts
docs/src/versions.generated.mjs
docs/src/pages/
docs/src/content/docs-*/changelog.md
/.pnpm-store/
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Changelog

All notable changes are documented here. The format is based on [Keep a Changelog][keep_a_changelog] and this project adheres to [Semantic Versioning][semantic_versioning].

## [2.0.0](https://github.com/phalcon/cli-options-parser/releases/tag/v2.0.0) (2023-11-24)

### Changed

- The minimum PHP version is 8.0.
- The code is tidied up, with PHP 8 types.

### Added

- CI with GitHub Actions. [#17](https://github.com/phalcon/cli-options-parser/issues/17)
- Code analysis with Codacy.
- Badges in the README.

## [1.3.0](https://github.com/phalcon/cli-options-parser/releases/tag/v1.3.0) (2021-08-03)

### Changed

- The minimum PHP version is 7.3.

### Added

- Support for PHP 8.0.

## [1.2.1](https://github.com/phalcon/cli-options-parser/releases/tag/v1.2.1) (2020-03-14)

### Changed

- The Composer archive excludes the development files. [#16](https://github.com/phalcon/cli-options-parser/pull/16)

### Fixed

- `has()` and `get()` document `$key` as a string or an integer, for positional arguments. [#18](https://github.com/phalcon/cli-options-parser/pull/18)

## [1.2.0](https://github.com/phalcon/cli-options-parser/releases/tag/v1.2.0) (2019-10-27)

### Added

- `Parser::has()` and `Parser::get()`. [#12](https://github.com/phalcon/cli-options-parser/pull/12)
- `Parser::getParsedCommands()`. [#13](https://github.com/phalcon/cli-options-parser/pull/13)

## [1.1.0](https://github.com/phalcon/cli-options-parser/releases/tag/v1.1.0) (2018-10-08)

### Changed

- The Phalcon extension is not required.
- An empty input does not throw an exception. The class `Phalcon\Cop\Exception` is removed.

## [1.0.0](https://github.com/phalcon/cli-options-parser/releases/tag/v1.0.0) (2018-04-18)

### Added

- The first release.

[keep_a_changelog]: https://keepachangelog.com/en/1.1.0/
[semantic_versioning]: https://semver.org/spec/v2.0.0.html
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

Command line arguments/options parser.

The documentation is at <https://cop.phalcon.io>.

## Requirements

* PHP >= 8.0
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"archive": {
"exclude": [
"/.github",
"/docs",
"/resources",
"/tests",
"docker-compose.yml"
Expand Down
1 change: 0 additions & 1 deletion docs/.gitkeep

This file was deleted.

15 changes: 15 additions & 0 deletions docs/AGENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# The documentation site: notes for agents

- The site is built with the Phalcon docs kit (`@phalcon/docs-kit`, a folder of
phalcon/assets). Read its README before a change: it lists the files of a
site and the `docs-kit` commands.
- Change only the values (`src/lib/site.mjs`), the pages
(`src/content/docs-<version>/`) and the sidebars (`src/sidebar/<version>.mjs`).
A change of a component, a layout, a style or a script belongs in the kit.
- Do not edit the generated files (`src/components.ts`, `src/content.config.ts`,
`src/versions.generated.mjs`, `src/pages/`, the changelog pages): git ignores
them, and `docs-kit register` and `docs-kit changelog` write them.
- Do not edit the synced files (`astro.config.ts`, `tsconfig.json`,
`pnpm-workspace.yaml`, `nimbus.json`, `serve`): `docs-kit sync` writes them.
- No tools on the host: the Node commands run in the `phalcon-docs` image, with
`TMPDIR` in a folder of the repository.
13 changes: 13 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# The documentation site

The site of this package, built with the Phalcon docs kit
([`@phalcon/docs-kit`](https://github.com/phalcon/assets/tree/master/docs-kit)).
The kit has the components, the layouts, the styles and the scripts; this
folder has the values of the site (`src/lib/site.mjs`), the pages
(`src/content/docs-<version>/`) and the sidebars (`src/sidebar/<version>.mjs`).

- Serve it locally: `docs/serve` (then http://localhost:<port of package.json>).
- Build and check it: see the guide of the kit.

The guide of the kit lists the files of a site, the `docs-kit` commands, and
how to add a version.
11 changes: 11 additions & 0 deletions docs/astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import nimbus from "@cloudflare/nimbus-docs";
import { defineDocsSite, nimbusConfig, nimbusOptions } from "@phalcon/docs-kit/config";
import * as tools from "./src/lib/design-checks.mjs";
import * as values from "./src/lib/site.mjs";
import * as generated from "./src/versions.generated.mjs";

// The same file in every site on the docs kit (`docs-kit sync` writes it).
// The site makes the nimbus(...) call itself: `nimbus-docs check` reads it here.
const settings = { root: new URL("./", import.meta.url), values, generated, tools };

export default defineDocsSite(settings, nimbus(nimbusConfig(settings), nimbusOptions));
42 changes: 42 additions & 0 deletions docs/nimbus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://nimbus-docs.com/schema/nimbus.json",
"version": "0.6.6",
"templatesTag": "templates-v0.6.6",
"variant": "empty",
"registry": "https://nimbus-docs.com/registry",
"install": {
"root": "src",
"aliases": {
"@/*": "src/*"
}
},
"components": [
{
"slug": "popover",
"type": "registry:ui",
"version": "0.8.2",
"source": "https://nimbus-docs.com/registry",
"hash": "sha256:3ad5f4ef9481e6af165954dfe2edd1478b84a41a8e6ef66e99a14d5186c7a475",
"files": [
"src/components/ui/popover/Popover.astro",
"src/components/ui/popover/PopoverContent.astro",
"src/components/ui/popover/PopoverTrigger.astro",
"src/components/ui/popover/index.ts",
"src/components/ui/popover/popover.client.ts"
]
},
{
"slug": "version-switcher",
"type": "registry:ui",
"version": "0.8.2",
"source": "https://nimbus-docs.com/registry",
"hash": "sha256:390bf93537278f1a3ad54ae5fa97318891e41573643e50f869166ef8da7f013d",
"files": [
"src/components/ui/version-switcher/README.md",
"src/components/ui/version-switcher/VersionSwitcher.astro",
"src/components/ui/version-switcher/index.ts"
]
}
],
"lastReviewedNimbusVersion": "0.20.0"
}
20 changes: 20 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "phalcon-cli-options-parser-docs",
"version": "0.0.1",
"private": true,
"type": "module",
"packageManager": "pnpm@11.29.0",
"config": {
"port": "4324"
},
"scripts": {
"dev": "docs-kit register && docs-kit changelog && docs-kit astro dev",
"build": "docs-kit register && docs-kit changelog && docs-kit astro build",
"typecheck": "docs-kit register && docs-kit astro check",
"test": "docs-kit register && docs-kit test",
"lint:docs": "docs-kit nimbus lint"
},
"dependencies": {
"@phalcon/docs-kit": "https://github.com/phalcon/assets/releases/download/kit-v2.0.0/phalcon-docs-kit-2.0.0.tgz"
}
}
Loading