Skip to content

Commit

Permalink
chore(all): shorten customElement declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
fkleuver committed Oct 22, 2018
1 parent 8f70dcf commit e67b79b
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 244 deletions.
13 changes: 2 additions & 11 deletions examples/jit-aurelia-cli-ts/src/app.ts
@@ -1,16 +1,7 @@

import { customElement } from '@aurelia/runtime';
import * as view from 'text!./app.html';
import * as template from 'text!./app.html';

@customElement({
name: 'app',
template: <any>view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
15 changes: 2 additions & 13 deletions examples/jit-browserify-ts/src/app.ts
@@ -1,18 +1,7 @@

import { customElement } from '@aurelia/runtime';
import * as view from './app.html';
import * as template from './app.html';

@customElement({
name: 'app',
template: <any>view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {

message = 'Hello World!';
}

14 changes: 3 additions & 11 deletions examples/jit-fuse-box-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
}
7 changes: 1 addition & 6 deletions examples/jit-iife-inline/index.html
Expand Up @@ -19,12 +19,7 @@
constructor() { this.message = 'Hello World!'; }
}
var host = document.querySelector('app');
au.runtime.customElement({
name: 'app',
template: host.innerHTML,
build: { required: true, compiler: 'default' },
instructions: []
})(App)
au.runtime.customElement({ name: 'app', template: host.innerHTML })(App)
new au.runtime.Aurelia()
.register(au.jit.BasicConfiguration)
.app({ host, component: new App() })
Expand Down
12 changes: 2 additions & 10 deletions examples/jit-parcel-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
12 changes: 2 additions & 10 deletions examples/jit-webpack-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
13 changes: 2 additions & 11 deletions test/wdio/cases/dev/jit-aurelia-cli-ts/src/app.ts
@@ -1,16 +1,7 @@

import { customElement } from '@aurelia/runtime';
import * as view from 'text!./app.html';
import * as template from 'text!./app.html';

@customElement({
name: 'app',
template: <any>view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
15 changes: 2 additions & 13 deletions test/wdio/cases/dev/jit-browserify-ts/src/app.ts
@@ -1,18 +1,7 @@

import { customElement } from '@aurelia/runtime';
import * as view from './app.html';
import * as template from './app.html';

@customElement({
name: 'app',
template: <any>view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {

message = 'Hello World!';
}

14 changes: 3 additions & 11 deletions test/wdio/cases/dev/jit-fuse-box-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
}
7 changes: 1 addition & 6 deletions test/wdio/cases/dev/jit-iife-inline/index.html
Expand Up @@ -19,12 +19,7 @@
constructor() { this.message = 'Hello World!'; }
}
var host = document.querySelector('app');
au.runtime.customElement({
name: 'app',
template: host.innerHTML,
build: { required: true, compiler: 'default' },
instructions: []
})(App)
au.runtime.customElement({ name: 'app', template: host.innerHTML })(App)
new au.runtime.Aurelia()
.register(au.jit.BasicConfiguration)
.app({ host, component: new App() })
Expand Down
12 changes: 2 additions & 10 deletions test/wdio/cases/dev/jit-parcel-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
12 changes: 2 additions & 10 deletions test/wdio/cases/dev/jit-webpack-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
13 changes: 2 additions & 11 deletions test/wdio/cases/latest/jit-aurelia-cli-ts/src/app.ts
@@ -1,16 +1,7 @@

import { customElement } from '@aurelia/runtime';
import * as view from 'text!./app.html';
import * as template from 'text!./app.html';

@customElement({
name: 'app',
template: <any>view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
15 changes: 2 additions & 13 deletions test/wdio/cases/latest/jit-browserify-ts/src/app.ts
@@ -1,18 +1,7 @@

import { customElement } from '@aurelia/runtime';
import * as view from './app.html';
import * as template from './app.html';

@customElement({
name: 'app',
template: <any>view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {

message = 'Hello World!';
}

14 changes: 3 additions & 11 deletions test/wdio/cases/latest/jit-fuse-box-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
}
7 changes: 1 addition & 6 deletions test/wdio/cases/latest/jit-iife-inline/index.html
Expand Up @@ -19,12 +19,7 @@
constructor() { this.message = 'Hello World!'; }
}
var host = document.querySelector('app');
au.runtime.customElement({
name: 'app',
template: host.innerHTML,
build: { required: true, compiler: 'default' },
instructions: []
})(App)
au.runtime.customElement({ name: 'app', template: host.innerHTML })(App)
new au.runtime.Aurelia()
.register(au.jit.BasicConfiguration)
.app({ host, component: new App() })
Expand Down
12 changes: 2 additions & 10 deletions test/wdio/cases/latest/jit-parcel-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
12 changes: 2 additions & 10 deletions test/wdio/cases/latest/jit-webpack-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
13 changes: 2 additions & 11 deletions test/wdio/cases/local/jit-aurelia-cli-ts/src/app.ts
@@ -1,16 +1,7 @@

import { customElement } from '@aurelia/runtime';
import * as view from 'text!./app.html';
import * as template from 'text!./app.html';

@customElement({
name: 'app',
template: <any>view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
15 changes: 2 additions & 13 deletions test/wdio/cases/local/jit-browserify-ts/src/app.ts
@@ -1,18 +1,7 @@

import { customElement } from '@aurelia/runtime';
import * as view from './app.html';
import * as template from './app.html';

@customElement({
name: 'app',
template: <any>view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {

message = 'Hello World!';
}

14 changes: 3 additions & 11 deletions test/wdio/cases/local/jit-fuse-box-ts/src/app.ts
@@ -1,15 +1,7 @@
import { customElement } from '@aurelia/runtime';
import view from './app.html';
import template from './app.html';

@customElement({
name: 'app',
template: view,
build: {
required: true,
compiler: 'default'
},
instructions: []
})
@customElement({ name: 'app', template })
export class App {
message = 'Hello World!';
}
}

0 comments on commit e67b79b

Please sign in to comment.