@phoenixlan/phoenix.js 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ name: build-library
2
+ on:
3
+ - push
4
+ jobs:
5
+ build:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v3
9
+ - uses: actions/setup-node@v3
10
+ with:
11
+ node-version: '14'
12
+ - run: npm install
13
+ - run: npm run build
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ yarn commitlint --edit $1
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ exec < /dev/tty && git cz --hook || true
package/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # PhoenixJS
2
+
3
+ This repo contains PhoenixJS - a common JavaScript library for interfacing easily with the phoenix REST api server.
4
+
5
+ ## Requirements
6
+
7
+ You need to install commitizen: `yarn global add commitizen`
8
+
9
+ ## Commit rules
10
+
@@ -0,0 +1 @@
1
+ module.exports = {extends: ['@commitlint/config-conventional']}
package/package.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "@phoenixlan/phoenix.js",
3
+ "version": "1.0.1",
4
+ "description": "Phoenix LAN api javascript wrapper",
5
+ "main": "build/index.js",
6
+ "module": "build/index.es.js",
7
+ "types": "build/index.d.ts",
8
+ "author": "petterroea et al",
9
+ "license": "GPL",
10
+ "private": false,
11
+ "scripts": {
12
+ "prepare": "husky install",
13
+ "prepublishOnly": "pinst --disable",
14
+ "postpublish": "pinst --enable",
15
+ "build": "rollup --config",
16
+ "lint": "tslint --project tsconfig.json -c tslint.commit.json",
17
+ "autolint": "lint --fix",
18
+ "test": "jest --runInBand --forceExit",
19
+ "prettify": "prettier **.ts --write",
20
+ "commit": "cz"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "devDependencies": {
26
+ "@commitlint/cli": "^12.0.1",
27
+ "@commitlint/config-conventional": "^12.0.1",
28
+ "@rollup/plugin-commonjs": "^17.0.0",
29
+ "@rollup/plugin-node-resolve": "^11.1.0",
30
+ "@semantic-release/commit-analyzer": "^8.0.1",
31
+ "@semantic-release/exec": "5.0.0",
32
+ "@semantic-release/npm": "^7.0.10",
33
+ "@types/jest": "^26.0.14",
34
+ "@typescript-eslint/eslint-plugin": "^3.7.1",
35
+ "@typescript-eslint/parser": "^3.7.1",
36
+ "commitizen": "^4.2.3",
37
+ "cz-conventional-changelog": "3.3.0",
38
+ "eslint": "^7.5.0",
39
+ "husky": "^5.1.3",
40
+ "jest": "^26.4.2",
41
+ "pinst": "^2.1.6",
42
+ "prettier": "^2.0.5",
43
+ "rollup": "^2.38.0",
44
+ "rollup-plugin-peer-deps-external": "^2.2.4",
45
+ "rollup-plugin-typescript2": "^0.29.0",
46
+ "semantic-release": "^17.4.0",
47
+ "typescript": "^4.1.3",
48
+ "tslint": "^6.1.3"
49
+ },
50
+ "dependencies": {
51
+ "jwt-decode": "^3.1.2"
52
+ },
53
+ "config": {
54
+ "commitizen": {
55
+ "path": "./node_modules/cz-conventional-changelog"
56
+ }
57
+ },
58
+ "release": {
59
+ "branches": [
60
+ "master"
61
+ ],
62
+ "plugins": [
63
+ [
64
+ "@semantic-release/commit-analyzer",
65
+ {
66
+ "preset": "angular",
67
+ "releaseRules": [
68
+ {
69
+ "type": "docs",
70
+ "scope": "README",
71
+ "release": "patch"
72
+ },
73
+ {
74
+ "type": "refactor",
75
+ "release": "patch"
76
+ },
77
+ {
78
+ "type": "style",
79
+ "release": "patch"
80
+ }
81
+ ],
82
+ "parserOpts": {
83
+ "noteKeywords": [
84
+ "BREAKING CHANGE",
85
+ "BREAKING CHANGES"
86
+ ]
87
+ }
88
+ }
89
+ ],
90
+ [
91
+ "@semantic-release/npm",
92
+ {
93
+ "npmPublish": true
94
+ }
95
+ ],
96
+ [
97
+ "@semantic-release/exec",
98
+ {
99
+ "publishCmd": "npm publish"
100
+ }
101
+ ]
102
+ ]
103
+ }
104
+ }
@@ -0,0 +1,35 @@
1
+ import resolve from '@rollup/plugin-node-resolve'
2
+ import external from 'rollup-plugin-peer-deps-external'
3
+ import commonjs from '@rollup/plugin-commonjs'
4
+ import typescript from 'rollup-plugin-typescript2'
5
+ import packageJson from './package.json'
6
+
7
+ export default {
8
+ input: 'src/index.ts',
9
+ output: [
10
+ {
11
+ format: 'cjs',
12
+ file: packageJson.main,
13
+ exports: 'named',
14
+ sourcemap: true
15
+ },
16
+ {
17
+ format: 'es',
18
+ file: packageJson.module,
19
+ exports: 'named',
20
+ sourcemap: true
21
+ }
22
+ ],
23
+ plugins: [
24
+ resolve(),
25
+ external(),
26
+ commonjs({
27
+ include: ['node_modules/**'],
28
+ }),
29
+ typescript({
30
+ clean: true,
31
+ rollupCommonJSResolveHack: true,
32
+ exclude: ['node_modules'],
33
+ }),
34
+ ]
35
+ }