This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
513 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import { defineConfig } from 'zmi' | ||
import path from 'path' | ||
import gulpLess from 'gulp-less' | ||
|
||
export default defineConfig({ | ||
miniAppConfig: { | ||
output: 'miniprogram' | ||
} | ||
output: 'miniprogram' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export default { | ||
miniAppConfig: { | ||
output: 'miniprogram' | ||
} | ||
output: 'miniprogram' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["ESNext"], | ||
"module": "es6", | ||
"module": "esnext", | ||
"esModuleInterop": true, | ||
"target": "es5", | ||
"declaration": false, | ||
"noImplicitAny": true, | ||
"strict": true, | ||
"baseUrl": ".", | ||
"skipLibCheck": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"types": ["miniprogram-api-typings"] | ||
}, | ||
"include": ["src"] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/npm-debug.log* | ||
/yarn-error.log | ||
/yarn.lock | ||
/package-lock.json | ||
|
||
# production | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 80, | ||
"overrides": [ | ||
{ | ||
"files": ".prettierrc", | ||
"options": { "parser": "json" } | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import IConfig from 'zmi-miniapp'; | ||
|
||
export default { | ||
miniAppConfig: { | ||
output: 'miniprogram' | ||
} | ||
} | ||
output: 'miniprogram', | ||
} as IConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
justify-content: space-between; | ||
padding: 200rpx 0; | ||
box-sizing: border-box; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["ESNext"], | ||
"module": "es6", | ||
"module": "esnext", | ||
"esModuleInterop": true, | ||
"target": "es5", | ||
"declaration": false, | ||
"noImplicitAny": true, | ||
"strict": true, | ||
"baseUrl": ".", | ||
"skipLibCheck": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"types": ["miniprogram-api-typings"] | ||
}, | ||
"include": ["src"] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
disableTypes: true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# zmi-miniapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /usr/bin/env node | ||
|
||
require('../lib/cli') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { IConfig as nerdConfig } from 'zmi-nerd' | ||
|
||
type IConfig = Pick< | ||
nerdConfig, | ||
| 'entry' | ||
| 'afterHook' | ||
| 'beforeReadWriteStream' | ||
| 'esBuild' | ||
| 'disableTypes' | ||
| 'lessOptions' | ||
| 'output' | ||
| 'paths' | ||
| 'extraBabelPlugins' | ||
| 'extraBabelPresets' | ||
> | ||
|
||
export default IConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('eslint-config-zmi') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "zmi-miniapp", | ||
"version": "1.0.6-alpha.8", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"license": "MIT", | ||
"files": [ | ||
"bin", | ||
"lib", | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"dependencies": { | ||
"@zmi-cli/core": "^1.0.6-alpha.8", | ||
"eslint": "^7.22.0", | ||
"eslint-config-zmi": "^1.2.3", | ||
"gulp-rename": "^2.0.0", | ||
"zmi-nerd": "^1.2.2-1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"bin": { | ||
"zmi-miniapp": "bin/zmi-miniapp.js" | ||
}, | ||
"engines": { | ||
"node": ">=10.13.0" | ||
}, | ||
"devDependencies": { | ||
"@types/gulp-rename": "^2.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { fork } from 'child_process' | ||
import readline from 'readline' | ||
|
||
const child = fork(require.resolve('./start')) | ||
const isWin = process.platform === 'win32' | ||
const Signals: NodeJS.Signals[] = ['SIGINT', 'SIGTERM'] | ||
|
||
if (isWin) { | ||
const rl = readline.createInterface({ | ||
input: process.stdin, | ||
output: process.stdout | ||
}) | ||
|
||
rl.on(Signals[0], () => { | ||
process.emit(Signals[0], Signals[0]) | ||
}) | ||
} | ||
|
||
Signals.forEach((SignalKey) => { | ||
process.on(SignalKey, () => { | ||
child.kill(SignalKey) | ||
process.exit(1) | ||
}) | ||
}) |
Oops, something went wrong.