@embeddable.com/sdk-core 0.1.1 → 0.2.0

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": "@embeddable.com/sdk-core",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Core Embeddable SDK module responsible for web-components bundling and publishing.",
5
5
  "keywords": [
6
6
  "embeddable",
@@ -6,6 +6,7 @@ const { findEmbFiles } = require("./findEmbFiles");
6
6
 
7
7
 
8
8
  const EMB_TYPE_FILE_REGEX = /^(.*)\.type\.emb\.[jt]s$/;
9
+ const EMB_OPTIONS_FILE_REGEX = /^(.*)\.options\.emb\.[jt]s$/;
9
10
 
10
11
  async function buildTypes(ctx) {
11
12
  await generate(ctx);
@@ -20,8 +21,9 @@ module.exports = { buildTypes };
20
21
 
21
22
  async function generate(ctx) {
22
23
  const typeFiles = await findEmbFiles(ctx.client.srcDir, EMB_TYPE_FILE_REGEX);
24
+ const optionsFiles = await findEmbFiles(ctx.client.srcDir, EMB_OPTIONS_FILE_REGEX);
23
25
 
24
- const typeImports = typeFiles.map(([fileName, filePath]) =>
26
+ const typeImports = typeFiles.concat(optionsFiles).map(([fileName, filePath]) =>
25
27
  `import './${path.relative(ctx.client.rootDir, filePath)}';`
26
28
  ).join('\n');
27
29