Archived
0
0
Fork 0

ci: test CI, rollup and publish

This commit is contained in:
Daryl Ronningen 2021-07-03 20:32:01 -05:00
parent db4bff4733
commit 4b4d4aea5d
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
13 changed files with 479 additions and 82 deletions

1
.gitignore vendored
View file

@ -676,3 +676,4 @@ DerivedData/
!.yarn/releases !.yarn/releases
.size-snapshot.json .size-snapshot.json
stats.html stats.html
types

View file

@ -9,7 +9,6 @@
</value> </value>
</option> </option>
<option name="LINE_SEPARATOR" value="&#10;" /> <option name="LINE_SEPARATOR" value="&#10;" />
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
<option name="SOFT_MARGINS" value="80,120" /> <option name="SOFT_MARGINS" value="80,120" />
<CssCodeStyleSettings> <CssCodeStyleSettings>
<option name="HEX_COLOR_UPPER_CASE" value="true" /> <option name="HEX_COLOR_UPPER_CASE" value="true" />

View file

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="JavaScriptLibraryMappings"> <component name="JavaScriptLibraryMappings">
<file url="file://$PROJECT_DIR$" libraries="{ArgonLibrary/node_modules}" />
<file url="PROJECT" libraries="{ArgonLibrary/node_modules}" />
<includedPredefinedLibrary name="Node.js Core" /> <includedPredefinedLibrary name="Node.js Core" />
</component> </component>
</project> </project>

View file

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectResources"> <component name="ProjectResources">
<xml-schema-version>XMLSchema_1_1</xml-schema-version> <xml-schema-version>XMLSchema_1_1</xml-schema-version>
</component> </component>

File diff suppressed because one or more lines are too long

View file

@ -7,5 +7,7 @@ plugins:
spec: "@yarnpkg/plugin-interactive-tools" spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools" spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
yarnPath: .yarn/releases/yarn-sources.cjs yarnPath: .yarn/releases/yarn-sources.cjs

35
Jenkinsfile vendored
View file

