@atomicsmash/compiler 3.0.2-beta.2 → 4.0.0-beta.4

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/dist/cli.js CHANGED
@@ -35,6 +35,7 @@ const argv = await yargs(hideBin(process.argv))
35
35
  string: true,
36
36
  default: ["__TEMPLATE__"],
37
37
  describe: "A comma separated list of the folder names of blocks to exclude from compilation. Requires experimental blocks support.",
38
+ deprecate: "Use folders which start with an underscore instead."
38
39
  },
39
40
  })
40
41
  .showHelpOnFail(false, "Specify --help for available options")
@@ -116,9 +117,6 @@ else {
116
117
  for (const warning of warnings) {
117
118
  console.warn(warning.message);
118
119
  }
119
- if (!stats.hasErrors()) {
120
- process.exitCode = 2;
121
- }
122
120
  }
123
121
  }
124
122
  compiler.close((closeError) => {
package/dist/config.d.ts CHANGED
@@ -29,6 +29,8 @@ export declare function config(options: {
29
29
  analyse?: boolean | undefined;
30
30
  /**
31
31
  * A comma separated list of the folder names of blocks to exclude from compilation. Requires experimental blocks support.
32
+ *
33
+ * @deprecated Use folders which start with an underscore instead.
32
34
  */
33
35
  excludeBlocks?: string[] | undefined;
34
36
  }): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAiB,QAAQ,EAAe,MAAM,SAAS,CAAC;AAUpE,OAAO,iCAAiC,MAAM,iDAAiD,CAAC;AAEhG,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,OAAO,MAAM,SAAS,CAA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,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,wBAAsB,MAAM,CAAC,OAAO,EAAE;IACrC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCA4M4B,QAAQ;;;;;;;;;;;;;;;qCAeV,QAAQ;;;;;;;;;;sCAlQA,CAAC;;;;;;;;;;;;;;;;;;;;;;;GAucnC"}
package/dist/config.js CHANGED
@@ -113,14 +113,17 @@ export async function config(options) {
113
113
  entry: await glob([
114
114
  // Parse all block json typescript files in the blocks folder.
115
115
  `${srcFolder}/blocks/**/block.json.ts`,
116
- // Parse all direct children of the JS folder, as long as they are JS & TS files
117
- `${srcFolder}/scripts/*.{js,ts,jsx,tsx}`,
118
- // Parse all direct children of the CSS folder, as long as they are CSS files
119
- `${srcFolder}/styles/*.css`,
116
+ // Parse all children of the JS folder, as long as they are JS & TS files and not in a folder that starts with an underscore
117
+ `${srcFolder}/scripts/**/*.{js,ts,jsx,tsx}`,
118
+ // Parse all children of the CSS folder, as long as they are CSS files and not in a folder that starts with an underscore
119
+ `${srcFolder}/styles/**/*.css`,
120
120
  // Parse all nested children of the CSS folder, as long as they are non-partial SCSS files
121
121
  `${srcFolder}/styles/**/[^_]*.s[ac]ss`,
122
122
  ], {
123
- ignore: argv.excludeBlocks.map((blockName) => `${srcFolder}/blocks/**/${blockName}/block.json.ts`),
123
+ ignore: [
124
+ ...argv.excludeBlocks.map((blockName) => `${srcFolder}/blocks/**/${blockName}/block.json.ts`),
125
+ '!**/_*/**' // Exclude any folder that starts with an underscore for all files
126
+ ],
124
127
  }).then(async (paths) => {
125
128
  const { restOfPaths, entryPoints } = await getBlocksAssetsEntryPoints(paths, {}, srcFolder);
126
129
  restOfPaths.forEach((path) => {
@@ -310,9 +313,12 @@ export async function config(options) {
310
313
  }
311
314
  if (entry.key === "assets.php" ||
312
315
  entry.key === "wordpress-assets-info.php" ||
316
+ entry.key === "wordpress-assets-info.json" ||
313
317
  entry.key.endsWith(".map") ||
314
318
  entry.key.startsWith("fonts") ||
315
- entry.key.startsWith("images")) {
319
+ entry.key.startsWith("images") ||
320
+ entry.key.endsWith(".scss.css") ||
321
+ entry.key.endsWith(".css.css")) {
316
322
  return false;
317
323
  }
318
324
  if (entry.key === "spritemap.svg") {
@@ -332,6 +338,9 @@ export async function config(options) {
332
338
  if (entry.key.endsWith(".js")) {
333
339
  entry.key = entry.key.slice(0, -3);
334
340
  }
341
+ if (entry.key.endsWith(".css.css")) {
342
+ entry.key = entry.key.slice(0, -3);
343
+ }
335
344
  return entry;
336
345
  },
337
346
  }),
package/dist/index.js CHANGED
@@ -1,3 +1,2 @@
1
- export {};
2
1
  // export { config } from "./config";
3
2
  // export { config as default } from "./config";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atomicsmash/compiler",
3
3
  "type": "module",
4
- "version": "3.0.2-beta.2",
4
+ "version": "4.0.0-beta.4",
5
5
  "description": "A universal compiler for all Atomic Smash projects.",
6
6
  "keywords": [
7
7
  "cli",