commit during bad display issues
This commit is contained in:
parent
92844ad44f
commit
0c992449fc
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
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;
|
||||
|
||||
export default {
|
||||
input: 'src/main.js',
|
||||
output: {
|
||||
sourcemap: true,
|
||||
format: 'iife',
|
||||
name: 'app',
|
||||
file: 'public/build/bundle.js'
|
||||
},
|
||||
plugins: [
|
||||
svelte({
|
||||
// enable run-time checks when not in production
|
||||
dev: !production,
|
||||
// we'll extract any component CSS out into
|
||||
// a separate file - better for performance
|
||||
css: css => {
|
||||
css.write('public/build/bundle.css');
|
||||
}
|
||||
}),
|
||||
'input': 'src/main.js',
|
||||
'output': {
|
||||
'sourcemap': (!production),
|
||||
'format': 'iife',
|
||||
'name': 'app',
|
||||
'file': 'public/build/bundle.js'
|
||||
},
|
||||
'plugins': [
|
||||
svelte({
|
||||
// enable run-time checks when not in production
|
||||
'dev': !production,
|
||||
// we'll extract any component CSS out into
|
||||
// a separate file - better for performance
|
||||
'css': css => {
|
||||
css.write('public/build/bundle.css');
|
||||
}
|
||||
}),
|
||||
|
||||
// If you have external dependencies installed from
|
||||
// npm, you'll most likely need these plugins. In
|
||||
// some cases you'll need additional configuration -
|
||||
// consult the documentation for details:
|
||||
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
||||
resolve({
|
||||
browser: true,
|
||||
dedupe: ['svelte']
|
||||
}),
|
||||
commonjs(),
|
||||
replace({
|
||||
exclude: 'node_modules/**',
|
||||
ENV: JSON.stringify(production ? 'production' : 'development'),
|
||||
}),
|
||||
// If you have external dependencies installed from
|
||||
// npm, you'll most likely need these plugins. In
|
||||
// some cases you'll need additional configuration -
|
||||
// consult the documentation for details:
|
||||
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
||||
resolve({
|
||||
'browser': true,
|
||||
'dedupe': ['svelte']
|
||||
}),
|
||||
commonjs(),
|
||||
replace({
|
||||
'exclude': 'node_modules/**',
|
||||
'ENV': JSON.stringify(production ? 'production' : 'development')
|
||||
}),
|
||||
|
||||
// In dev mode, call `npm run start` once
|
||||
// the bundle has been generated
|
||||
!production && serve(),
|
||||
// In dev mode, call `npm run start` once
|
||||
// the bundle has been generated
|
||||
!production && serve(),
|
||||
|
||||
// Watch the `public` directory and refresh the
|
||||
// browser on changes when not in production
|
||||
!production && livereload('public'),
|
||||
// Watch the `public` directory and refresh the
|
||||
// browser on changes when not in production
|
||||
!production && livereload('public'),
|
||||
|
||||
// If we're building for production (npm run build
|
||||
// instead of npm run dev), minify
|
||||
production && terser()
|
||||
],
|
||||
watch: {
|
||||
clearScreen: false
|
||||
}
|
||||
// If we're building for production (npm run build
|
||||
// instead of npm run dev), minify
|
||||
production && terser()
|
||||
],
|
||||
'watch': {
|
||||
'clearScreen': false
|
||||
}
|
||||
};
|
||||
|
||||
function serve() {
|
||||
let started = false;
|
||||
let started = false;
|
||||
|
||||
return {
|
||||
writeBundle() {
|
||||
if (!started) {
|
||||
started = true;
|
||||
return {
|
||||
writeBundle() {
|
||||
if (!started) {
|
||||
started = true;
|
||||
|
||||
require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
|
||||
stdio: ['ignore', 'inherit', 'inherit'],
|
||||
shell: true
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
|
||||
'stdio': ['ignore', 'inherit', 'inherit'],
|
||||
'shell': true
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<script>
|
||||
import { slide } from 'svelte/transition';
|
||||
|
||||
import { state } from '../store/store';
|
||||
import debounce from 'debounce';
|
||||
|
||||
@ -106,7 +108,7 @@
|
||||
</style>
|
||||
|
||||
{#if _editMode}
|
||||
<div class="container">
|
||||
<div class="container" transition:slide>
|
||||
<form autocomplete="off">
|
||||
<label for="name">Name:</label>
|
||||
<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';
|
||||
|
||||
const url = (ENV === 'production') ? 'https://menu.silvrtree.co.uk/recipes' : 'http://localhost:3000/recipes';
|
||||
|
||||
const oldstate = writable({
|
||||
'recipes': [],
|
||||
'currentItem': {
|
||||
'name': '',
|
||||
'url': '',
|
||||
'md': '',
|
||||
'meat': '',
|
||||
'mealtype': '',
|
||||
'_id': '',
|
||||
'short': '',
|
||||
'hash': '',
|
||||
'lastused': ''
|
||||
},
|
||||
'editMode': false,
|
||||
'meatFilterMode':0,
|
||||
'mealFilterMode':0
|
||||
|
||||
});
|
||||
console.log('Env:', ENV);
|
||||
console.log('Using:', url);
|
||||
|
||||
function Filter() {
|
||||
const { subscribe, set, update } = writable({
|
||||
|
Loading…
Reference in New Issue
Block a user