From c4bb55697e9d17cb860c061b723d0bbb351c9cde Mon Sep 17 00:00:00 2001 From: Kordrad Date: Tue, 18 Jun 2024 10:52:30 +0200 Subject: [PATCH] feat: add BSD 2-Clause License and author information --- LICENSE | 24 +++++++++++++++++++ projects/cli/LICENSE | 24 +++++++++++++++++++ projects/cli/package.json | 15 +++++++++++- projects/cli/schematics/components/index.ts | 1 + .../components/templates/README.md.template | 11 +++++++++ 5 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 LICENSE create mode 100644 projects/cli/LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d792815 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +BSD 2-Clause License + +Copyright (c) 2024, Konrad Stępień + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/projects/cli/LICENSE b/projects/cli/LICENSE new file mode 100644 index 0000000..d792815 --- /dev/null +++ b/projects/cli/LICENSE @@ -0,0 +1,24 @@ +BSD 2-Clause License + +Copyright (c) 2024, Konrad Stępień + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/projects/cli/package.json b/projects/cli/package.json index f785758..3ad1fab 100644 --- a/projects/cli/package.json +++ b/projects/cli/package.json @@ -1,10 +1,23 @@ { "name": "@ng-zen/cli", "version": "0.0.1", + "license": "BSD-2-Clause", + "repository": { + "url": "https://github.com/Kordrad/ng-zen", + "directory": "projects/cli" + }, + "bugs": { + "url": "https://github.com/Kordrad/ng-zen/issues" + }, + "author": { + "name": "Konrad Stępień", + "email": "kord.stp@gmail.com", + "url": "https://www.linkedin.com/in/KonradStepien/" + }, "scripts": { "build": "tsc -p tsconfig.schematics.json", "postbuild": "npm run copy-files && npm run clean-packagejson", - "copy-files": "copyfiles schematics/*/schema.json schematics/*/files/** schematics/*/templates/** schematics/collection.json **/README.md package.json ../../dist/@ng-zen/cli/", + "copy-files": "copyfiles schematics/*/schema.json schematics/*/files/** schematics/*/templates/** schematics/collection.json **/README.md LICENSE package.json ../../dist/@ng-zen/cli/", "clean-packagejson": "cd ../../dist/@ng-zen/cli && npm pkg delete scripts" }, "schematics": "./schematics/collection.json", diff --git a/projects/cli/schematics/components/index.ts b/projects/cli/schematics/components/index.ts index f3b9232..2cffbbf 100644 --- a/projects/cli/schematics/components/index.ts +++ b/projects/cli/schematics/components/index.ts @@ -17,6 +17,7 @@ export function componentGenerator(options: ComponentGeneratorSchema): Rule { const rules: Rule[] = [ applyTemplates({ name: component, + localeDate: new Date().toLocaleString(), ...strings, }), move(normalize(`${options.path}/${component}`)), diff --git a/projects/cli/schematics/components/templates/README.md.template b/projects/cli/schematics/components/templates/README.md.template index b508e1a..d907266 100644 --- a/projects/cli/schematics/components/templates/README.md.template +++ b/projects/cli/schematics/components/templates/README.md.template @@ -3,6 +3,8 @@ ![GitHub License](https://img.shields.io/github/license/Kordrad/ng-zen) ![Angular Version](https://img.shields.io/badge/angular-v17-red) +Generated by `@ng-zen/cli` on <%= localeDate %> + ## Overview <%= classify(name) %> component was generated by @@ -28,3 +30,12 @@ then you can generate components via ```bash ng generate @ng-zen/cli:component ``` + + +## Author + +This component was generated by the `@ng-zen/cli` tool developed by Konrad Stępień. + +This code is licensed under the BSD-2-Clause license. See the [LICENSE](https://github.com/Kordrad/ng-zen/blob/master/projects/cli/LICENSE) file for more details. + +Source code can be found [here](https://github.com/Kordrad/ng-zen).