Skip to content

Commit

Permalink
chore(dist): do not distribute joint.core.js + joint.core.min.js (#2516)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynekstara authored Feb 1, 2024
1 parent de10849 commit b2540ab
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 31 deletions.
1 change: 0 additions & 1 deletion packages/joint-core/grunt/config/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ module.exports = function(grunt) {
'newer:uglify:geometry',
'newer:uglify:vectorizer',
'newer:uglify:joint',
'newer:uglify:jointCore',
'newer:uglify:jointNoWrap',
'newer:uglify:plugins'
],
Expand Down
1 change: 1 addition & 0 deletions packages/joint-core/grunt/config/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = function(grunt) {
cwd: 'build/',
src: [
'*',
'!joint.core.js',
'!api-extractor',
'!docs',
'!min',
Expand Down
3 changes: 0 additions & 3 deletions packages/joint-core/grunt/config/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ module.exports = {
'rollup-joint': {
command: 'rollup -c --config-joint'
},
'rollup-libs-esm': {
command: 'rollup -c --config-libs-esm'
},
'rollup-dist': {
command: 'rollup -c --config-dist'
},
Expand Down
4 changes: 0 additions & 4 deletions packages/joint-core/grunt/config/uglify.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ module.exports = function() {
src: modules.joint.umd,
dest: 'build/joint.min.js'
},
jointCore: {
src: modules.jointCore.umd,
dest: 'build/joint.core.min.js'
},
jointNoWrap: {
src: modules.joint.iife,
dest: 'build/joint.nowrap.min.js'
Expand Down
8 changes: 0 additions & 8 deletions packages/joint-core/grunt/resources/core.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/joint-core/grunt/resources/esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
iife: 'build/joint.nowrap.js', // joint + plugins + vectorizer + geometry. browser-only version
noDependencies: 'build/joint.nodeps.js' // joint + plugins (for unit testing)
},
jointCore: {
jointCore: { // without shapes - not exported to dist - see grunt/config/copy.js
src: 'wrappers/joint.core.wrapper.mjs',
umd: 'build/joint.core.js', // joint + vectorizer + geometry. universal module
},
Expand Down
4 changes: 2 additions & 2 deletions packages/joint-core/joint.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as layout from './src/layout/index.mjs';
import * as shapes from './src/shapes/index.mjs';

// joint core
Expand All @@ -7,6 +6,7 @@ export {
config,
env,
anchors,
layout,
linkAnchors,
connectionPoints,
connectionStrategies,
Expand All @@ -24,4 +24,4 @@ export {
g
} from './src/core.mjs';

export { layout, shapes };
export { shapes };
1 change: 1 addition & 0 deletions packages/joint-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"files": [
"dist/",
"src/",
"!src/core.mjs",
"types/*.d.ts",
"./index.js",
"./joint.mjs",
Expand Down
11 changes: 1 addition & 10 deletions packages/joint-core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ const JOINT = [
modules.joint
];

const LIBS_ESM = [
];

const DIST = [
modules.version,
modules.jointCore,
modules.geometry,
modules.vectorizer,
].concat(modules.jointPlugins).concat(LIBS_ESM);
].concat(modules.jointPlugins);

const TEST_BUNDLE = [
modules.jointNoDependencies
Expand All @@ -26,11 +23,6 @@ export default commandLineArgs => {
return JOINT;
}

// rollup -c --config-libs-esm
if (commandLineArgs['config-libs-esm']) {
return LIBS_ESM;
}

// rollup -c --config-dist
if (commandLineArgs['config-dist']) {
return DIST;
Expand All @@ -43,7 +35,6 @@ export default commandLineArgs => {

// all
return JOINT
.concat(LIBS_ESM)
.concat(DIST)
.concat(TEST_BUNDLE);
};
2 changes: 0 additions & 2 deletions packages/joint-core/test/jointjs/require.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ require(['qunit'], function(QUnit) {
QUnit.module('RequireJS');

var buildFiles = [
'build/joint.core',
'build/joint.core.min',
'build/joint',
'build/joint.min'
];
Expand Down

0 comments on commit b2540ab

Please sign in to comment.