commit during bad display issues
This commit is contained in:
parent
92844ad44f
commit
0c992449fc
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
4
copy.sh
Executable file
4
copy.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# rm -rf /home/martin/dev/menuserver/dist/*
|
||||||
|
cp -r /home/martin/dev/svelte_menu/public/* /home/martin/dev/menuserver/dist
|
BIN
photothumb.db
Normal file
BIN
photothumb.db
Normal file
Binary file not shown.
BIN
recipes.xcf
Normal file
BIN
recipes.xcf
Normal file
Binary file not shown.
BIN
recipes_svelte.png
Normal file
BIN
recipes_svelte.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
112
rollup.config.js
112
rollup.config.js
@ -8,69 +8,69 @@ import { terser } from 'rollup-plugin-terser';
|
|||||||
const production = !process.env.ROLLUP_WATCH;
|
const production = !process.env.ROLLUP_WATCH;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: 'src/main.js',
|
'input': 'src/main.js',
|
||||||
output: {
|
'output': {
|
||||||
sourcemap: true,
|
'sourcemap': (!production),
|
||||||
format: 'iife',
|
'format': 'iife',
|
||||||
name: 'app',
|
'name': 'app',
|
||||||
file: 'public/build/bundle.js'
|
'file': 'public/build/bundle.js'
|
||||||
},
|
},
|
||||||
plugins: [
|
'plugins': [
|
||||||
svelte({
|
svelte({
|
||||||
// enable run-time checks when not in production
|
// enable run-time checks when not in production
|
||||||
dev: !production,
|
'dev': !production,
|
||||||
// we'll extract any component CSS out into
|
// we'll extract any component CSS out into
|
||||||
// a separate file - better for performance
|
// a separate file - better for performance
|
||||||
css: css => {
|
'css': css => {
|
||||||
css.write('public/build/bundle.css');
|
css.write('public/build/bundle.css');
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// If you have external dependencies installed from
|
// If you have external dependencies installed from
|
||||||
// npm, you'll most likely need these plugins. In
|
// npm, you'll most likely need these plugins. In
|
||||||
// some cases you'll need additional configuration -
|
// some cases you'll need additional configuration -
|
||||||
// consult the documentation for details:
|
// consult the documentation for details:
|
||||||
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
||||||
resolve({
|
resolve({
|
||||||
browser: true,
|
'browser': true,
|
||||||
dedupe: ['svelte']
|
'dedupe': ['svelte']
|
||||||
}),
|
}),
|
||||||
commonjs(),
|
commonjs(),
|
||||||
replace({
|
replace({
|
||||||
exclude: 'node_modules/**',
|
'exclude': 'node_modules/**',
|
||||||
ENV: JSON.stringify(production ? 'production' : 'development'),
|
'ENV': JSON.stringify(production ? 'production' : 'development')
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// In dev mode, call `npm run start` once
|
// In dev mode, call `npm run start` once
|
||||||
// the bundle has been generated
|
// the bundle has been generated
|
||||||
!production && serve(),
|
!production && serve(),
|
||||||
|
|
||||||
// Watch the `public` directory and refresh the
|
// Watch the `public` directory and refresh the
|
||||||
// browser on changes when not in production
|
// browser on changes when not in production
|
||||||
!production && livereload('public'),
|
!production && livereload('public'),
|
||||||
|
|
||||||
// If we're building for production (npm run build
|
// If we're building for production (npm run build
|
||||||
// instead of npm run dev), minify
|
// instead of npm run dev), minify
|
||||||
production && terser()
|
production && terser()
|
||||||
],
|
],
|
||||||
watch: {
|
'watch': {
|
||||||
clearScreen: false
|
'clearScreen': false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function serve() {
|
function serve() {
|
||||||
let started = false;
|
let started = false;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
writeBundle() {
|
writeBundle() {
|
||||||
if (!started) {
|
if (!started) {
|
||||||
started = true;
|
started = true;
|
||||||
|
|
||||||
require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
|
require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
|
||||||
stdio: ['ignore', 'inherit', 'inherit'],
|
'stdio': ['ignore', 'inherit', 'inherit'],
|
||||||
shell: true
|
'shell': true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { slide } from 'svelte/transition';
|
||||||
|
|
||||||
import { state } from '../store/store';
|
import { state } from '../store/store';
|
||||||
import debounce from 'debounce';
|
import debounce from 'debounce';
|
||||||
|
|
||||||
@ -106,7 +108,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
{#if _editMode}
|
{#if _editMode}
|
||||||
<div class="container">
|
<div class="container" transition:slide>
|
||||||
<form autocomplete="off">
|
<form autocomplete="off">
|
||||||
<label for="name">Name:</label>
|
<label for="name">Name:</label>
|
||||||
<input type="text" name="name" id="name" bind:value={_currentItem.name} required/>
|
<input type="text" name="name" id="name" bind:value={_currentItem.name} required/>
|
||||||
|
@ -2,25 +2,8 @@ import { writable } from 'svelte/store';
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const url = (ENV === 'production') ? 'https://menu.silvrtree.co.uk/recipes' : 'http://localhost:3000/recipes';
|
const url = (ENV === 'production') ? 'https://menu.silvrtree.co.uk/recipes' : 'http://localhost:3000/recipes';
|
||||||
|
console.log('Env:', ENV);
|
||||||
const oldstate = writable({
|
console.log('Using:', url);
|
||||||
'recipes': [],
|
|
||||||
'currentItem': {
|
|
||||||
'name': '',
|
|
||||||
'url': '',
|
|
||||||
'md': '',
|
|
||||||
'meat': '',
|
|
||||||
'mealtype': '',
|
|
||||||
'_id': '',
|
|
||||||
'short': '',
|
|
||||||
'hash': '',
|
|
||||||
'lastused': ''
|
|
||||||
},
|
|
||||||
'editMode': false,
|
|
||||||
'meatFilterMode':0,
|
|
||||||
'mealFilterMode':0
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function Filter() {
|
function Filter() {
|
||||||
const { subscribe, set, update } = writable({
|
const { subscribe, set, update } = writable({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user