Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(sveltekit): Add Open in Stackblitz buttons to SvelteKit example …
…repo readmes (#1802) * run stackblitz specific command on loading sveltekit-scoped example in stackblitz * add script to rename package links to latest for stackblitz * add @iconify-json/ri * copy link removal across to sveltekit example * chore: lint extra spacing * chore: fix transformerDirectives typo to match function name exported from unocss package
- Loading branch information
Showing
8 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { promises as fsPromises } from 'fs' | ||
|
||
async function replaceInFile(filename, replacement) { | ||
try { | ||
const contents = await fsPromises.readFile(filename, 'utf-8') | ||
const replaced = contents.replace(/"link:...+"/gi, replacement) | ||
await fsPromises.writeFile(filename, replaced) | ||
} | ||
catch (err) { | ||
console.error(err) | ||
} | ||
} | ||
|
||
replaceInFile('./package.json', '"latest"') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { promises as fsPromises } from 'fs' | ||
|
||
async function replaceInFile(filename, replacement) { | ||
try { | ||
const contents = await fsPromises.readFile(filename, 'utf-8') | ||
const replaced = contents.replace(/"link:...+"/gi, replacement) | ||
await fsPromises.writeFile(filename, replaced) | ||
} | ||
catch (err) { | ||
console.error(err) | ||
} | ||
} | ||
|
||
replaceInFile('./package.json', '"latest"') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters