Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor #1367

Merged
merged 86 commits into from
Apr 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
d3afc4c
baby steps towards #1316
Rich-Harris Apr 22, 2018
fb09c25
remove unused contextDependencies references
Rich-Harris Apr 22, 2018
83e62ea
remove more unused references
Rich-Harris Apr 22, 2018
6484333
Merge branch 'master' into gh-1316
Rich-Harris Apr 22, 2018
9ff1bee
WIP
Rich-Harris Apr 23, 2018
7825c12
various
Rich-Harris Apr 23, 2018
32774a8
more stuff
Rich-Harris Apr 23, 2018
c0d241d
fix helpers
Rich-Harris Apr 23, 2018
f8db2ee
use ctx in SSR
Rich-Harris Apr 23, 2018
662363c
spread
Rich-Harris Apr 23, 2018
cd99eb6
html tags
Rich-Harris Apr 23, 2018
577e28b
svelte:component
Rich-Harris Apr 24, 2018
2c7d935
generate correct code for hoisted event handlers
Rich-Harris Apr 24, 2018
b843e82
component spread
Rich-Harris Apr 24, 2018
6aef709
await blocks
Rich-Harris Apr 24, 2018
3cc44cf
remove some unused code
Rich-Harris Apr 24, 2018
ad1679c
add style scoping classes
Rich-Harris Apr 24, 2018
be3556e
fix indexes
Rich-Harris Apr 24, 2018
d960827
various
Rich-Harris Apr 24, 2018
53374da
component events
Rich-Harris Apr 24, 2018
ec50c5e
<svelte:head>
Rich-Harris Apr 24, 2018
cc4b269
rename state -> ctx in various places
Rich-Harris Apr 25, 2018
dbd68c9
comments
Rich-Harris Apr 25, 2018
4d09a27
SSR component bindings
Rich-Harris Apr 25, 2018
caf4356
compound component attributes
Rich-Harris Apr 25, 2018
8de4145
textarea special case
Rich-Harris Apr 25, 2018
4e705d2
fix component binding initialisation
Rich-Harris Apr 25, 2018
39525f8
fix attribute stringification
Rich-Harris Apr 25, 2018
0c7da31
fix some component event stuff
Rich-Harris Apr 25, 2018
d86534c
fix each-else
Rich-Harris Apr 25, 2018
6e0c3bd
autofocus
Rich-Harris Apr 25, 2018
3bb673d
readonly dev warnings
Rich-Harris Apr 25, 2018
de9b3a5
fix slot attribute validation
Rich-Harris Apr 25, 2018
6b3d7c2
deep bindings
Rich-Harris Apr 25, 2018
c62178d
fix contextual events
Rich-Harris Apr 25, 2018
b35a9e6
fix/simplify bindings
Rich-Harris Apr 25, 2018
d9289ca
handle value-less <option> elements
Rich-Harris Apr 27, 2018
8b2a653
fix one way select binding
Rich-Harris Apr 27, 2018
b874b3c
hmm. work around weird code generation glitch
Rich-Harris Apr 27, 2018
1120c13
named slots and event context
Rich-Harris Apr 27, 2018
242d64d
fix contextual component bindings
Rich-Harris Apr 27, 2018
a66b2e9
component event shorthand
Rich-Harris Apr 27, 2018
928a4bd
css fix
Rich-Harris Apr 27, 2018
331ef32
handle shorthand properties in expressions
Rich-Harris Apr 27, 2018
77a4702
maintain context for component events
Rich-Harris Apr 27, 2018
5732450
destructuring
Rich-Harris Apr 27, 2018
041ad80
each block indexes
Rich-Harris Apr 28, 2018
b73a3f6
use context in event handlers regardless of dependencies
Rich-Harris Apr 28, 2018
912c791
more event handler stuff
Rich-Harris Apr 28, 2018
fbc5d83
prevent double editing of synthetic attributes
Rich-Harris Apr 28, 2018
fa2b1f8
fix indirect dependencies
Rich-Harris Apr 28, 2018
3fdf542
reenable non-runtime tests
Rich-Harris Apr 28, 2018
5722a51
fix css expression analysis
Rich-Harris Apr 28, 2018
1d7366d
ref selectors
Rich-Harris Apr 28, 2018
cf1e00e
attribute stringification
Rich-Harris Apr 28, 2018
f79bede
validate components
Rich-Harris Apr 28, 2018
bb30e26
validate <title> elements
Rich-Harris Apr 28, 2018
67e4a90
parse <slot> as element in custom element mode
Rich-Harris Apr 28, 2018
4c9ba2e
update parser tests
Rich-Harris Apr 28, 2018
0cb44bb
sourcemap fix
Rich-Harris Apr 28, 2018
c06bfdb
fix stringification of attributes in ssr
Rich-Harris Apr 28, 2018
a641019
fix bindings in ssr
Rich-Harris Apr 28, 2018
86d3476
minor fixes, update various tests
Rich-Harris Apr 28, 2018
c3c7970
minor fixes
Rich-Harris Apr 28, 2018
7224ef4
all tests passing
Rich-Harris Apr 28, 2018
4c8a5c5
put precedence logic on expression
Rich-Harris Apr 28, 2018
f892389
no need to clone ast
Rich-Harris Apr 28, 2018
deca888
remove some unused Block properties
Rich-Harris Apr 28, 2018
3aca6a6
remove some unnecessary code
Rich-Harris Apr 28, 2018
515392a
remove more unnecessary stuff
Rich-Harris Apr 28, 2018
11fdb08
more tidying up
Rich-Harris Apr 28, 2018
d10072f
more tidying up
Rich-Harris Apr 28, 2018
11d396f
more tidying up
Rich-Harris Apr 28, 2018
b2b3bda
move SSR logic into nodes
Rich-Harris Apr 28, 2018
ebf1fe3
use same shared helpers mechanism for SSR compiler
Rich-Harris Apr 28, 2018
6cf3f11
replace all ssr __helpers
Rich-Harris Apr 28, 2018
8759ccd
simplify ssr
Rich-Harris Apr 28, 2018
8fc59d7
shuffle some stuff around
Rich-Harris Apr 28, 2018
e0f2a4e
update gitignore
Rich-Harris Apr 28, 2018
dd0f093
move ssr/dom-specific logic into new Target classes, instead of subcl…
Rich-Harris Apr 28, 2018
9b70523
rename Generator -> Compiler
Rich-Harris Apr 28, 2018
3696e08
remove unused import
Rich-Harris Apr 28, 2018
a690ba0
remove files that mysteriously reappeared
Rich-Harris Apr 28, 2018
8f1c4b3
oops i did it again
Rich-Harris Apr 29, 2018
2ca0050
fix gitignore, move ssr files
Rich-Harris Apr 29, 2018
01c3558
move some more ssr files
Rich-Harris Apr 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 14 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
.DS_Store
node_modules
compiler
ssr
shared.js
scratch
!test/compiler
!test/ssr
.nyc_output
coverage
coverage.lcov
test/sourcemaps/samples/*/output.js
test/sourcemaps/samples/*/output.js.map
_actual.*
_actual-v2.*
_actual-bundle.*
src/generators/dom/shared.ts
package-lock.json
.idea/
*.iml
store.umd.js
yarn-error.log
node_modules
/compiler/
/ssr/
/shared.js
/scratch/
/coverage/
/coverage.lcov/
/test/sourcemaps/samples/*/output.js
/test/sourcemaps/samples/*/output.js.map
/src/compile/shared.ts
/package-lock.json
/store.umd.js
/yarn-error.log
_actual*.*
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default [

/* ssr/register.js */
{
input: 'src/server-side-rendering/register.js',
input: 'src/ssr/register.js',
plugins: [
resolve(),
commonjs(),
Expand Down
10 changes: 5 additions & 5 deletions src/Stats.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Node, Warning } from './interfaces';
import Generator from './generators/Generator';
import Compiler from './compile/Compiler';

const now = (typeof process !== 'undefined' && process.hrtime)
? () => {
Expand Down Expand Up @@ -73,12 +73,12 @@ export default class Stats {
this.currentChildren = this.currentTiming ? this.currentTiming.children : this.timings;
}

render(generator: Generator) {
render(compiler: Compiler) {
const timings = Object.assign({
total: now() - this.startTime
}, collapseTimings(this.timings));

const imports = generator.imports.map(node => {
const imports = compiler.imports.map(node => {
return {
source: node.source.value,
specifiers: node.specifiers.map(specifier => {
Expand All @@ -95,8 +95,8 @@ export default class Stats {
});

const hooks: Record<string, boolean> = {};
if (generator.templateProperties.oncreate) hooks.oncreate = true;
if (generator.templateProperties.ondestroy) hooks.ondestroy = true;
if (compiler.templateProperties.oncreate) hooks.oncreate = true;
if (compiler.templateProperties.ondestroy) hooks.ondestroy = true;

return {
timings,
Expand Down
Loading