This file contains hidden or 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
| 2.2.x | |
| Name : Sam | |
| Serial : eJzzzU/OLi0odswsqglOzK0xsjQzNzI2NjA1q3GuMQQAnJAJjw== | |
| 3.3.x | |
| Username: personal | |
| eJzzzU/OLi0odswsqilILSrOz0vMqbFEAjXONYY1fu6ufgA/CA4X |
This file contains hidden or 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
| const { fork } = require('child_process'); | |
| const cache = require('node-shared-cache'); | |
| let childCache = new cache.Cache('children', 524288); | |
| let child; | |
| function startWorker(ready) { | |
| child = fork(require.resolve('./worker'), { | |
| cwd: process.cwd(), | |
| silent: true | |
| }); |
This file contains hidden or 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
| const BLOCK_CHAR = '█'; | |
| let blockChar = `${BLOCK_CHAR}`; | |
| function updateTerminal(content) { | |
| document.getElementById('terminal').innerHTML = content; | |
| } | |
| function flickerBlock() { | |
| if (blockChar.length > 0) { | |
| blockChar = ""; |
This file contains hidden or 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
| module.exports = function (bundler) { | |
| bundler.addAssetType('svelte', require.resolve('./SvelteAsset')); | |
| }; |
This file contains hidden or 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
| const { Asset } = require('parcel-bundler'); | |
| class SvelteAsset extends Asset { | |
| constructor(name, pkg, options) { | |
| super(name, pkg, options); | |
| this.type = 'js'; | |
| } | |
| async parse(inputCode) { | |
| return {}; |
This file contains hidden or 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
| const { compile, preprocess } = require('svelte'); | |
| async parse(inputCode) { | |
| let svelteOptions = { | |
| compilerOptions: { | |
| generate: 'dom', | |
| format: 'cjs', | |
| store: true, | |
| filename: this.relativeName, | |
| css: false |
This file contains hidden or 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
| const { compile, preprocess } = require('svelte'); | |
| const { Asset } = require('parcel-bundler'); | |
| class SvelteAsset extends Asset { | |
| constructor(name, pkg, options) { | |
| super(name, pkg, options); | |
| this.type = 'js'; | |
| } | |
| async generate() { |
This file contains hidden or 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
| const assertBundleTree = require('parcel-assert-bundle-tree'); | |
| const path = require('path'); | |
| const SveltePlugin = require('../src/index'); | |
| describe('basic', function() { | |
| it('Should create a basic svelte bundle', async function() { | |
| // Init bundler | |
| const bundler = new Bundler(input, Object.assign({ | |
| outDir: path.join(__dirname, 'dist'), | |
| watch: false, |
This file contains hidden or 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
| import { stylish } from 'tiny-stylish-components'; | |
| const Button = stylish.button` | |
| background: #ffffff; | |
| color: #a2a2a2; | |
| border: none; | |
| `; | |
| render() { | |
| return <Button>I am a button! Click Me!</Button>; |
This file contains hidden or 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
| import { stylish } from 'tiny-stylish-components'; | |
| const Button = stylish.button` | |
| background: #ffffff; | |
| color: #a2a2a2; | |
| border: 1px solid #a2a2a2; | |
| border-radius: 5px; | |
| width: 100px; | |
| padding: 5px 10px; | |
| &:hover { |
OlderNewer