fix: some bundle stuff
This commit is contained in:
@@ -56,7 +56,6 @@
|
|||||||
"babel-eslint": "latest",
|
"babel-eslint": "latest",
|
||||||
"eslint": "^7.29.0",
|
"eslint": "^7.29.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"eslint-plugin-nuxt": "^2.0.0",
|
|
||||||
"eslint-plugin-prettier": "^3.3.1",
|
"eslint-plugin-prettier": "^3.3.1",
|
||||||
"eslint-plugin-vue": "^7.12.1",
|
"eslint-plugin-vue": "^7.12.1",
|
||||||
"np": "^7.5.0",
|
"np": "^7.5.0",
|
||||||
@@ -66,13 +65,10 @@
|
|||||||
"postcss-nested": "^5.0.5",
|
"postcss-nested": "^5.0.5",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"rollup": "^2.52.2",
|
"rollup": "^2.52.2",
|
||||||
"rollup-plugin-bundle-size": "^1.0.3",
|
|
||||||
"rollup-plugin-livereload": "^2.0.0",
|
|
||||||
"rollup-plugin-postcss": "^4.0.0",
|
"rollup-plugin-postcss": "^4.0.0",
|
||||||
"rollup-plugin-serve": "^1.1.0",
|
"rollup-plugin-serve": "^1.1.0",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"rollup-plugin-typescript2": "^0.30.0",
|
"rollup-plugin-typescript2": "^0.30.0",
|
||||||
"rollup-plugin-vue": "^6.0.0",
|
|
||||||
"typescript": "^4.3.5",
|
"typescript": "^4.3.5",
|
||||||
"vite": "^2.3.8",
|
"vite": "^2.3.8",
|
||||||
"vue": "^3.0.5",
|
"vue": "^3.0.5",
|
||||||
|
|||||||
+4
-5
@@ -92,17 +92,16 @@ function createConfig(format, output, plugins = []) {
|
|||||||
|
|
||||||
if (isGlobalBuild) output.name = pascalcase(pkg.name);
|
if (isGlobalBuild) output.name = pascalcase(pkg.name);
|
||||||
|
|
||||||
const shouldEmitDeclarations = !hasTSChecked;
|
|
||||||
|
|
||||||
const tsPlugin = ts({
|
const tsPlugin = ts({
|
||||||
check: !hasTSChecked,
|
check: !hasTSChecked,
|
||||||
|
clean: !hasTSChecked,
|
||||||
tsconfig: path.resolve(__dirname, 'tsconfig.json'),
|
tsconfig: path.resolve(__dirname, 'tsconfig.json'),
|
||||||
cacheRoot: path.resolve(__dirname, 'node_modules/.rts2_cache'),
|
cacheRoot: path.resolve(__dirname, 'node_modules/.rts2_cache'),
|
||||||
tsconfigOverride: {
|
tsconfigOverride: {
|
||||||
compilerOptions: {
|
compilerOptions: {
|
||||||
sourceMap: true,
|
sourceMap: !hasTSChecked,
|
||||||
declaration: shouldEmitDeclarations,
|
declaration: !hasTSChecked,
|
||||||
declarationMap: shouldEmitDeclarations
|
declarationMap: !hasTSChecked
|
||||||
},
|
},
|
||||||
exclude: ['__tests__', 'test-dts']
|
exclude: ['__tests__', 'test-dts']
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ const EdgeCmp = defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const sourceHandleId = computed(() => props.edge.sourceHandle ?? null);
|
const sourceHandleId = computed(() => props.edge.sourceHandle || null);
|
||||||
const targetHandleId = computed(() => props.edge.targetHandle ?? null);
|
const targetHandleId = computed(() => props.edge.targetHandle || null);
|
||||||
const nodes = computed(() => getSourceTargetNodes(props.edge, props.nodes));
|
const nodes = computed(() => getSourceTargetNodes(props.edge, props.nodes));
|
||||||
|
|
||||||
const onConnectEdge = (connection: Connection) => {
|
const onConnectEdge = (connection: Connection) => {
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ const useZoomPanHelper = (): ZoomPanHelperFunctions => {
|
|||||||
bounds,
|
bounds,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
options.minZoom ?? minZoom,
|
options.minZoom || minZoom,
|
||||||
options.maxZoom ?? maxZoom,
|
options.maxZoom || maxZoom,
|
||||||
options.padding ?? DEFAULT_PADDING
|
options.padding || DEFAULT_PADDING
|
||||||
);
|
);
|
||||||
const transform = zoomIdentity.translate(x, y).scale(zoom);
|
const transform = zoomIdentity.translate(x, y).scale(zoom);
|
||||||
|
|
||||||
|
|||||||
@@ -174,8 +174,8 @@ export default function configureStore(
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
updateUserSelection(mousePos) {
|
updateUserSelection(mousePos) {
|
||||||
const startX = this.userSelectionRect.startX ?? 0;
|
const startX = this.userSelectionRect.startX || 0;
|
||||||
const startY = this.userSelectionRect.startY ?? 0;
|
const startY = this.userSelectionRect.startY || 0;
|
||||||
|
|
||||||
const nextUserSelectRect: ReactFlowState['userSelectionRect'] = {
|
const nextUserSelectRect: ReactFlowState['userSelectionRect'] = {
|
||||||
...this.userSelectionRect,
|
...this.userSelectionRect,
|
||||||
|
|||||||
+2
-2
@@ -268,14 +268,14 @@ const parseElements = (nodes: Node[], edges: Edge[]): Elements => {
|
|||||||
|
|
||||||
export const onLoadGetElements = (currentStore: Store<'revue-flow', ReactFlowState>) => {
|
export const onLoadGetElements = (currentStore: Store<'revue-flow', ReactFlowState>) => {
|
||||||
return (): Elements => {
|
return (): Elements => {
|
||||||
return parseElements(currentStore.nodes ?? [], currentStore.edges ?? []);
|
return parseElements(currentStore.nodes || [], currentStore.edges || []);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const onLoadToObject = (currentStore: Store<'revue-flow', ReactFlowState>) => {
|
export const onLoadToObject = (currentStore: Store<'revue-flow', ReactFlowState>) => {
|
||||||
return (): FlowExportObject => {
|
return (): FlowExportObject => {
|
||||||
return {
|
return {
|
||||||
elements: parseElements(currentStore.nodes ?? [], currentStore.edges ?? []),
|
elements: parseElements(currentStore.nodes || [], currentStore.edges || []),
|
||||||
position: [currentStore.transform[0], currentStore.transform[1]],
|
position: [currentStore.transform[0], currentStore.transform[1]],
|
||||||
zoom: currentStore.transform[2]
|
zoom: currentStore.transform[2]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user