Skip to content

Commit

Permalink
Merge pull request #16 from MicroAppJS/develop
Browse files Browse the repository at this point in the history
:update: config
  • Loading branch information
zyao89 committed Jan 9, 2020
2 parents c6ba118 + 822bce7 commit 9761ec4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
GITHUB_CLIENT_SECRET: ${{ secrets.GITHUB_CLIENT_SECRET }}

- name: Deploy
uses: JamesIves/github-pages-deploy-action@master
env:
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/.vuepress/dist
22 changes: 13 additions & 9 deletions bin/micro-app-vuepress
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ const path = require('path');
const { tryRequire, logger, execa } = require('@micro-app/shared-utils');
let MicroAppCLI = tryRequire('@micro-app/cli');
if (!MicroAppCLI) {
logger.info('[auto]', 'npm install @micro-app/cli');
const { exitCode, stderr } = execa.sync('npm', [ 'install', '@micro-app/cli', '--no-save', '--no-package-lock' ], {
cwd: process.cwd(),
stdio: 'inherit',
});
if (exitCode) {
logger.throw(stderr);
}
const importFresh = require('import-fresh'); // 依赖 @micro-app/shared-utils
MicroAppCLI = importFresh('@micro-app/cli');
try {
MicroAppCLI = importFresh('@micro-app/cli');
} catch (error) {
logger.info('[auto]', 'npm install @micro-app/cli');
const { exitCode, stderr } = execa.sync('npm', [ 'install', '@micro-app/cli', '--no-save', '--no-package-lock' ], {
cwd: __dirname,
stdio: 'inherit',
});
if (exitCode) {
logger.throw(stderr);
}
MicroAppCLI = importFresh('@micro-app/cli');
}
}
if (!MicroAppCLI) {
logger.throw("Cannot find module '@micro-app/cli'!");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@micro-app/plugin-vuepress",
"version": "0.0.12",
"version": "0.0.13",
"description": "[Plugin] adapter vuepress plugin.",
"main": "src/index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion theme/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default {
}
}
.custom {
.custom[class] {
max-width: 960px;
margin: 0px auto;
// padding: 0 1.2rem 2rem;
Expand Down

0 comments on commit 9761ec4

Please sign in to comment.