@ -1,5 +1,9 @@
pipeline { pipeline {
agent any agent {
docker {
image 'node:14-alpine'
}
}
environment { environment {
GITEA_TOKEN = credentials('GITEA_TOKEN') GITEA_TOKEN = credentials('GITEA_TOKEN')
@ -8,24 +12,35 @@ pipeline {
GIT_AUTHOR_EMAIL = 'jenkins@relms.dev' GIT_AUTHOR_EMAIL = 'jenkins@relms.dev'
GIT_COMMITTER_NAME = 'JenkinsCI' GIT_COMMITTER_NAME = 'JenkinsCI'
GIT_COMMITTER_EMAIL = 'jenkins@relms.dev' GIT_COMMITTER_EMAIL = 'jenkins@relms.dev'
NODE_ENV = 'production'
} }
stages { stages {
stage('Dependencies') {
steps {
echo '==========Installing Dependencies=========='
sh 'yarn install'
}
}
stage('Build') { stage('Build') {
steps { steps {
echo 'Building..' echo '==========Bundling Application=========='
sh 'yarn build'
} }
} }
stage('Test') { stage('Publish') {
steps { steps {
echo 'Testing..' 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)'
stage('Deploy') { sh 'yarn npm publish --tag dev'
steps { } else if(env.BRANCH_NAME == 'stable') {
echo 'Deploying....' echo '==========Publishing as Stable Version=========='
sh 'semantic-release'
}
} }
} }
} }

1
README.md Normal file
View file

@ -0,0 +1 @@
# Soon

View file

@ -1,15 +1,31 @@
{ {
"name": "@argonjs/library", "name": "@neonjs/library",
"version": "0.0.1", "version": "0.0.1",
"description": "Discord API Wrapper", "description": "Discord API Wrapper",
"main": "dist/index.js", "license": "MIT",
"repository": "https://code.relms.dev/ArgonJS/library.git", "main": "dist/src/index.js",
"bugs": "https://code.relms.dev/ArgonJS/library/issues", "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>", "author": "Daryl Ronningen <relms@relms.dev>",
"maintainers": [], "maintainers": [],
"contributors": [], "contributors": [],
"license": "MIT", "engines": {
"node": ">=14.*"
},
"files": [
"dist/index.js"
],
"scripts": { "scripts": {
"build": "rollup -c --compact",
"commit": "cz", "commit": "cz",
"postinstall": "husky install", "postinstall": "husky install",
"prepublishOnly": "pinst --disable", "prepublishOnly": "pinst --disable",
@ -24,9 +40,7 @@
"@commitlint/config-conventional": "^12.1.4", "@commitlint/config-conventional": "^12.1.4",
"@commitlint/cz-commitlint": "^12.1.4", "@commitlint/cz-commitlint": "^12.1.4",
"@istanbuljs/nyc-config-typescript": "^1.0.1", "@istanbuljs/nyc-config-typescript": "^1.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-strip": "^2.0.1", "@rollup/plugin-strip": "^2.0.1",
"@rollup/plugin-typescript": "^8.2.1",
"@saithodev/semantic-release-gitea": "^2.1.0", "@saithodev/semantic-release-gitea": "^2.1.0",
"@semantic-release/changelog": "^5.0.1", "@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1", "@semantic-release/commit-analyzer": "^8.0.1",
@ -64,6 +78,7 @@
"rollup-plugin-size-snapshot": "^0.12.0", "rollup-plugin-size-snapshot": "^0.12.0",
"rollup-plugin-sizes": "^1.0.4", "rollup-plugin-sizes": "^1.0.4",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"rollup-plugin-visualizer": "^5.5.1", "rollup-plugin-visualizer": "^5.5.1",
"semantic-release": "^17.4.4", "semantic-release": "^17.4.4",
"sinon": "^11.1.1", "sinon": "^11.1.1",

View file

@ -1,5 +1,3 @@
import json from '@rollup/plugin-json';
import typescript from '@rollup/plugin-typescript';
import { defineConfig } from 'rollup'; import { defineConfig } from 'rollup';
import analyze from 'rollup-plugin-analyzer'; import analyze from 'rollup-plugin-analyzer';
import multiInput from 'rollup-plugin-multi-input'; 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 { sizeSnapshot } from 'rollup-plugin-size-snapshot';
import sizes from 'rollup-plugin-sizes'; import sizes from 'rollup-plugin-sizes';
import { terser } from 'rollup-plugin-terser'; import { terser } from 'rollup-plugin-terser';
import typescript from 'rollup-plugin-typescript2';
import visualizer from 'rollup-plugin-visualizer'; import visualizer from 'rollup-plugin-visualizer';
export default defineConfig({ export default defineConfig({
input: [ 'src/index.ts' ], input: [ 'src/index.ts' ],
output: { output: [{
dir: 'dist', dir: 'dist/src',
format: 'cjs', format: 'cjs',
}, }],
plugins: [ plugins: [
typescript({ module: 'ESNext', include: [ 'src/**/*.ts', '*.json' ] }), typescript({ useTsconfigDeclarationDir: true }),
json({ compact: true, preferConst: true }),
multiInput(), multiInput(),
progress(), progress(),
analyze(), analyze(),

View file

@ -1 +1,3 @@
console.log('HAI!'); export default () => {
return 'Hello World';
};

View file

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"allowJs": true, "declaration": true,
"checkJs": true, "declarationDir": "types",
"composite": true, "composite": true,
"downlevelIteration": true, "downlevelIteration": true,
"importHelpers": true, "importHelpers": true,
@ -10,9 +10,8 @@
"ESNext", "ESNext",
"DOM" "DOM"
], ],
"module": "CommonJS", "module": "ESNext",
"outDir": "dist", "outDir": "dist",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"removeComments": true, "removeComments": true,
"target": "ESNext", "target": "ESNext",
"alwaysStrict": true, "alwaysStrict": true,
@ -45,30 +44,14 @@
"newLine": "lf", "newLine": "lf",
"noEmitOnError": false, "noEmitOnError": false,
"preserveConstEnums": true, "preserveConstEnums": true,
"resolveJsonModule": true,
"traceResolution": false, "traceResolution": false,
"baseUrl": ".", "baseUrl": ".",
"moduleResolution": "Node", "moduleResolution": "Node"
"paths": {
"@/*": [
"*"
],
"@/src": [
"src/*"
],
"@lib/*": [
"src/lib/*"
],
"@utils/*": [
"src/lib/utils/*"
],
"@structures/*": [
"src/lib/structures/*"
]
}
}, },
"include": [ "include": [
"src/**/*.ts", "src/**/*.ts"
"*.json" ],
"exclude": [
"node_modules"
] ]
} }

View file

@ -13,9 +13,7 @@ __metadata:
"@commitlint/config-conventional": ^12.1.4 "@commitlint/config-conventional": ^12.1.4
"@commitlint/cz-commitlint": ^12.1.4 "@commitlint/cz-commitlint": ^12.1.4
"@istanbuljs/nyc-config-typescript": ^1.0.1 "@istanbuljs/nyc-config-typescript": ^1.0.1
"@rollup/plugin-json": ^4.1.0
"@rollup/plugin-strip": ^2.0.1 "@rollup/plugin-strip": ^2.0.1
"@rollup/plugin-typescript": ^8.2.1
"@saithodev/semantic-release-gitea": ^2.1.0 "@saithodev/semantic-release-gitea": ^2.1.0
"@semantic-release/changelog": ^5.0.1 "@semantic-release/changelog": ^5.0.1
"@semantic-release/commit-analyzer": ^8.0.1 "@semantic-release/commit-analyzer": ^8.0.1
@ -53,6 +51,7 @@ __metadata:
rollup-plugin-size-snapshot: ^0.12.0 rollup-plugin-size-snapshot: ^0.12.0
rollup-plugin-sizes: ^1.0.4 rollup-plugin-sizes: ^1.0.4
rollup-plugin-terser: ^7.0.2 rollup-plugin-terser: ^7.0.2
rollup-plugin-typescript2: ^0.30.0
rollup-plugin-visualizer: ^5.5.1 rollup-plugin-visualizer: ^5.5.1
semantic-release: ^17.4.4 semantic-release: ^17.4.4
sinon: ^11.1.1 sinon: ^11.1.1
@ -947,17 +946,6 @@ __metadata:
languageName: node languageName: node
linkType: hard 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": "@rollup/plugin-replace@npm:^2.3.2":
version: 2.4.2 version: 2.4.2
resolution: "@rollup/plugin-replace@npm:2.4.2" resolution: "@rollup/plugin-replace@npm:2.4.2"
@ -983,21 +971,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/plugin-typescript@npm:^8.2.1": "@rollup/pluginutils@npm:^3.1.0":
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":
version: 3.1.0 version: 3.1.0
resolution: "@rollup/pluginutils@npm:3.1.0" resolution: "@rollup/pluginutils@npm:3.1.0"
dependencies: dependencies:
@ -1010,6 +984,18 @@ __metadata:
languageName: node languageName: node
linkType: hard 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": "@saithodev/semantic-release-gitea@npm:^2.1.0":
version: 2.1.0 version: 2.1.0
resolution: "@saithodev/semantic-release-gitea@npm:2.1.0" resolution: "@saithodev/semantic-release-gitea@npm:2.1.0"
@ -4450,7 +4436,7 @@ __metadata:
languageName: node languageName: node
linkType: hard 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 version: 3.3.1
resolution: "find-cache-dir@npm:3.3.1" resolution: "find-cache-dir@npm:3.3.1"
dependencies: dependencies:
@ -8966,7 +8952,7 @@ fsevents@^1.2.7:
languageName: node languageName: node
linkType: hard 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 version: 1.20.0
resolution: "resolve@npm:1.20.0" resolution: "resolve@npm:1.20.0"
dependencies: dependencies:
@ -8976,7 +8962,7 @@ fsevents@^1.2.7:
languageName: node languageName: node
linkType: hard 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 version: 1.20.0
resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin<compat/resolve>::version=1.20.0&hash=00b1ff" resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin<compat/resolve>::version=1.20.0&hash=00b1ff"
dependencies: dependencies:
@ -9147,6 +9133,22 @@ fsevents@^1.2.7:
languageName: node languageName: node
linkType: hard 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": "rollup-plugin-visualizer@npm:^5.5.1":
version: 5.5.1 version: 5.5.1
resolution: "rollup-plugin-visualizer@npm:5.5.1" resolution: "rollup-plugin-visualizer@npm:5.5.1"
@ -10333,6 +10335,13 @@ fsevents@^1.2.7:
languageName: node languageName: node
linkType: hard 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": "tslib@npm:^1.8.1, tslib@npm:^1.9.0":
version: 1.14.1 version: 1.14.1
resolution: "tslib@npm:1.14.1" resolution: "tslib@npm:1.14.1"