diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..27ac2971 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +image: registry.gitlab.com/openstapps/projectmanagement/node + +stages: + - test + - publish + +prettier config file: + stage: test + script: + - npm test + +package: + tags: + - secrecy + stage: publish + script: + - echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc + - npm publish --access=public + only: + - /^v[0-9]+\.[0-9]+\.[0-9]+$/ diff --git a/.npmignore b/.npmignore index 38d0e6f9..1ce212a4 100644 --- a/.npmignore +++ b/.npmignore @@ -2,16 +2,8 @@ # See https://stackoverflow.com/a/29932318 /* # Except these files/folders -!.editorconfig -!.gitignore -!.npmignore -!lib -lib/tsconfig.tsbuildinfo +!index.json !LICENSE !package.json !package-lock.json -!README.md -!scripts -!templates -!tsconfig.json -!tslint.json +!README.md \ No newline at end of file diff --git a/LICENSE b/LICENSE index 524e18a3..810fce6e 100644 --- a/LICENSE +++ b/LICENSE @@ -619,56 +619,3 @@ Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - ESLint Config - Copyright (C) 2022 Open StApps - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) 2022 Open StApps - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/package.json b/package.json index 47d7c3a6..764de98b 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,23 @@ { "name": "@openstapps/prettier-config", - "version": "1.0.0", + "version": "0.0.1", "description": "StApps Prettier Config", "main": "index.json", + "author": "Thea Schöbl ", + "license": "GPL-3.0-only", + "contributors": [ + "Rainer Killinger " + ], "repository": { "type": "git", "url": "git@gitlab.com:openstapps/prettier-config.git" }, - "author": "Thea Schöbl ", - "license": "GPL-3.0-only" + "scripts": { + "changelog": "npx conventional-changelog-cli -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'", + "test": "npx prettier --config index.json --check \"test/*.js\"", + "prepublishOnly": "npm test", + "postversion": "npm run changelog", + "preversion": "npm run prepublishOnly", + "push": "git push && git push origin \"v$npm_package_version\"" + } } diff --git a/test/test-file.js b/test/test-file.js new file mode 100644 index 00000000..7c99be79 --- /dev/null +++ b/test/test-file.js @@ -0,0 +1,17 @@ +function test(one) { + console.log('this is a somewhat long message to push the line limit to 110 characters.....right here....'); +} + +var suchobject = { + foo: 'bar', + baz: 42, + foobar: true, +}; + +var muchobject = { + '1foo': 'bar', + '2baz': 42, + 'foobar': true, +}; + +var bracketSpacing = {foo: 'bar'};