@ryanatkn/gro 0.114.0 → 0.115.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.
@@ -15,7 +15,7 @@ const config: Gro_ConfigCreator = async (cfg) => {
15
15
  // host_target?: Host_Target;
16
16
  // well_known_package_json?: boolean | Map_Package_Json;
17
17
  // well_known_src_json?: boolean | Map_Src_Json;
18
- // well_known_src?: boolean | Copy_File_Filter;
18
+ // well_known_src_files?: boolean | Copy_File_Filter;
19
19
  }),
20
20
  ];
21
21
  return cfg;
@@ -102,12 +102,12 @@ The `.well-known/src.json` file contains more details about
102
102
  the `package.json`'s `exports`, like exported identifier names and types.
103
103
  It maps each export to a source file in `.well-known/src/`.
104
104
 
105
- ## `well_known_src`
105
+ ## `well_known_src_files`
106
106
 
107
107
  The contents of your `src/` directory can be included in the output
108
108
  if you want your app's source code to be available the same as the built files.
109
109
  This is disabled by default.
110
- If `well_known_src` is truthy,
110
+ If `well_known_src_files` is truthy,
111
111
  the plugin copies `src/` to `static/.well-known/src/` during `vite build`.
112
112
  Passing `true` uses the same filter as `exports` in `package.json` by default,
113
113
  and it also accepts a custom filter function.
@@ -18,9 +18,9 @@ behavior designed for public open source projects:
18
18
  containing additional information about the source modules,
19
19
  mapping it with the optional
20
20
  [`well_known_src_json` option](./gro_plugin_sveltekit_app.md#well_known_src_json).
21
- - If you opt in with `well_known_src`,
21
+ - If you opt in with `well_known_src_files`,
22
22
  `gro_plugin_sveltekit_app` outputs `.well-known/src/` by
23
- copying over `src/` during `vite build`, filtered by `well_known_src` if it's a function.
23
+ copying over `src/` during `vite build`, filtered by `well_known_src_files` if it's a function.
24
24
  This is costly (usually more than doubling the final output size
25
25
  of the code files in bytes, not counting images and such),
26
26
  it slows the build because it copies your entire source tree (sorry to hard drives),
@@ -28,5 +28,5 @@ behavior designed for public open source projects:
28
28
 
29
29
  > ⚠️ Setting `"public": true` in `package.json` exposes your `package.json`
30
30
  > and `src.json` metadata with your other built files by default!
31
- > Further opting in with `well_known_src` exposes your actual source files.
31
+ > Further opting in with `well_known_src_files` exposes your actual source files.
32
32
  > If your built files are public, that means these additional files are also public.
@@ -22,10 +22,10 @@ export interface Options {
22
22
  * If truthy, copies `src/` to `/.well-known/src/` to the static output.
23
23
  * Pass a function to customize which files get copied.
24
24
  */
25
- well_known_src?: boolean | Copy_File_Filter;
25
+ well_known_src_files?: boolean | Copy_File_Filter;
26
26
  }
27
27
  export type Host_Target = 'github_pages' | 'static' | 'node';
28
28
  export interface Copy_File_Filter {
29
29
  (file_path: string): boolean | Promise<boolean>;
30
30
  }
31
- export declare const gro_plugin_sveltekit_app: ({ host_target, well_known_package_json, well_known_src_json, well_known_src, }?: Options) => Plugin<Plugin_Context>;
31
+ export declare const gro_plugin_sveltekit_app: ({ host_target, well_known_package_json, well_known_src_json, well_known_src_files, }?: Options) => Plugin<Plugin_Context>;
@@ -11,7 +11,7 @@ import { serialize_src_json, create_src_json } from './src_json.js';
11
11
  import { DEFAULT_EXPORTS_EXCLUDER } from './config.js';
12
12
  import { SVELTEKIT_CONFIG_FILENAME } from './paths.js';
13
13
  export const has_sveltekit_app = () => exists(SVELTEKIT_CONFIG_FILENAME);
14
- export const gro_plugin_sveltekit_app = ({ host_target = 'github_pages', well_known_package_json, well_known_src_json, well_known_src, } = {}) => {
14
+ export const gro_plugin_sveltekit_app = ({ host_target = 'github_pages', well_known_package_json, well_known_src_json, well_known_src_files, } = {}) => {
15
15
  let sveltekit_process = null;
16
16
  return {
17
17
  name: 'gro_plugin_sveltekit_app',
@@ -65,10 +65,10 @@ export const gro_plugin_sveltekit_app = ({ host_target = 'github_pages', well_kn
65
65
  serialized_src_json
66
66
  ? await create_temporarily(join(assets_path, '.well-known/src.json'), serialized_src_json)
67
67
  : null,
68
- serialized_src_json && well_known_src
69
- ? await copy_temporarily('src', assets_path, '.well-known', well_known_src === true
68
+ serialized_src_json && well_known_src_files
69
+ ? await copy_temporarily('src', assets_path, '.well-known', well_known_src_files === true
70
70
  ? (file_path) => !DEFAULT_EXPORTS_EXCLUDER.test(file_path)
71
- : well_known_src)
71
+ : well_known_src_files)
72
72
  : null,
73
73
  /**
74
74
  * GitHub pages processes everything with Jekyll by default,
package/dist/package.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // generated by src/lib/package.gen.ts
2
2
  export const package_json = {
3
3
  name: '@ryanatkn/gro',
4
- version: '0.114.0',
4
+ version: '0.115.0',
5
5
  description: 'task runner and toolkit extending SvelteKit',
6
6
  icon: '🌰',
7
7
  public: true,
@@ -235,7 +235,7 @@ export const package_json = {
235
235
  };
236
236
  export const src_json = {
237
237
  name: '@ryanatkn/gro',
238
- version: '0.114.0',
238
+ version: '0.115.0',
239
239
  modules: {
240
240
  '.': {
241
241
  path: 'index.ts',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryanatkn/gro",
3
- "version": "0.114.0",
3
+ "version": "0.115.0",
4
4
  "description": "task runner and toolkit extending SvelteKit",
5
5
  "icon": "🌰",
6
6
  "public": true,