mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-06 21:42:49 +00:00
ci: get CI ready for publishing the npm package
This commit is contained in:
20
.gitlab-ci.yml
Normal file
20
.gitlab-ci.yml
Normal file
@@ -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]+$/
|
||||||
12
.npmignore
12
.npmignore
@@ -2,16 +2,8 @@
|
|||||||
# See https://stackoverflow.com/a/29932318
|
# See https://stackoverflow.com/a/29932318
|
||||||
/*
|
/*
|
||||||
# Except these files/folders
|
# Except these files/folders
|
||||||
!.editorconfig
|
!index.json
|
||||||
!.gitignore
|
|
||||||
!.npmignore
|
|
||||||
!lib
|
|
||||||
lib/tsconfig.tsbuildinfo
|
|
||||||
!LICENSE
|
!LICENSE
|
||||||
!package.json
|
!package.json
|
||||||
!package-lock.json
|
!package-lock.json
|
||||||
!README.md
|
!README.md
|
||||||
!scripts
|
|
||||||
!templates
|
|
||||||
!tsconfig.json
|
|
||||||
!tslint.json
|
|
||||||
53
LICENSE
53
LICENSE
@@ -619,56 +619,3 @@ Program, unless a warranty or assumption of liability accompanies a
|
|||||||
copy of the Program in return for a fee.
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
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 <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
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:
|
|
||||||
|
|
||||||
<program> 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
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
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
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
||||||
|
|||||||
17
package.json
17
package.json
@@ -1,12 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "@openstapps/prettier-config",
|
"name": "@openstapps/prettier-config",
|
||||||
"version": "1.0.0",
|
"version": "0.0.1",
|
||||||
"description": "StApps Prettier Config",
|
"description": "StApps Prettier Config",
|
||||||
"main": "index.json",
|
"main": "index.json",
|
||||||
|
"author": "Thea Schöbl <dev@theaninova.de>",
|
||||||
|
"license": "GPL-3.0-only",
|
||||||
|
"contributors": [
|
||||||
|
"Rainer Killinger <mail-openstapps@killinger.co>"
|
||||||
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@gitlab.com:openstapps/prettier-config.git"
|
"url": "git@gitlab.com:openstapps/prettier-config.git"
|
||||||
},
|
},
|
||||||
"author": "Thea Schöbl <dev@theaninova.de>",
|
"scripts": {
|
||||||
"license": "GPL-3.0-only"
|
"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\""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
test/test-file.js
Normal file
17
test/test-file.js
Normal file
@@ -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'};
|
||||||
Reference in New Issue
Block a user