Skip to content

Commit

Permalink
build: code
Browse files Browse the repository at this point in the history
  • Loading branch information
lzxb committed Dec 7, 2020
1 parent 6e65978 commit aad0f7c
Show file tree
Hide file tree
Showing 71 changed files with 12 additions and 3,541 deletions.
2 changes: 1 addition & 1 deletion build-ts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function build ()
echo "build ${1}"
rm -rf ./node_modules/@fmfe/${1}/types
rm -rf ./node_modules/@fmfe/${1}/dist
rm -rf ./packages/${1}/client
rm -rf ./packages/${1}/dist
rm -rf ./packages/${1}/types
rm -rf ./packages/${1}/tsconfig.json
cp -r tsconfig.cjs.json ./packages/${1}/tsconfig.cjs.json
Expand Down
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

rm -rf node_modules
yarn
./build-js.sh
./build-ts.sh
yarn build:ts
yarn build
yarn test
Expand Down
5 changes: 3 additions & 2 deletions examples/ssr-layout/src/entry-server.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { RenderContext } from '@fmfe/genesis-core';
import Vue from 'vue';
import { createServerApp } from '@fmfe/genesis-app';
import * as ok from '@fmfe/genesis-app';
import App from './app.vue';
import { createRouter } from './routes';
import './main.css';

export default async (renderContext: RenderContext): Promise<Vue> => {
return createServerApp({
console.log('????????????', ok.createServerApp.toString());
return ok.createServerApp({
App,
renderContext,
vueOptions: {
Expand Down
2 changes: 2 additions & 0 deletions packages/genesis-app/dist/cjs/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ class Router extends vue_router_1.default {
}
async replaceState(location, data) {
const url = this.resolve(location).route.fullPath;
if (url === this.currentRoute.fullPath)
return this.currentRoute;
const sync = (url) => {
if (this._isSync) {
route.dispatchTarget(this).replace(url);
Expand Down
78 changes: 0 additions & 78 deletions packages/genesis-app/dist/create-app.js

This file was deleted.

2 changes: 2 additions & 0 deletions packages/genesis-app/dist/esm/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ export class Router extends VueRouter {
}
async replaceState(location, data) {
const url = this.resolve(location).route.fullPath;
if (url === this.currentRoute.fullPath)
return this.currentRoute;
const sync = (url) => {
if (this._isSync) {
route.dispatchTarget(this).replace(url);
Expand Down
8 changes: 0 additions & 8 deletions packages/genesis-app/dist/index.js

This file was deleted.

186 changes: 0 additions & 186 deletions packages/genesis-app/dist/router.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/genesis-app/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class Router extends VueRouter {
const v = await super.replace(location).catch((err) => {
return new Promise<Route>((resolve, reject) => {
setTimeout(() => {
if (this.currentRoute.fullPath !== url) return reject(err);
if (this.currentRoute.fullPath === url) return reject(err);
return resolve(this.currentRoute);
});
});
Expand Down
53 changes: 0 additions & 53 deletions packages/genesis-compiler/dist/cjs/src/build/index.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/genesis-compiler/dist/cjs/src/index.js

This file was deleted.

Loading

0 comments on commit aad0f7c

Please sign in to comment.