lucid-package 0.0.114 → 0.0.116

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-package",
3
- "version": "0.0.114",
3
+ "version": "0.0.116",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -22,12 +22,16 @@ const chokidar = require('chokidar');
22
22
  async function createEditorExtension(name, isInternal, skipSDKDependency, source = 'vanilla', deps = []) {
23
23
  const editorExtensionSource = path.join(__dirname, '..', 'templates', 'editorextension', source);
24
24
  const editorExtensionTargetFolder = path.join('editorextensions', name);
25
- const publicSource = path.join(__dirname, '..', 'templates', 'public');
26
- const publicTargetFolder = 'public';
27
25
  const codePath = path.join('editorextensions', name, 'bin', 'extension.js');
28
26
  console.log((0, theme_1.success)('Creating empty editor extension in ' + editorExtensionTargetFolder));
29
27
  (0, filesystemutil_1.copyFolderRecursiveSync)(editorExtensionSource, editorExtensionTargetFolder);
30
- (0, filesystemutil_1.copyFolderRecursiveSync)(publicSource, publicTargetFolder);
28
+ // Angular and React extensions will automatically create the `public` folder,
29
+ // during the webpack build
30
+ if (source === 'vanilla') {
31
+ const publicSource = path.join(__dirname, '..', 'templates', 'public');
32
+ const publicTargetFolder = 'public';
33
+ (0, filesystemutil_1.copyFolderRecursiveSync)(publicSource, publicTargetFolder);
34
+ }
31
35
  await (0, package_1.modifyManifest)((manifest) => {
32
36
  if (!manifest['extensions']) {
33
37
  manifest['extensions'] = [];
@@ -211,6 +215,9 @@ async function debugEditorExtension(extensionNames, isInternal, quiet = false, p
211
215
  app.get('/editorextensions/errors', async (req, res) => {
212
216
  res.send(JSON.stringify(Array.from(errorLog.entries())));
213
217
  });
218
+ // If you would like to serve files during dev that should not be bundled (so, you cannot use `public`) you can
219
+ // place them in the `devfiles` directory and they will be served here.
220
+ app.use('/devfiles', express.static('devfiles'));
214
221
  // Static resources in the "public" directory of the package
215
222
  const manifest = await (0, packagemanifest_1.readManifest)('local');
216
223
  if (manifest['public']) {