[INIT] create project

This commit is contained in:
Juliane Alanisia 2024-03-14 23:03:18 +08:00
commit 3567d62882
17 changed files with 5907 additions and 0 deletions

19
.drone.yml Normal file
View File

@ -0,0 +1,19 @@
kind: pipeline
type: docker
name: xoana
volumes:
- name: pnpm_cache
host:
path: /var/cache/drone/pnpm_cache
steps:
- name: build
image: node
volumes:
- name: pnpm_cache
path: /drone/src/.pnpm-store/v3
commands:
- corepack enable
- pnpm config set registry https://registry.npmmirror.com
- pnpm install

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules/

8
.prettierrc.json Normal file
View File

@ -0,0 +1,8 @@
{
"bracketSpacing": true,
"bracketSameLine": true,
"vueIndentScriptAndStyle": true,
"tabWidth": 2,
"singleQuote": true,
"semi": true
}

0
Dockerfile Normal file
View File

0
docker-compose.yml Normal file
View File

10
lerna.json Normal file
View File

@ -0,0 +1,10 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"npmClient": "pnpm",
"version": "0.1.0",
"command": {
"run": {
"npmClient": "pnpm"
}
}
}

16
package.json Normal file
View File

@ -0,0 +1,16 @@
{
"name": "xoana",
"private": true,
"scripts": {
"format": "prettier packages/**/*.{json,ts,js,tsx} ./*.{json,ts,js,yaml} -w --config .prettierrc.json"
},
"workspaces": [
"packages/*"
],
"devDependencies": {
"@types/lodash": "^4.17.0",
"lerna": "^8.1.2",
"prettier": "^3.2.5",
"typescript": "^5.4.2"
}
}

11
packages/api/README.md Normal file
View File

@ -0,0 +1,11 @@
# `@xoana/api`
> TODO: description
## Usage
```
const api = require('@xoana/api');
// TODO: DEMONSTRATE API
```

View File

@ -0,0 +1,7 @@
'use strict';
const api = require('..');
const assert = require('assert').strict;
assert.strictEqual(api(), 'Hello from api');
console.info('api tests passed');

7
packages/api/lib/api.js Normal file
View File

@ -0,0 +1,7 @@
'use strict';
module.exports = api;
function api() {
return 'Hello from api';
}

22
packages/api/package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "@xoana/api",
"version": "0.1.0",
"description": "> TODO: description",
"author": "Juliane Alanisia <chen667ch@gmail.com>",
"homepage": "",
"license": "ISC",
"main": "src/index.ts",
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"publishConfig": {
"registry": "https://registry.npmmirror.com/"
},
"scripts": {
"test": "node ./__tests__/@xoana/api.test.js"
}
}

11
packages/app/README.md Normal file
View File

@ -0,0 +1,11 @@
# `@xoana/app`
> TODO: description
## Usage
```
const app = require('@xoana/app');
// TODO: DEMONSTRATE API
```

View File

@ -0,0 +1,7 @@
'use strict';
const app = require('..');
const assert = require('assert').strict;
assert.strictEqual(app(), 'Hello from app');
console.info('app tests passed');

7
packages/app/lib/app.js Normal file
View File

@ -0,0 +1,7 @@
'use strict';
module.exports = app;
function app() {
return 'Hello from app';
}

22
packages/app/package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "@xoana/app",
"version": "0.1.0",
"description": "Xoana application",
"author": "Juliane Alanisia <chen667ch@gmail.com>",
"homepage": "",
"license": "ISC",
"main": "src/index.ts",
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"publishConfig": {
"registry": "https://registry.npmmirror.com/"
},
"scripts": {
"test": "node ./__tests__/@xoana/app.test.js"
}
}

5757
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

2
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,2 @@
packages:
- 'packages/*'