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
| { | |
| "action_space": [ | |
| { | |
| "steering_angle": -30, | |
| "speed": 2.5, | |
| "index": 0 | |
| }, | |
| { | |
| "steering_angle": -30, | |
| "speed": 5.5, |
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 wrapHMR(module) { | |
| if (module.hot) { | |
| module.hot.dispose(() => { | |
| window.location.reload(); | |
| }); | |
| } | |
| return module; | |
| } |
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'; | |
| let bg = '#ffffff'; | |
| let color = '#ffffff'; | |
| let randomColor = () => `#${Array.apply(null, Array(6)).map(el => '0123456789ABCDEF'[Math.floor(Math.random() * 16)]).join('')}`; | |
| const Button = stylish.button` | |
| background: ${bg}; | |
| color: ${color}; | |
| border: 1px solid ${randomColor()}; |
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; | |
| `; |
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; | |
| @media (max-width: 400px) { |
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 { |
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
| 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
| 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 { compile, preprocess } = require('svelte'); | |
| async parse(inputCode) { | |
| let svelteOptions = { | |
| compilerOptions: { | |
| generate: 'dom', | |
| format: 'cjs', | |
| store: true, | |
| filename: this.relativeName, | |
| css: false |
NewerOlder