Skip to content

Commit

Permalink
fix: regression
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Correa Casablanca <[email protected]>
  • Loading branch information
castarco committed Feb 11, 2024
1 parent 1badf03 commit 30f8b6b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ const rootDir = new URL('.', import.meta.url).pathname
export default defineConfig({
integrations: [
sriCSP({
// This parameter is only "necessary" if you are working on something like
// "hybrid" output mode. It allows you to constrain the directories and
// files scan to just the generated client-side files (therefore saving
// time).
distDir: 'client',

// This is the path where we'll generate the module containing the SRI
// hashes for your scripts and styles. There's no need to pass this
// parameter if you don't need this data, but it can be useful to
Expand Down
7 changes: 0 additions & 7 deletions main.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
export type SriCspOptions = {
/**
* It specifies a directory _inside_ the dist/build directory. This is useful
* when working on "hybrid" output mode, as it allows to just scan the
* client-side assets, and not the server-side ones.
*/
distDir?: string | undefined

/**
* Specifies the path for the auto-generated module that will contain the SRI
* hashes. Note that:
Expand Down
2 changes: 1 addition & 1 deletion main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export const sriCSP = sriCspOptions =>
hooks: {
'astro:build:done': async ({ dir }) =>
await generateSRIHashes({
distDir: resolve(fileURLToPath(dir), sriCspOptions.distDir ?? ''),
distDir: fileURLToPath(dir),
sriHashesModule: sriCspOptions.sriHashesModule,
}),
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kindspells/astro-sri-csp",
"version": "0.2.0",
"version": "0.2.1",
"description": "An Astro plugin to compute and inject SRI hashes for script and style tags",
"private": false,
"type": "module",
Expand Down

0 comments on commit 30f8b6b

Please sign in to comment.