Use monorepo for examples

This commit is contained in:
AkiraFukushima 2022-01-02 16:28:11 +09:00
parent be87a66f3d
commit 4486e3bd78
No known key found for this signature in database
GPG key ID: B6E51BAC4DE1A957
192 changed files with 1802 additions and 18207 deletions

View file

@ -20,9 +20,9 @@ jobs:
yarn install
- name: Build
run: |
yarn run build
yarn workspace megalodon run build
- name: Publish
run: |
yarn publish
yarn workspace megalodon publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View file

@ -28,19 +28,13 @@ jobs:
yarn install
- name: Build
run: |
yarn run build
yarn workspace megalodon run build
- name: Testing
run: |
yarn run test
yarn workspace megalodon run test
- name: Browser example
working-directory: example/browser
run: |
rm -rf node_modules
npm install
npm run build
- name: Browser typescript
working-directory: example/typescript
yarn workspace browser run build
- name: Typescript example
run: |
rm -rf node_modules
npm install
npm run build
yarn workspace example run build

View file

@ -1,11 +0,0 @@
node_modules
./src
./example
*.log
.eslintrc.js
.gitignore
.prettierrc
.travis.yml
sideci.yml
tsconfig.json
tslint.json

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,7 @@
{
"name": "browser",
"version": "3.7.0",
"private": true,
"scripts": {
"build": "webpack",
"start": "http-server -p 8000 -s index.html"
@ -7,7 +9,7 @@
"author": "Akira Fukushima <h3.poteto@gmail.com> (https://github.com/h3poteto)",
"license": "MIT",
"dependencies": {
"megalodon": "file:../../"
"megalodon": "3.7.0"
},
"devDependencies": {
"assert": "^2.0.0",

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,14 @@
{
"name": "example",
"version": "3.7.0",
"private": true,
"scripts": {
"build": "tsc -p ./"
},
"author": "h3poteto",
"license": "MIT",
"dependencies": {
"megalodon": "file:../../",
"megalodon": "3.7.0",
"typescript": "4.5.4"
},
"devDependencies": {

View file

3
megalodon/.npmignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
./src
tsconfig.json

91
megalodon/package.json Normal file
View file

@ -0,0 +1,91 @@
{
"name": "megalodon",
"version": "3.7.0",
"description": "Mastodon API client for node.js and browser",
"main": "./lib/src/index.js",
"typings": "./lib/src/index.d.ts",
"scripts": {
"build": "tsc -p ./",
"lint": "eslint --ext .js,.ts src",
"doc": "typedoc --out ../docs ./src",
"test": "NODE_ENV=test jest -u --maxWorkers=3"
},
"repository": {
"type": "git",
"url": "git+https://github.com/h3poteto/megalodon.git"
},
"keywords": [
"mastodon",
"client",
"api",
"streaming",
"rest",
"proxy"
],
"author": "h3poteto",
"license": "MIT",
"bugs": {
"url": "https://github.com/h3poteto/megalodon/issues"
},
"jest": {
"moduleFileExtensions": [
"ts",
"js"
],
"moduleNameMapper": {
"^@/(.+)": "<rootDir>/src/$1",
"^~/(.+)": "<rootDir>/$1"
},
"testMatch": [
"**/test/**/*.spec.ts"
],
"preset": "ts-jest/presets/default",
"transform": {
"^.+\\.(ts|tsx)$": "ts-jest"
},
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.json"
}
},
"testEnvironment": "node"
},
"homepage": "https://github.com/h3poteto/megalodon#readme",
"dependencies": {
"@types/oauth": "^0.9.0",
"@types/ws": "^8.2.0",
"axios": "^0.24.0",
"dayjs": "^1.10.4",
"form-data": "^4.0.0",
"https-proxy-agent": "^5.0.0",
"oauth": "^0.9.15",
"object-assign-deep": "^0.4.0",
"socks-proxy-agent": "^6.1.0",
"typescript": "4.5.4",
"uuid": "^8.0.0",
"ws": "8.4.0"
},
"devDependencies": {
"@types/core-js": "^2.5.0",
"@types/form-data": "^2.5.0",
"@types/jest": "^27.0.2",
"@types/object-assign-deep": "^0.4.0",
"@types/uuid": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^4.32.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^5.2.0",
"eslint-plugin-standard": "^5.0.0",
"jest": "^27.2.4",
"jest-worker": "^27.2.4",
"lodash": "^4.17.14",
"prettier": "^2.0.2",
"ts-jest": "^27.0.5",
"typedoc": "^0.22.4"
}
}

Some files were not shown because too many files have changed in this diff Show more