pxt-core 8.3.1 → 8.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/built/cli.js CHANGED
@@ -306,8 +306,7 @@ function pxtFileList(pref) {
306
306
  .concat(nodeutil.allFiles(pref + "built/web/fonts", { maxDepth: 1 }))
307
307
  .concat(nodeutil.allFiles(pref + "built/web/vs", { maxDepth: 4 }))
308
308
  .concat(nodeutil.allFiles(pref + "built/web/skillmap", { maxDepth: 4 }))
309
- .concat(nodeutil.allFiles(pref + "built/web/authcode", { maxDepth: 4 }))
310
- .concat(nodeutil.allFiles(pref + "built/web/multiplayer", { maxDepth: 4 }));
309
+ .concat(nodeutil.allFiles(pref + "built/web/authcode", { maxDepth: 4 }));
311
310
  }
312
311
  function semverCmp(a, b) {
313
312
  let parse = (s) => {
@@ -388,8 +387,7 @@ function ciAsync() {
388
387
  .then(() => buildWebStringsAsync())
389
388
  .then(() => crowdin.execCrowdinAsync("upload", "built/webstrings.json"))
390
389
  .then(() => crowdin.execCrowdinAsync("upload", "built/skillmap-strings.json"))
391
- .then(() => crowdin.execCrowdinAsync("upload", "built/authcode-strings.json"))
392
- .then(() => crowdin.execCrowdinAsync("upload", "built/multiplayer-strings.json"));
390
+ .then(() => crowdin.execCrowdinAsync("upload", "built/authcode-strings.json"));
393
391
  if (uploadApiStrings)
394
392
  p = p.then(() => crowdin.execCrowdinAsync("upload", "built/strings.json"));
395
393
  if (uploadDocs || uploadApiStrings)
@@ -908,7 +906,6 @@ function uploadCoreAsync(opts) {
908
906
  "asseteditorUrl": opts.localDir + "asseteditor.html",
909
907
  "skillmapUrl": opts.localDir + "skillmap.html",
910
908
  "authcodeUrl": opts.localDir + "authcode.html",
911
- "multiplayerUrl": opts.localDir + "multiplayer.html",
912
909
  "isStatic": true,
913
910
  };
914
911
  const targetImagePaths = targetImages.map(k => `${opts.localDir}${path.join('./docs', logos[k])}`);
@@ -955,16 +952,14 @@ function uploadCoreAsync(opts) {
955
952
  "multi.html",
956
953
  "asseteditor.html",
957
954
  "skillmap.html",
958
- "authcode.html",
959
- "multiplayer.html",
955
+ "authcode.html"
960
956
  ];
961
957
  // expandHtml is manually called on these files before upload
962
958
  // runs <!-- @include --> substitutions, fills in locale, etc
963
959
  let expandFiles = [
964
960
  "index.html",
965
961
  "skillmap.html",
966
- "authcode.html",
967
- "multiplayer.html",
962
+ "authcode.html"
968
963
  ];
969
964
  nodeutil.mkdirP("built/uploadrepl");
970
965
  function encodeURLs(urls) {
@@ -1758,29 +1753,33 @@ async function buildSemanticUIAsync(parsed) {
1758
1753
  ]
1759
1754
  });
1760
1755
  }
1761
- async function generateReactCommonCss(app) {
1762
- const appFile = isPxtCore ? `react-common/styles/react-common-${app}-core.less` :
1763
- `node_modules/pxt-core/react-common/styles/react-common-${app}.less`;
1764
- await nodeutil.spawnAsync({
1765
- cmd: "node",
1766
- args: [
1767
- lessCPath,
1768
- appFile,
1769
- `built/web/react-common-${app}.css`,
1770
- "--include-path=" + lessIncludePaths
1771
- ]
1772
- });
1773
- let appCss = await readFileAsync(`built/web/react-common-${app}.css`, "utf8");
1774
- appCss = await linkFontAsync("fa-solid-900", appCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
1775
- appCss = await linkFontAsync("fa-regular-400", appCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
1776
- await writeFileAsync(`built/web/react-common-${app}.css`, appCss, "utf8");
1777
- }
1778
- // Generate react-common css for skillmap, authcode, and multiplayer
1779
- await Promise.all([
1780
- generateReactCommonCss("skillmap"),
1781
- generateReactCommonCss("authcode"),
1782
- generateReactCommonCss("multiplayer")
1783
- ]);
1756
+ // Generate react-common css for skillmap and authcode
1757
+ const skillmapFile = isPxtCore ? "react-common/styles/react-common-skillmap-core.less" :
1758
+ "node_modules/pxt-core/react-common/styles/react-common-skillmap.less";
1759
+ await nodeutil.spawnAsync({
1760
+ cmd: "node",
1761
+ args: [
1762
+ lessCPath,
1763
+ skillmapFile,
1764
+ "built/web/react-common-skillmap.css",
1765
+ "--include-path=" + lessIncludePaths
1766
+ ]
1767
+ });
1768
+ const authcodeFile = isPxtCore ? "react-common/styles/react-common-authcode-core.less" :
1769
+ "node_modules/pxt-core/react-common/styles/react-common-authcode.less";
1770
+ await nodeutil.spawnAsync({
1771
+ cmd: "node",
1772
+ args: [
1773
+ lessCPath,
1774
+ authcodeFile,
1775
+ "built/web/react-common-authcode.css",
1776
+ "--include-path=" + lessIncludePaths
1777
+ ]
1778
+ });
1779
+ let skillmapCss = await readFileAsync(`built/web/react-common-skillmap.css`, "utf8");
1780
+ skillmapCss = await linkFontAsync("fa-solid-900", skillmapCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
1781
+ skillmapCss = await linkFontAsync("fa-regular-400", skillmapCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
1782
+ await writeFileAsync(`built/web/react-common-skillmap.css`, skillmapCss, "utf8");
1784
1783
  // Run postcss with autoprefixer and rtlcss
1785
1784
  pxt.debug("running postcss");
1786
1785
  const postcss = require('postcss');
@@ -1800,7 +1799,7 @@ async function buildSemanticUIAsync(parsed) {
1800
1799
  autoprefixer: { browsers: browserList, add: true }
1801
1800
  });
1802
1801
  const rtlcss = require("rtlcss");
1803
- const files = ["semantic.css", "blockly.css", "react-common-skillmap.css", "react-common-authcode.css", "react-common-multiplayer.css"];
1802
+ const files = ["semantic.css", "blockly.css", "react-common-skillmap.css"];
1804
1803
  for (const cssFile of files) {
1805
1804
  const css = await readFileAsync(`built/web/${cssFile}`, "utf8");
1806
1805
  const processed = await postcss([cssnano])
@@ -1813,11 +1812,7 @@ async function buildSemanticUIAsync(parsed) {
1813
1812
  if (!isPxtCore) {
1814
1813
  // This is just to support the local skillmap serve for development
1815
1814
  nodeutil.cp("built/web/react-common-skillmap.css", "node_modules/pxt-core/skillmap/public/blb");
1816
- nodeutil.cp("built/web/react-common-authcode.css", "node_modules/pxt-core/authcode/public/blb");
1817
- nodeutil.cp("built/web/react-common-multiplayer.css", "node_modules/pxt-core/multiplayer/public/blb");
1818
1815
  nodeutil.cp("built/web/semantic.css", "node_modules/pxt-core/skillmap/public/blb");
1819
- nodeutil.cp("built/web/semantic.css", "node_modules/pxt-core/authcode/public/blb");
1820
- nodeutil.cp("built/web/semantic.css", "node_modules/pxt-core/multiplayer/public/blb");
1821
1816
  }
1822
1817
  }
1823
1818
  async function linkFontAsync(font, semCss, sourceDir = "node_modules/semantic-ui-less/themes/default/assets/fonts/", refDir = "fonts\\/") {
@@ -1836,10 +1831,47 @@ function buildWebStringsAsync() {
1836
1831
  nodeutil.writeFileSync("built/webstrings.json", nodeutil.stringify(webstringsJson()));
1837
1832
  return Promise.resolve();
1838
1833
  }
1839
- function buildReactAppAsync(app, parsed) {
1834
+ function buildSkillMapAsync(parsed) {
1840
1835
  // local serve
1841
- const appRoot = `node_modules/pxt-core/${app}`;
1836
+ const skillmapRoot = "node_modules/pxt-core/skillmap";
1837
+ const reactScriptsConfigRoot = `${skillmapRoot}/node_modules/react-scripts/config`;
1842
1838
  const docsPath = parsed.flags["docs"];
1839
+ return rimrafAsync(`${skillmapRoot}/public/blb`, {})
1840
+ .then(() => rimrafAsync(`${skillmapRoot}/build/assets`, {}))
1841
+ .then(() => rimrafAsync(`${skillmapRoot}/public/docs`, {}))
1842
+ .then(() => rimrafAsync(`${skillmapRoot}/public/static`, {}))
1843
+ .then(() => {
1844
+ // read pxtarget.json, save into 'pxtTargetBundle' global variable
1845
+ let cfg = readLocalPxTarget();
1846
+ nodeutil.writeFileSync(`${skillmapRoot}/public/blb/target.js`, "// eslint-disable-next-line \n" + targetJsPrefix + JSON.stringify(cfg));
1847
+ nodeutil.cp("node_modules/pxt-core/built/pxtlib.js", `${skillmapRoot}/public/blb`);
1848
+ nodeutil.cp("built/web/semantic.css", `${skillmapRoot}/public/blb`);
1849
+ nodeutil.cp("node_modules/pxt-core/built/web/icons.css", `${skillmapRoot}/public/blb`);
1850
+ nodeutil.cp("node_modules/pxt-core/built/web/react-common-skillmap.css", `${skillmapRoot}/public/blb`);
1851
+ // copy 'assets' over from docs/static
1852
+ nodeutil.cpR("docs/static/skillmap/assets", `${skillmapRoot}/public/assets`);
1853
+ // copy default react-scripts webpack config into a webpack.config.base file if necessary
1854
+ if (!fs.existsSync(`${reactScriptsConfigRoot}/webpack.config.base.js`)) {
1855
+ nodeutil.cp(`${reactScriptsConfigRoot}/webpack.config.js`, reactScriptsConfigRoot, "webpack.config.base.js");
1856
+ }
1857
+ // wrap the config in our webpack.config.override for build customization
1858
+ nodeutil.cp(`${skillmapRoot}/webpack.config.override.js`, reactScriptsConfigRoot, "webpack.config.js");
1859
+ if (docsPath) {
1860
+ // copy docs over from specified path
1861
+ nodeutil.cpR(`docs/${docsPath}`, `${skillmapRoot}/public/docs/${docsPath}`);
1862
+ nodeutil.cpR(`docs/static/${docsPath}`, `${skillmapRoot}/public/static/${docsPath}`);
1863
+ }
1864
+ return nodeutil.spawnAsync({
1865
+ cmd: os.platform() === "win32" ? "npm.cmd" : "npm",
1866
+ args: ["run-script", "start"],
1867
+ cwd: skillmapRoot,
1868
+ shell: true
1869
+ });
1870
+ });
1871
+ }
1872
+ function buildAuthcodeAsync(parsed) {
1873
+ // local serve
1874
+ const appRoot = "node_modules/pxt-core/authcode";
1843
1875
  return rimrafAsync(`${appRoot}/public/blb`, {})
1844
1876
  .then(() => rimrafAsync(`${appRoot}/build/assets`, {}))
1845
1877
  .then(() => rimrafAsync(`${appRoot}/public/docs`, {}))
@@ -1851,14 +1883,9 @@ function buildReactAppAsync(app, parsed) {
1851
1883
  nodeutil.cp("node_modules/pxt-core/built/pxtlib.js", `${appRoot}/public/blb`);
1852
1884
  nodeutil.cp("built/web/semantic.css", `${appRoot}/public/blb`);
1853
1885
  nodeutil.cp("node_modules/pxt-core/built/web/icons.css", `${appRoot}/public/blb`);
1854
- nodeutil.cp(`node_modules/pxt-core/built/web/react-common-${app}.css`, `${appRoot}/public/blb`);
1886
+ nodeutil.cp("node_modules/pxt-core/built/web/react-common-authcode.css", `${appRoot}/public/blb`);
1855
1887
  // copy 'assets' over from docs/static
1856
- nodeutil.cpR(`docs/static/${app}/assets`, `${appRoot}/public/assets`);
1857
- if (docsPath) {
1858
- // copy docs over from specified path
1859
- nodeutil.cpR(`docs/${docsPath}`, `${appRoot}/public/docs/${docsPath}`);
1860
- nodeutil.cpR(`docs/static/${docsPath}`, `${appRoot}/public/static/${docsPath}`);
1861
- }
1888
+ nodeutil.cpR("docs/static/authcode/assets", `${appRoot}/public/assets`);
1862
1889
  return nodeutil.spawnAsync({
1863
1890
  cmd: os.platform() === "win32" ? "npm.cmd" : "npm",
1864
1891
  args: ["run-script", "start"],
@@ -1867,15 +1894,6 @@ function buildReactAppAsync(app, parsed) {
1867
1894
  });
1868
1895
  });
1869
1896
  }
1870
- function buildSkillMapAsync(parsed) {
1871
- return buildReactAppAsync("skillmap", parsed);
1872
- }
1873
- function buildAuthcodeAsync(parsed) {
1874
- return buildReactAppAsync("authcode", parsed);
1875
- }
1876
- function buildMultiplayerAsync(parsed) {
1877
- return buildReactAppAsync("multiplayer", parsed);
1878
- }
1879
1897
  function updateDefaultProjects(cfg) {
1880
1898
  let defaultProjects = [
1881
1899
  pxt.BLOCKS_PROJECT_NAME,
@@ -6267,30 +6285,9 @@ ${pxt.crowdin.KEY_VARIABLE} - crowdin key
6267
6285
  flags: {
6268
6286
  serve: {
6269
6287
  description: "Serve the authcode app locally after building (npm start)"
6270
- },
6271
- docs: {
6272
- description: "Path to local docs folder to copy into authcode",
6273
- type: "string",
6274
- argument: "docs"
6275
6288
  }
6276
6289
  }
6277
6290
  }, buildAuthcodeAsync);
6278
- p.defineCommand({
6279
- name: "buildmultiplayer",
6280
- aliases: ["multiplayer", "mp"],
6281
- advanced: true,
6282
- help: "Serves the multiplayer webapp",
6283
- flags: {
6284
- serve: {
6285
- description: "Serve the multiplayer app locally after building (npm start)"
6286
- },
6287
- docs: {
6288
- description: "Path to local docs folder to copy into multiplayer",
6289
- type: "string",
6290
- argument: "docs"
6291
- }
6292
- }
6293
- }, buildMultiplayerAsync);
6294
6291
  advancedCommand("augmentdocs", "test markdown docs replacements", augmnetDocsAsync, "<temlate.md> <doc.md>");
6295
6292
  advancedCommand("crowdin", "upload, download, clean, stats files to/from crowdin", pc => crowdin.execCrowdinAsync.apply(undefined, pc.args), "<cmd> <path> [output]");
6296
6293
  advancedCommand("hidlist", "list HID devices", hid.listAsync);
package/built/pxt.js CHANGED
@@ -158167,8 +158167,7 @@ function pxtFileList(pref) {
158167
158167
  .concat(nodeutil.allFiles(pref + "built/web/fonts", { maxDepth: 1 }))
158168
158168
  .concat(nodeutil.allFiles(pref + "built/web/vs", { maxDepth: 4 }))
158169
158169
  .concat(nodeutil.allFiles(pref + "built/web/skillmap", { maxDepth: 4 }))
158170
- .concat(nodeutil.allFiles(pref + "built/web/authcode", { maxDepth: 4 }))
158171
- .concat(nodeutil.allFiles(pref + "built/web/multiplayer", { maxDepth: 4 }));
158170
+ .concat(nodeutil.allFiles(pref + "built/web/authcode", { maxDepth: 4 }));
158172
158171
  }
158173
158172
  function semverCmp(a, b) {
158174
158173
  let parse = (s) => {
@@ -158249,8 +158248,7 @@ function ciAsync() {
158249
158248
  .then(() => buildWebStringsAsync())
158250
158249
  .then(() => crowdin.execCrowdinAsync("upload", "built/webstrings.json"))
158251
158250
  .then(() => crowdin.execCrowdinAsync("upload", "built/skillmap-strings.json"))
158252
- .then(() => crowdin.execCrowdinAsync("upload", "built/authcode-strings.json"))
158253
- .then(() => crowdin.execCrowdinAsync("upload", "built/multiplayer-strings.json"));
158251
+ .then(() => crowdin.execCrowdinAsync("upload", "built/authcode-strings.json"));
158254
158252
  if (uploadApiStrings)
158255
158253
  p = p.then(() => crowdin.execCrowdinAsync("upload", "built/strings.json"));
158256
158254
  if (uploadDocs || uploadApiStrings)
@@ -158769,7 +158767,6 @@ function uploadCoreAsync(opts) {
158769
158767
  "asseteditorUrl": opts.localDir + "asseteditor.html",
158770
158768
  "skillmapUrl": opts.localDir + "skillmap.html",
158771
158769
  "authcodeUrl": opts.localDir + "authcode.html",
158772
- "multiplayerUrl": opts.localDir + "multiplayer.html",
158773
158770
  "isStatic": true,
158774
158771
  };
158775
158772
  const targetImagePaths = targetImages.map(k => `${opts.localDir}${path.join('./docs', logos[k])}`);
@@ -158816,16 +158813,14 @@ function uploadCoreAsync(opts) {
158816
158813
  "multi.html",
158817
158814
  "asseteditor.html",
158818
158815
  "skillmap.html",
158819
- "authcode.html",
158820
- "multiplayer.html",
158816
+ "authcode.html"
158821
158817
  ];
158822
158818
  // expandHtml is manually called on these files before upload
158823
158819
  // runs <!-- @include --> substitutions, fills in locale, etc
158824
158820
  let expandFiles = [
158825
158821
  "index.html",
158826
158822
  "skillmap.html",
158827
- "authcode.html",
158828
- "multiplayer.html",
158823
+ "authcode.html"
158829
158824
  ];
158830
158825
  nodeutil.mkdirP("built/uploadrepl");
158831
158826
  function encodeURLs(urls) {
@@ -159619,29 +159614,33 @@ async function buildSemanticUIAsync(parsed) {
159619
159614
  ]
159620
159615
  });
159621
159616
  }
159622
- async function generateReactCommonCss(app) {
159623
- const appFile = isPxtCore ? `react-common/styles/react-common-${app}-core.less` :
159624
- `node_modules/pxt-core/react-common/styles/react-common-${app}.less`;
159625
- await nodeutil.spawnAsync({
159626
- cmd: "node",
159627
- args: [
159628
- lessCPath,
159629
- appFile,
159630
- `built/web/react-common-${app}.css`,
159631
- "--include-path=" + lessIncludePaths
159632
- ]
159633
- });
159634
- let appCss = await readFileAsync(`built/web/react-common-${app}.css`, "utf8");
159635
- appCss = await linkFontAsync("fa-solid-900", appCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
159636
- appCss = await linkFontAsync("fa-regular-400", appCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
159637
- await writeFileAsync(`built/web/react-common-${app}.css`, appCss, "utf8");
159638
- }
159639
- // Generate react-common css for skillmap, authcode, and multiplayer
159640
- await Promise.all([
159641
- generateReactCommonCss("skillmap"),
159642
- generateReactCommonCss("authcode"),
159643
- generateReactCommonCss("multiplayer")
159644
- ]);
159617
+ // Generate react-common css for skillmap and authcode
159618
+ const skillmapFile = isPxtCore ? "react-common/styles/react-common-skillmap-core.less" :
159619
+ "node_modules/pxt-core/react-common/styles/react-common-skillmap.less";
159620
+ await nodeutil.spawnAsync({
159621
+ cmd: "node",
159622
+ args: [
159623
+ lessCPath,
159624
+ skillmapFile,
159625
+ "built/web/react-common-skillmap.css",
159626
+ "--include-path=" + lessIncludePaths
159627
+ ]
159628
+ });
159629
+ const authcodeFile = isPxtCore ? "react-common/styles/react-common-authcode-core.less" :
159630
+ "node_modules/pxt-core/react-common/styles/react-common-authcode.less";
159631
+ await nodeutil.spawnAsync({
159632
+ cmd: "node",
159633
+ args: [
159634
+ lessCPath,
159635
+ authcodeFile,
159636
+ "built/web/react-common-authcode.css",
159637
+ "--include-path=" + lessIncludePaths
159638
+ ]
159639
+ });
159640
+ let skillmapCss = await readFileAsync(`built/web/react-common-skillmap.css`, "utf8");
159641
+ skillmapCss = await linkFontAsync("fa-solid-900", skillmapCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
159642
+ skillmapCss = await linkFontAsync("fa-regular-400", skillmapCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
159643
+ await writeFileAsync(`built/web/react-common-skillmap.css`, skillmapCss, "utf8");
159645
159644
  // Run postcss with autoprefixer and rtlcss
159646
159645
  pxt.debug("running postcss");
159647
159646
  const postcss = require('postcss');
@@ -159661,7 +159660,7 @@ async function buildSemanticUIAsync(parsed) {
159661
159660
  autoprefixer: { browsers: browserList, add: true }
159662
159661
  });
159663
159662
  const rtlcss = require("rtlcss");
159664
- const files = ["semantic.css", "blockly.css", "react-common-skillmap.css", "react-common-authcode.css", "react-common-multiplayer.css"];
159663
+ const files = ["semantic.css", "blockly.css", "react-common-skillmap.css"];
159665
159664
  for (const cssFile of files) {
159666
159665
  const css = await readFileAsync(`built/web/${cssFile}`, "utf8");
159667
159666
  const processed = await postcss([cssnano])
@@ -159674,11 +159673,7 @@ async function buildSemanticUIAsync(parsed) {
159674
159673
  if (!isPxtCore) {
159675
159674
  // This is just to support the local skillmap serve for development
159676
159675
  nodeutil.cp("built/web/react-common-skillmap.css", "node_modules/pxt-core/skillmap/public/blb");
159677
- nodeutil.cp("built/web/react-common-authcode.css", "node_modules/pxt-core/authcode/public/blb");
159678
- nodeutil.cp("built/web/react-common-multiplayer.css", "node_modules/pxt-core/multiplayer/public/blb");
159679
159676
  nodeutil.cp("built/web/semantic.css", "node_modules/pxt-core/skillmap/public/blb");
159680
- nodeutil.cp("built/web/semantic.css", "node_modules/pxt-core/authcode/public/blb");
159681
- nodeutil.cp("built/web/semantic.css", "node_modules/pxt-core/multiplayer/public/blb");
159682
159677
  }
159683
159678
  }
159684
159679
  async function linkFontAsync(font, semCss, sourceDir = "node_modules/semantic-ui-less/themes/default/assets/fonts/", refDir = "fonts\\/") {
@@ -159697,10 +159692,47 @@ function buildWebStringsAsync() {
159697
159692
  nodeutil.writeFileSync("built/webstrings.json", nodeutil.stringify(webstringsJson()));
159698
159693
  return Promise.resolve();
159699
159694
  }
159700
- function buildReactAppAsync(app, parsed) {
159695
+ function buildSkillMapAsync(parsed) {
159701
159696
  // local serve
159702
- const appRoot = `node_modules/pxt-core/${app}`;
159697
+ const skillmapRoot = "node_modules/pxt-core/skillmap";
159698
+ const reactScriptsConfigRoot = `${skillmapRoot}/node_modules/react-scripts/config`;
159703
159699
  const docsPath = parsed.flags["docs"];
159700
+ return rimrafAsync(`${skillmapRoot}/public/blb`, {})
159701
+ .then(() => rimrafAsync(`${skillmapRoot}/build/assets`, {}))
159702
+ .then(() => rimrafAsync(`${skillmapRoot}/public/docs`, {}))
159703
+ .then(() => rimrafAsync(`${skillmapRoot}/public/static`, {}))
159704
+ .then(() => {
159705
+ // read pxtarget.json, save into 'pxtTargetBundle' global variable
159706
+ let cfg = readLocalPxTarget();
159707
+ nodeutil.writeFileSync(`${skillmapRoot}/public/blb/target.js`, "// eslint-disable-next-line \n" + targetJsPrefix + JSON.stringify(cfg));
159708
+ nodeutil.cp("node_modules/pxt-core/built/pxtlib.js", `${skillmapRoot}/public/blb`);
159709
+ nodeutil.cp("built/web/semantic.css", `${skillmapRoot}/public/blb`);
159710
+ nodeutil.cp("node_modules/pxt-core/built/web/icons.css", `${skillmapRoot}/public/blb`);
159711
+ nodeutil.cp("node_modules/pxt-core/built/web/react-common-skillmap.css", `${skillmapRoot}/public/blb`);
159712
+ // copy 'assets' over from docs/static
159713
+ nodeutil.cpR("docs/static/skillmap/assets", `${skillmapRoot}/public/assets`);
159714
+ // copy default react-scripts webpack config into a webpack.config.base file if necessary
159715
+ if (!fs.existsSync(`${reactScriptsConfigRoot}/webpack.config.base.js`)) {
159716
+ nodeutil.cp(`${reactScriptsConfigRoot}/webpack.config.js`, reactScriptsConfigRoot, "webpack.config.base.js");
159717
+ }
159718
+ // wrap the config in our webpack.config.override for build customization
159719
+ nodeutil.cp(`${skillmapRoot}/webpack.config.override.js`, reactScriptsConfigRoot, "webpack.config.js");
159720
+ if (docsPath) {
159721
+ // copy docs over from specified path
159722
+ nodeutil.cpR(`docs/${docsPath}`, `${skillmapRoot}/public/docs/${docsPath}`);
159723
+ nodeutil.cpR(`docs/static/${docsPath}`, `${skillmapRoot}/public/static/${docsPath}`);
159724
+ }
159725
+ return nodeutil.spawnAsync({
159726
+ cmd: os.platform() === "win32" ? "npm.cmd" : "npm",
159727
+ args: ["run-script", "start"],
159728
+ cwd: skillmapRoot,
159729
+ shell: true
159730
+ });
159731
+ });
159732
+ }
159733
+ function buildAuthcodeAsync(parsed) {
159734
+ // local serve
159735
+ const appRoot = "node_modules/pxt-core/authcode";
159704
159736
  return rimrafAsync(`${appRoot}/public/blb`, {})
159705
159737
  .then(() => rimrafAsync(`${appRoot}/build/assets`, {}))
159706
159738
  .then(() => rimrafAsync(`${appRoot}/public/docs`, {}))
@@ -159712,14 +159744,9 @@ function buildReactAppAsync(app, parsed) {
159712
159744
  nodeutil.cp("node_modules/pxt-core/built/pxtlib.js", `${appRoot}/public/blb`);
159713
159745
  nodeutil.cp("built/web/semantic.css", `${appRoot}/public/blb`);
159714
159746
  nodeutil.cp("node_modules/pxt-core/built/web/icons.css", `${appRoot}/public/blb`);
159715
- nodeutil.cp(`node_modules/pxt-core/built/web/react-common-${app}.css`, `${appRoot}/public/blb`);
159747
+ nodeutil.cp("node_modules/pxt-core/built/web/react-common-authcode.css", `${appRoot}/public/blb`);
159716
159748
  // copy 'assets' over from docs/static
159717
- nodeutil.cpR(`docs/static/${app}/assets`, `${appRoot}/public/assets`);
159718
- if (docsPath) {
159719
- // copy docs over from specified path
159720
- nodeutil.cpR(`docs/${docsPath}`, `${appRoot}/public/docs/${docsPath}`);
159721
- nodeutil.cpR(`docs/static/${docsPath}`, `${appRoot}/public/static/${docsPath}`);
159722
- }
159749
+ nodeutil.cpR("docs/static/authcode/assets", `${appRoot}/public/assets`);
159723
159750
  return nodeutil.spawnAsync({
159724
159751
  cmd: os.platform() === "win32" ? "npm.cmd" : "npm",
159725
159752
  args: ["run-script", "start"],
@@ -159728,15 +159755,6 @@ function buildReactAppAsync(app, parsed) {
159728
159755
  });
159729
159756
  });
159730
159757
  }
159731
- function buildSkillMapAsync(parsed) {
159732
- return buildReactAppAsync("skillmap", parsed);
159733
- }
159734
- function buildAuthcodeAsync(parsed) {
159735
- return buildReactAppAsync("authcode", parsed);
159736
- }
159737
- function buildMultiplayerAsync(parsed) {
159738
- return buildReactAppAsync("multiplayer", parsed);
159739
- }
159740
159758
  function updateDefaultProjects(cfg) {
159741
159759
  let defaultProjects = [
159742
159760
  pxt.BLOCKS_PROJECT_NAME,
@@ -164128,30 +164146,9 @@ ${pxt.crowdin.KEY_VARIABLE} - crowdin key
164128
164146
  flags: {
164129
164147
  serve: {
164130
164148
  description: "Serve the authcode app locally after building (npm start)"
164131
- },
164132
- docs: {
164133
- description: "Path to local docs folder to copy into authcode",
164134
- type: "string",
164135
- argument: "docs"
164136
164149
  }
164137
164150
  }
164138
164151
  }, buildAuthcodeAsync);
164139
- p.defineCommand({
164140
- name: "buildmultiplayer",
164141
- aliases: ["multiplayer", "mp"],
164142
- advanced: true,
164143
- help: "Serves the multiplayer webapp",
164144
- flags: {
164145
- serve: {
164146
- description: "Serve the multiplayer app locally after building (npm start)"
164147
- },
164148
- docs: {
164149
- description: "Path to local docs folder to copy into multiplayer",
164150
- type: "string",
164151
- argument: "docs"
164152
- }
164153
- }
164154
- }, buildMultiplayerAsync);
164155
164152
  advancedCommand("augmentdocs", "test markdown docs replacements", augmnetDocsAsync, "<temlate.md> <doc.md>");
164156
164153
  advancedCommand("crowdin", "upload, download, clean, stats files to/from crowdin", pc => crowdin.execCrowdinAsync.apply(undefined, pc.args), "<cmd> <path> [output]");
164157
164154
  advancedCommand("hidlist", "list HID devices", hid.listAsync);
package/built/pxtlib.d.ts CHANGED
@@ -554,7 +554,6 @@ declare namespace pxt {
554
554
  asseteditorUrl?: string;
555
555
  skillmapUrl?: string;
556
556
  authcodeUrl?: string;
557
- multiplayerUrl?: string;
558
557
  isStatic?: boolean;
559
558
  verprefix?: string;
560
559
  }
package/built/server.js CHANGED
@@ -1050,10 +1050,6 @@ function serveAsync(options) {
1050
1050
  sendFile(path.join(publicDir, 'authcode.html'));
1051
1051
  return;
1052
1052
  }
1053
- if (pathname == "/--multiplayer") {
1054
- sendFile(path.join(publicDir, 'multiplayer.html'));
1055
- return;
1056
- }
1057
1053
  if (/\/-[-]*docs.*$/.test(pathname)) {
1058
1054
  sendFile(path.join(publicDir, 'docs.html'));
1059
1055
  return;