Skip to content

Commit d5631b5

Browse files
committed
ur-lite: update exports and paths
1 parent 4eeaa82 commit d5631b5

File tree

9 files changed

+1655
-2910
lines changed

9 files changed

+1655
-2910
lines changed

_mur/package.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
{
22
"name": "ursys-nc",
3-
"version": "0.1",
3+
"version": "0.0.1",
44
"description": "Minimum URSYS build host for NetCreate ITEST",
55
"private": true,
66
"scripts": {
7-
"build-ur": "node ./scripts/@build.cjs",
7+
"build": "node ./scripts/@build.cjs",
88
"lint": "eslint .",
99
"clean": "rm -rf ./node_modules ./_dist"
1010
},
11-
"browser": "./_dist/client-cjs.js",
12-
"main": "./_dist/server.cjs",
13-
"exports": {
14-
"node": {
15-
"import": "./_dist/server-esm.mjs",
16-
"require": "./_dist/server.cjs"
17-
},
18-
"browser": {
19-
"import": "./_dist/client-esm.js",
20-
"require": "./_dist/client-cjs.js",
21-
"default": "./_dist/client-umd.js"
22-
}
23-
},
11+
"files": [
12+
"./_dist"
13+
],
14+
"browser": "./_dist/mur-web-cjs.js",
15+
"main": "./_dist/mur-node.cjs",
2416
"devDependencies": {
2517
"esbuild": "^v0.25.0",
2618
"esbuild-plugin-copy": "^2.1.1",

_mur/scripts/@build.mts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function ESBuildLibrary() {
3333

3434
/** SERVER CLIENT SHARED BUILD SETTINGS **/
3535
const nodeBuild = {
36-
entryPoints: [`${ROOT}/_ur/node-server/@server.mts`],
36+
entryPoints: [`${ROOT}/_mur/node-server/@node-index.mts`],
3737
bundle: true,
3838
platform: 'node',
3939
target: ['node18', 'esnext'],
@@ -48,22 +48,22 @@ async function ESBuildLibrary() {
4848
// @ts-ignore - build options
4949
await esbuild.build({
5050
...nodeBuild,
51-
outfile: `${DIR_UR_DIST}/server-esm.mjs`,
51+
outfile: `${DIR_UR_DIST}/mur-node.mjs`,
5252
format: 'esm'
5353
});
5454
if (DBG) LOG('built ur-server ESM');
5555

5656
// @ts-ignore - build options
5757
await esbuild.build({
5858
...nodeBuild,
59-
outfile: `${DIR_UR_DIST}/server.cjs`,
59+
outfile: `${DIR_UR_DIST}/mur-node.cjs`,
6060
format: 'cjs'
6161
});
6262
if (DBG) LOG('built ur-server CJS');
6363

6464
/** BROWSER CLIENT SHARED BUILD SETTINGS **/
6565
const browserBuild = {
66-
entryPoints: [`${ROOT}/_ur/browser-client/@client.ts`],
66+
entryPoints: [`${ROOT}/_mur/web-client/@web-index.ts`],
6767
bundle: true,
6868
platform: 'browser',
6969
target: ['es2018'], // brunch can't handle features beyond this date
@@ -73,23 +73,23 @@ async function ESBuildLibrary() {
7373
// @ts-ignore - build options
7474
await esbuild.build({
7575
...browserBuild,
76-
outfile: `${DIR_UR_DIST}/client-esm.js`,
76+
outfile: `${DIR_UR_DIST}/mur-web-esm.js`,
7777
format: 'esm'
7878
});
7979
if (DBG) LOG('built ur-client ESM');
8080

8181
// @ts-ignore - build options
8282
await esbuild.build({
8383
...browserBuild,
84-
outfile: `${DIR_UR_DIST}/client-cjs.js`,
84+
outfile: `${DIR_UR_DIST}/mur-web-cjs.js`,
8585
format: 'cjs'
8686
});
87-
if (DBG) LOG('built ur-client CJS');
87+
if (DBG) LOG('built ur-web CJS');
8888

8989
await esbuild.build({
9090
...browserBuild,
9191
plugins: [umdWrapper()],
92-
outfile: `${DIR_UR_DIST}/client-umd.js`,
92+
outfile: `${DIR_UR_DIST}/mur-web-umd.js`,
9393
// @ts-ignore - esbuild-plugin-umd-wrapper option
9494
format: 'umd' // esbuild-plugin-umd-wrapper
9595
});

_mur/web-client/@web-index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
55
\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * /////////////////////////////////////*/
66

7+
/// URSYS-NC EXPORTS //////////////////////////////////////////////////////////
8+
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9+
export * as COMMENT from './comment/ac-comment.ts';
10+
711
/// FORWARDED COMMON EXPORTS //////////////////////////////////////////////////
812
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
913
export * from '../common/@common.ts';

app/assets/index.ejs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@
5353
}
5454
</script>
5555
<script src="/scripts/netc-lib.js"></script>
56-
<script src="/scripts/ursys-core.js"></script>
57-
<script src="/scripts/ursys-addons.js"></script>
5856
<script src="/scripts/netc-app.js"></script>
5957
<!-- Google Analytics -->
6058
<script>

app/view/netcreate/NetCreate.jsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
/// UNISYS INITIALIZE REQUIRES for REACT ROOT /////////////////////////////////
3535
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3636
const UNISYS = require('unisys/client');
37-
const UR = require('@ursys/core');
38-
const URADD = require('@ursys/addons');
37+
const UR = require('ursys-nc');
3938
const SessionShell = require('unisys/component/SessionShell');
4039

40+
console.log('NetCreate: UR:', UR);
41+
4142
/// SWITCHES //////////////////////////////////////////////////////////////////
4243
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4344
var DBG = false;
@@ -70,14 +71,12 @@ class NetCreate extends UNISYS.Component {
7071
super();
7172
UNISYS.ForceReloadOnNavigation();
7273

73-
/** _ur core and _ur_addons reachability tests **/
74-
UR.ClientTest();
75-
URADD.AddonClientTest();
7674
const SM = new UR.StateMgr('NETCREATE');
7775
SM._initializeState({ prop_1: 1 });
7876
console.log('SM:StateMgr contains:', SM.state());
79-
/** end of _ur core and _ur_addons tests **/
80-
URADD.COMMENT.Init();
77+
78+
console.log('NetCreate: UR:', UR);
79+
UR.COMMENT.Init();
8180

8281
this.state = {
8382
isConnected: true,

app/view/netcreate/comment-mgr.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
33
COMMENT MANAGER
44
5-
See UR ADDONS / Comment
6-
5+
uses new ursys-nc (minimal ursys for netcreate), see _mur/ directory
76
87
\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * //////////////////////////////////////*/
98

109
const React = require('react');
1110
const ReactDOM = require('react-dom');
1211
const UNISYS = require('unisys/client');
1312
const LOCKMGR = require('./lock-mgr');
14-
const { COMMENT } = require('@ursys/addons');
13+
const { COMMENT } = require('ursys-nc');
1514
const DATASTORE = require('system/datastore');
1615
const { ARROW_RIGHT } = require('system/util/constant');
1716
const { EDITORTYPE } = require('system/util/enum');
@@ -510,6 +509,7 @@ MOD.OpenCommentStatusComment = (cref, cid) => {
510509
MOD.CloseCommentCollection = (uiref, cref, uid) => {
511510
if (!MOD.OKtoClose(cref)) {
512511
// Comment is still being edited, prevent close
512+
// eslint-disable-next-line no-alert
513513
alert(
514514
'This comment is still being edited! Please Save or Cancel before closing the comment.'
515515
);
@@ -531,6 +531,7 @@ MOD.CloseCommentCollection = (uiref, cref, uid) => {
531531
MOD.CloseCommentCollectionAndMarkRead = (uiref, cref, uid) => {
532532
if (!MOD.OKtoClose(cref)) {
533533
// Comment is still being edited, prevent close
534+
// eslint-disable-next-line no-alert
534535
alert(
535536
'This comment is still being edited! Please Save or Cancel before closing the comment.'
536537
);

brunch-config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ module.exports = {
7979
javascripts: {
8080
joinTo: {
8181
'scripts/netc-app.js': /^app/,
82-
'scripts/ursys-core.js': /^node_modules\/@ursys\/core/,
83-
'scripts/ursys-addons.js': /^node_modules\/@ursys\/addons/,
84-
'scripts/netc-lib.js': /^(?!app)(?!node_modules\/@ursys)/
82+
'scripts/netc-lib.js': /^(?!app)/
8583
}
8684
},
8785
stylesheets: {

0 commit comments

Comments
 (0)