-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix flicker when mask is off (#184)
- Loading branch information
1 parent
f1cd546
commit 14d777f
Showing
2 changed files
with
48 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
/** | ||
* Create play template | ||
*/ | ||
import * as fs from 'fs' | ||
const PLAY_PATH = 'play/src/routes' | ||
import * as fs from 'fs'; | ||
const PLAY_PATH = 'play/src/routes'; | ||
const content = `<script lang="ts"> | ||
import 'virtual:uno.css'; | ||
import { KButton } from '@ikun-ui/button' | ||
</script> | ||
<KButton type="info" cls="mx-2"> | ||
info | ||
</KButton> | ||
` | ||
function createPlayTemplate(){ | ||
if (!fs.existsSync(`${PLAY_PATH}/+page.svelte`)) { | ||
fs.mkdirSync(PLAY_PATH, { recursive: true }); | ||
fs.writeFile(`${PLAY_PATH}/+page.svelte`, content, (err) => { | ||
if (err) { | ||
console.error('Error writing file:', err); | ||
} else { | ||
console.log(`File +page.svelte has been created with the specified content.`); | ||
} | ||
}); | ||
} | ||
`; | ||
function createPlayTemplate() { | ||
if (!fs.existsSync(`${PLAY_PATH}/+page.svelte`)) { | ||
fs.mkdirSync(PLAY_PATH, { recursive: true }); | ||
fs.writeFile(`${PLAY_PATH}/+page.svelte`, content, (err) => { | ||
if (err) { | ||
console.error('Error writing file:', err); | ||
} else { | ||
console.log(`File +page.svelte has been created with the specified content.`); | ||
} | ||
}); | ||
} | ||
} | ||
createPlayTemplate() | ||
createPlayTemplate(); |