@axpo/cli 1.0.0
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.
- package/README.md +91 -0
- package/bin/axpo.js +127 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +2586 -0
- package/dist/index.js.map +1 -0
- package/dist/postinstall.js +4 -0
- package/package.json +68 -0
- package/templates/javascript/ChangeLog.md +16 -0
- package/templates/javascript/axpo.config.js +36 -0
- package/templates/javascript/icon.png +0 -0
- package/templates/javascript/package.json +23 -0
- package/templates/javascript/plugin.json +23 -0
- package/templates/javascript/readme.md +50 -0
- package/templates/javascript/src/main.js +16 -0
- package/templates/typescript/ChangeLog.md +16 -0
- package/templates/typescript/axpo.config.ts +36 -0
- package/templates/typescript/icon.png +0 -0
- package/templates/typescript/package.json +24 -0
- package/templates/typescript/plugin.json +23 -0
- package/templates/typescript/readme.md +50 -0
- package/templates/typescript/src/main.ts +16 -0
- package/templates/typescript/tsconfig.json +16 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineConfig } from '@axpo/sdk';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
buildOptions: {
|
|
5
|
+
entryPoints: ["src/main.js"],
|
|
6
|
+
outdir: "dist",
|
|
7
|
+
platform: "browser",
|
|
8
|
+
bundle: true,
|
|
9
|
+
loader: {
|
|
10
|
+
".js": "jsx",
|
|
11
|
+
".jsx": "jsx",
|
|
12
|
+
".css": "css",
|
|
13
|
+
".png": "file",
|
|
14
|
+
".svg": "text"
|
|
15
|
+
},
|
|
16
|
+
format: 'esm',
|
|
17
|
+
minify: false,
|
|
18
|
+
sourcemap: false,
|
|
19
|
+
target: 'es2020',
|
|
20
|
+
keepNames: true,
|
|
21
|
+
external: [],
|
|
22
|
+
alias: {
|
|
23
|
+
'@': './src',
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
files: [
|
|
28
|
+
'readme.md',
|
|
29
|
+
'icon.png',
|
|
30
|
+
'ChangeLog.md'
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
dev: {
|
|
34
|
+
port: 3000
|
|
35
|
+
}
|
|
36
|
+
});
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "{{description}}",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/main.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "axpo dev",
|
|
9
|
+
"build": "axpo build",
|
|
10
|
+
"clean": "axpo clean",
|
|
11
|
+
"publish": "axpo publish"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"acode",
|
|
15
|
+
"plugin"
|
|
16
|
+
],
|
|
17
|
+
"author": "{{authorName}} <{{email}}>",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@axpo/cli": "latest",
|
|
21
|
+
"@axpo/sdk": "latest"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "{{pluginId}}",
|
|
3
|
+
"name": "{{pluginName}}",
|
|
4
|
+
"main": "dist/main.js",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"readme": "readme.md",
|
|
7
|
+
"icon": "icon.png",
|
|
8
|
+
"minVersionCode": 292,
|
|
9
|
+
"price": 0,
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"acode",
|
|
13
|
+
"plugin"
|
|
14
|
+
],
|
|
15
|
+
"changelogs": "ChangeLog.md",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "{{authorName}}",
|
|
18
|
+
"email": "{{email}}"{{#if github}},
|
|
19
|
+
"url": "https://github.com/{{github}}",
|
|
20
|
+
"github": "{{github}}"{{/if}}
|
|
21
|
+
}{{#if github}},
|
|
22
|
+
"repository": "https://github.com/{{github}}/{{projectName}}"{{/if}}
|
|
23
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# {{pluginName}}
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Feature 1
|
|
8
|
+
- Feature 2
|
|
9
|
+
- Feature 3
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
1. Open Acode app
|
|
14
|
+
2. Go to Plugins
|
|
15
|
+
3. Search for "{{pluginName}}"
|
|
16
|
+
4. Install the plugin
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Describe how to use your plugin here.
|
|
21
|
+
|
|
22
|
+
## Settings
|
|
23
|
+
|
|
24
|
+
- **Example Setting**: Configure example setting
|
|
25
|
+
- **Enable Feature**: Toggle feature on/off
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Install dependencies
|
|
31
|
+
npm install
|
|
32
|
+
|
|
33
|
+
# Start development server
|
|
34
|
+
npm run dev
|
|
35
|
+
|
|
36
|
+
# Build for production
|
|
37
|
+
npm run build
|
|
38
|
+
|
|
39
|
+
# Create plugin package
|
|
40
|
+
npm run zip
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
MIT
|
|
46
|
+
|
|
47
|
+
## Author
|
|
48
|
+
|
|
49
|
+
{{authorName}} <{{email}}>{{#if github}}
|
|
50
|
+
GitHub: [@{{github}}](https://github.com/{{github}}){{/if}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useContext } from '@axpo/sdk';
|
|
2
|
+
|
|
3
|
+
export default function myPlugin() {
|
|
4
|
+
return {
|
|
5
|
+
async init() {
|
|
6
|
+
// Your plugin initialization code here
|
|
7
|
+
const { baseUrl, page } = useContext();
|
|
8
|
+
console.log('{{pluginName}} initialized!');
|
|
9
|
+
console.log('Base URL:', baseUrl);
|
|
10
|
+
},
|
|
11
|
+
async destroy() {
|
|
12
|
+
// Cleanup code here
|
|
13
|
+
console.log('{{pluginName}} destroyed');
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [1.0.0] - {{date}}
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Initial release
|
|
9
|
+
- Basic plugin functionality
|
|
10
|
+
- Settings configuration
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- N/A
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- N/A
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineConfig } from '@axpo/sdk';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
buildOptions: {
|
|
5
|
+
entryPoints: ["src/main.ts"],
|
|
6
|
+
outdir: "dist",
|
|
7
|
+
platform: "browser",
|
|
8
|
+
bundle: true,
|
|
9
|
+
loader: {
|
|
10
|
+
".ts": "tsx",
|
|
11
|
+
".tsx": "tsx",
|
|
12
|
+
".css": "css",
|
|
13
|
+
".png": "file",
|
|
14
|
+
".svg": "text"
|
|
15
|
+
},
|
|
16
|
+
format: 'esm',
|
|
17
|
+
minify: false,
|
|
18
|
+
sourcemap: false,
|
|
19
|
+
target: 'es2020',
|
|
20
|
+
keepNames: true,
|
|
21
|
+
external: [],
|
|
22
|
+
alias: {
|
|
23
|
+
'@': './src',
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
files: [
|
|
28
|
+
'readme.md',
|
|
29
|
+
'icon.png',
|
|
30
|
+
'ChangeLog.md'
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
dev: {
|
|
34
|
+
port: 3000
|
|
35
|
+
}
|
|
36
|
+
});
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "{{description}}",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/main.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "axpo dev",
|
|
9
|
+
"build": "axpo build",
|
|
10
|
+
"clean": "axpo clean",
|
|
11
|
+
"publish": "axpo publish"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"acode",
|
|
15
|
+
"plugin"
|
|
16
|
+
],
|
|
17
|
+
"author": "{{authorName}} <{{email}}>",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@axpo/cli": "latest",
|
|
21
|
+
"@axpo/sdk": "latest",
|
|
22
|
+
"typescript": "^5.0.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "{{pluginId}}",
|
|
3
|
+
"name": "{{pluginName}}",
|
|
4
|
+
"main": "dist/main.js",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"readme": "readme.md",
|
|
7
|
+
"icon": "icon.png",
|
|
8
|
+
"minVersionCode": 292,
|
|
9
|
+
"price": 0,
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"acode",
|
|
13
|
+
"plugin"
|
|
14
|
+
],
|
|
15
|
+
"changelogs": "ChangeLog.md",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "{{authorName}}",
|
|
18
|
+
"email": "{{email}}"{{#if github}},
|
|
19
|
+
"url": "https://github.com/{{github}}",
|
|
20
|
+
"github": "{{github}}"{{/if}}
|
|
21
|
+
}{{#if github}},
|
|
22
|
+
"repository": "https://github.com/{{github}}/{{projectName}}"{{/if}}
|
|
23
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# {{pluginName}}
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Feature 1
|
|
8
|
+
- Feature 2
|
|
9
|
+
- Feature 3
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
1. Open Acode app
|
|
14
|
+
2. Go to Plugins
|
|
15
|
+
3. Search for "{{pluginName}}"
|
|
16
|
+
4. Install the plugin
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Describe how to use your plugin here.
|
|
21
|
+
|
|
22
|
+
## Settings
|
|
23
|
+
|
|
24
|
+
- **Example Setting**: Configure example setting
|
|
25
|
+
- **Enable Feature**: Toggle feature on/off
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Install dependencies
|
|
31
|
+
npm install
|
|
32
|
+
|
|
33
|
+
# Start development server
|
|
34
|
+
npm run dev
|
|
35
|
+
|
|
36
|
+
# Build for production
|
|
37
|
+
npm run build
|
|
38
|
+
|
|
39
|
+
# Create plugin package
|
|
40
|
+
npm run zip
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
MIT
|
|
46
|
+
|
|
47
|
+
## Author
|
|
48
|
+
|
|
49
|
+
{{authorName}} <{{email}}>{{#if github}}
|
|
50
|
+
GitHub: [@{{github}}](https://github.com/{{github}}){{/if}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useContext } from '@axpo/sdk';
|
|
2
|
+
|
|
3
|
+
export default function myPlugin() {
|
|
4
|
+
return {
|
|
5
|
+
async init() {
|
|
6
|
+
// Your plugin initialization code here
|
|
7
|
+
const { baseUrl, page } = useContext();
|
|
8
|
+
console.log('{{pluginName}} initialized!');
|
|
9
|
+
console.log('Base URL:', baseUrl);
|
|
10
|
+
},
|
|
11
|
+
async destroy() {
|
|
12
|
+
// Cleanup code here
|
|
13
|
+
console.log('{{pluginName}} destroyed');
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": ".",
|
|
4
|
+
"target": "es2016",
|
|
5
|
+
"module": "nodenext",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"preserveSymlinks": true,
|
|
8
|
+
"removeComments": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"paths": {
|
|
13
|
+
"@/*": ["src/*"]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|