ci: test CI, rollup and publish
This commit is contained in:
parent
db4bff4733
commit
4b4d4aea5d
13 changed files with 479 additions and 82 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -676,3 +676,4 @@ DerivedData/
|
|||
!.yarn/releases
|
||||
.size-snapshot.json
|
||||
stats.html
|
||||
types
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
</value>
|
||||
</option>
|
||||
<option name="LINE_SEPARATOR" value=" " />
|
||||
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
|
||||
<option name="SOFT_MARGINS" value="80,120" />
|
||||
<CssCodeStyleSettings>
|
||||
<option name="HEX_COLOR_UPPER_CASE" value="true" />
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="file://$PROJECT_DIR$" libraries="{ArgonLibrary/node_modules}" />
|
||||
<file url="PROJECT" libraries="{ArgonLibrary/node_modules}" />
|
||||
<includedPredefinedLibrary name="Node.js Core" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectResources">
|
||||
<xml-schema-version>XMLSchema_1_1</xml-schema-version>
|
||||
</component>
|
||||
|
|
367
.yarn/plugins/@yarnpkg/plugin-version.cjs
vendored
Normal file
367
.yarn/plugins/@yarnpkg/plugin-version.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -7,5 +7,7 @@ plugins:
|
|||
spec: "@yarnpkg/plugin-interactive-tools"
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
|
||||
spec: "@yarnpkg/plugin-workspace-tools"
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
||||
spec: "@yarnpkg/plugin-version"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-sources.cjs
|
||||
|
|
35
Jenkinsfile
vendored
35
Jenkinsfile
vendored
|
@ -1,5 +1,9 @@
|
|||
pipeline {
|
||||
agent any
|
||||
agent {
|
||||
docker {
|
||||
image 'node:14-alpine'
|
||||
}
|
||||
}
|
||||
|
||||
environment {
|
||||
GITEA_TOKEN = credentials('GITEA_TOKEN')
|
||||
|
@ -8,24 +12,35 @@ pipeline {
|
|||
GIT_AUTHOR_EMAIL = 'jenkins@relms.dev'
|
||||
GIT_COMMITTER_NAME = 'JenkinsCI'
|
||||
GIT_COMMITTER_EMAIL = 'jenkins@relms.dev'
|
||||
NODE_ENV = 'production'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Dependencies') {
|
||||
steps {
|
||||
echo '==========Installing Dependencies=========='
|
||||
sh 'yarn install'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
echo 'Building..'
|
||||
echo '==========Bundling Application=========='
|
||||
sh 'yarn build'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
stage('Publish') {
|
||||
steps {
|
||||
echo 'Testing..'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
echo 'Deploying....'
|
||||
echo '==========Publishing to NPM=========='
|
||||
if(env.BRANCH_NAME == 'master') {
|
||||
echo '==========Publishing as Development Version=========='
|
||||
sh 'yarn version $(jq --raw-output ".version" package.json)-$(git rev-parse --short HEAD).$(date +%s)'
|
||||
sh 'yarn npm publish --tag dev'
|
||||
} else if(env.BRANCH_NAME == 'stable') {
|
||||
echo '==========Publishing as Stable Version=========='
|
||||
sh 'semantic-release'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
1
README.md
Normal file
1
README.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Soon
|
29
package.json
29
package.json
|
@ -1,15 +1,31 @@
|
|||
{
|
||||
"name": "@argonjs/library",
|
||||
"name": "@neonjs/library",
|
||||
"version": "0.0.1",
|
||||
"description": "Discord API Wrapper",
|
||||
"main": "dist/index.js",
|
||||
"repository": "https://code.relms.dev/ArgonJS/library.git",
|
||||
"bugs": "https://code.relms.dev/ArgonJS/library/issues",
|
||||
"license": "MIT",
|
||||
"main": "dist/src/index.js",
|
||||
"types": "types/src/index.d.ts",
|
||||
"repository": "https://code.relms.dev/NeonJS/library.git",
|
||||
"bugs": "https://code.relms.dev/NeonJS/library/issues",
|
||||
"keywords": [
|
||||
"Discord",
|
||||
"wrapper",
|
||||
"api",
|
||||
"discord.js",
|
||||
"argon",
|
||||
"argonjs"
|
||||
],
|
||||
"author": "Daryl Ronningen <relms@relms.dev>",
|
||||
"maintainers": [],
|
||||
"contributors": [],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14.*"
|
||||
},
|
||||
"files": [
|
||||
"dist/index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rollup -c --compact",
|
||||
"commit": "cz",
|
||||
"postinstall": "husky install",
|
||||
"prepublishOnly": "pinst --disable",
|
||||
|
@ -24,9 +40,7 @@
|
|||
"@commitlint/config-conventional": "^12.1.4",
|
||||
"@commitlint/cz-commitlint": "^12.1.4",
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-strip": "^2.0.1",
|
||||
"@rollup/plugin-typescript": "^8.2.1",
|
||||
"@saithodev/semantic-release-gitea": "^2.1.0",
|
||||
"@semantic-release/changelog": "^5.0.1",
|
||||
"@semantic-release/commit-analyzer": "^8.0.1",
|
||||
|
@ -64,6 +78,7 @@
|
|||
"rollup-plugin-size-snapshot": "^0.12.0",
|
||||
"rollup-plugin-sizes": "^1.0.4",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"rollup-plugin-typescript2": "^0.30.0",
|
||||
"rollup-plugin-visualizer": "^5.5.1",
|
||||
"semantic-release": "^17.4.4",
|
||||
"sinon": "^11.1.1",
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import json from '@rollup/plugin-json';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import { defineConfig } from 'rollup';
|
||||
import analyze from 'rollup-plugin-analyzer';
|
||||
import multiInput from 'rollup-plugin-multi-input';
|
||||
|
@ -7,17 +5,17 @@ import progress from 'rollup-plugin-progress';
|
|||
import { sizeSnapshot } from 'rollup-plugin-size-snapshot';
|
||||
import sizes from 'rollup-plugin-sizes';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import visualizer from 'rollup-plugin-visualizer';
|
||||
|
||||
export default defineConfig({
|
||||
input: [ 'src/index.ts' ],
|
||||
output: {
|
||||
dir: 'dist',
|
||||
output: [{
|
||||
dir: 'dist/src',
|
||||
format: 'cjs',
|
||||
},
|
||||
}],
|
||||
plugins: [
|
||||
typescript({ module: 'ESNext', include: [ 'src/**/*.ts', '*.json' ] }),
|
||||
json({ compact: true, preferConst: true }),
|
||||
typescript({ useTsconfigDeclarationDir: true }),
|
||||
multiInput(),
|
||||
progress(),
|
||||
analyze(),
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
console.log('HAI!');
|
||||
export default () => {
|
||||
return 'Hello World';
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "types",
|
||||
"composite": true,
|
||||
"downlevelIteration": true,
|
||||
"importHelpers": true,
|
||||
|
@ -10,9 +10,8 @@
|
|||
"ESNext",
|
||||
"DOM"
|
||||
],
|
||||
"module": "CommonJS",
|
||||
"module": "ESNext",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/.tsbuildinfo",
|
||||
"removeComments": true,
|
||||
"target": "ESNext",
|
||||
"alwaysStrict": true,
|
||||
|
@ -45,30 +44,14 @@
|
|||
"newLine": "lf",
|
||||
"noEmitOnError": false,
|
||||
"preserveConstEnums": true,
|
||||
"resolveJsonModule": true,
|
||||
"traceResolution": false,
|
||||
"baseUrl": ".",
|
||||
"moduleResolution": "Node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"*"
|
||||
],
|
||||
"@/src": [
|
||||
"src/*"
|
||||
],
|
||||
"@lib/*": [
|
||||
"src/lib/*"
|
||||
],
|
||||
"@utils/*": [
|
||||
"src/lib/utils/*"
|
||||
],
|
||||
"@structures/*": [
|
||||
"src/lib/structures/*"
|
||||
]
|
||||
}
|
||||
"moduleResolution": "Node"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"*.json"
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
|
71
yarn.lock
71
yarn.lock
|
@ -13,9 +13,7 @@ __metadata:
|
|||
"@commitlint/config-conventional": ^12.1.4
|
||||
"@commitlint/cz-commitlint": ^12.1.4
|
||||
"@istanbuljs/nyc-config-typescript": ^1.0.1
|
||||
"@rollup/plugin-json": ^4.1.0
|
||||
"@rollup/plugin-strip": ^2.0.1
|
||||
"@rollup/plugin-typescript": ^8.2.1
|
||||
"@saithodev/semantic-release-gitea": ^2.1.0
|
||||
"@semantic-release/changelog": ^5.0.1
|
||||
"@semantic-release/commit-analyzer": ^8.0.1
|
||||
|
@ -53,6 +51,7 @@ __metadata:
|
|||
rollup-plugin-size-snapshot: ^0.12.0
|
||||
rollup-plugin-sizes: ^1.0.4
|
||||
rollup-plugin-terser: ^7.0.2
|
||||
rollup-plugin-typescript2: ^0.30.0
|
||||
rollup-plugin-visualizer: ^5.5.1
|
||||
semantic-release: ^17.4.4
|
||||
sinon: ^11.1.1
|
||||
|
@ -947,17 +946,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/plugin-json@npm:^4.1.0":
|
||||
version: 4.1.0
|
||||
resolution: "@rollup/plugin-json@npm:4.1.0"
|
||||
dependencies:
|
||||
"@rollup/pluginutils": ^3.0.8
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0 || ^2.0.0
|
||||
checksum: 867bc9339b4ccf0b9ff3b2617a95b3b8920115163f86c8e3b1f068a14ca25949472d3c05b09a5ac38ca0fe2185756e34617eaeb219d4a2b6e2307c501c7d4552
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/plugin-replace@npm:^2.3.2":
|
||||
version: 2.4.2
|
||||
resolution: "@rollup/plugin-replace@npm:2.4.2"
|
||||
|
@ -983,21 +971,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/plugin-typescript@npm:^8.2.1":
|
||||
version: 8.2.1
|
||||
resolution: "@rollup/plugin-typescript@npm:8.2.1"
|
||||
dependencies:
|
||||
"@rollup/pluginutils": ^3.1.0
|
||||
resolve: ^1.17.0
|
||||
peerDependencies:
|
||||
rollup: ^2.14.0
|
||||
tslib: "*"
|
||||
typescript: ">=3.7.0"
|
||||
checksum: a9dbd2000ec0190742322c445e403b43db65c21f7f548279473e4f512a17f482b28f1b98b2a58373e63b24611c31aa193037043c6aea159756c67ea49658dff2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/pluginutils@npm:^3.0.8, @rollup/pluginutils@npm:^3.1.0":
|
||||
"@rollup/pluginutils@npm:^3.1.0":
|
||||
version: 3.1.0
|
||||
resolution: "@rollup/pluginutils@npm:3.1.0"
|
||||
dependencies:
|
||||
|
@ -1010,6 +984,18 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/pluginutils@npm:^4.1.0":
|
||||
version: 4.1.0
|
||||
resolution: "@rollup/pluginutils@npm:4.1.0"
|
||||
dependencies:
|
||||
estree-walker: ^2.0.1
|
||||
picomatch: ^2.2.2
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0||^2.0.0
|
||||
checksum: 5ef767b4e57aaea4ad223af2fa50e5ee1e2d8a94bd79f534b55485b5aeb89e8839236e45e2c0730541f18534288fba92ae223c54683613f26071e3474564ddd9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@saithodev/semantic-release-gitea@npm:^2.1.0":
|
||||
version: 2.1.0
|
||||
resolution: "@saithodev/semantic-release-gitea@npm:2.1.0"
|
||||
|
@ -4450,7 +4436,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"find-cache-dir@npm:^3.2.0":
|
||||
"find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.1":
|
||||
version: 3.3.1
|
||||
resolution: "find-cache-dir@npm:3.3.1"
|
||||
dependencies:
|
||||
|
@ -8966,7 +8952,7 @@ fsevents@^1.2.7:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@^1.10.0, resolve@^1.17.0, resolve@^1.20.0":
|
||||
"resolve@1.20.0, resolve@^1.10.0, resolve@^1.20.0":
|
||||
version: 1.20.0
|
||||
resolution: "resolve@npm:1.20.0"
|
||||
dependencies:
|
||||
|
@ -8976,7 +8962,7 @@ fsevents@^1.2.7:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@patch:resolve@^1.10.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.17.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>":
|
||||
"resolve@patch:resolve@1.20.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.10.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>":
|
||||
version: 1.20.0
|
||||
resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin<compat/resolve>::version=1.20.0&hash=00b1ff"
|
||||
dependencies:
|
||||
|
@ -9147,6 +9133,22 @@ fsevents@^1.2.7:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup-plugin-typescript2@npm:^0.30.0":
|
||||
version: 0.30.0
|
||||
resolution: "rollup-plugin-typescript2@npm:0.30.0"
|
||||
dependencies:
|
||||
"@rollup/pluginutils": ^4.1.0
|
||||
find-cache-dir: ^3.3.1
|
||||
fs-extra: 8.1.0
|
||||
resolve: 1.20.0
|
||||
tslib: 2.1.0
|
||||
peerDependencies:
|
||||
rollup: ">=1.26.3"
|
||||
typescript: ">=2.4.0"
|
||||
checksum: e3097bb25c00e78cca556ed6a77b3bdf2330e5e5647847d1f967ade67dc6b66009b52bb8810de2b2c40857310693e4e663900a13da4f711f082fabac5165091a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup-plugin-visualizer@npm:^5.5.1":
|
||||
version: 5.5.1
|
||||
resolution: "rollup-plugin-visualizer@npm:5.5.1"
|
||||
|
@ -10333,6 +10335,13 @@ fsevents@^1.2.7:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:2.1.0":
|
||||
version: 2.1.0
|
||||
resolution: "tslib@npm:2.1.0"
|
||||
checksum: aa189c8179de0427b0906da30926fd53c59d96ec239dff87d6e6bc831f608df0cbd6f77c61dabc074408bd0aa0b9ae4ec35cb2c15f729e32f37274db5730cb78
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:^1.8.1, tslib@npm:^1.9.0":
|
||||
version: 1.14.1
|
||||
resolution: "tslib@npm:1.14.1"
|
||||
|
|
Reference in a new issue