Install:
npm install fuse-box --save-dev
import { fusebox } from 'fuse-box';
fusebox({
target: 'browser',
entry: 'src/index.tsx',
webIndex: {
template: 'src/index.html',
},
devServer: true,
}).runDev();
License: MIT License
Install:
npm install fuse-box --save-dev
import { fusebox } from 'fuse-box';
fusebox({
target: 'browser',
entry: 'src/index.tsx',
webIndex: {
template: 'src/index.html',
},
devServer: true,
}).runDev();
Current version is very slow on IE 11. It takes more than 6 seconds to load.
Chrome does it less than a second.
The difference is that IE 11 needs a Promise polyfill, but Chrome does not. In this example bluebirdjs is used as a polyfill.
There is a known problem in bluebirdjs when a lot of exceptions are thrown. Bluebird as a default tries to get long stack traces when an exception is thrown in a problem. This takes some time and if a lot of exceptions are thrown (which are catched by the way) then this takes a lot of performance.
subj when ready =)
Include bundles and have it in a own folder to we can activate GHpages?
@nchanged what do you think?
Would work like this then
https://vegarringdal.github.io/aurelia-fusebox-test/
Maybe we could put this is the readme ?
https://fuse-box.github.io/fuse-box-aurelia-seed
On the suggestion PR I added github star, incase someone opens the demo its really easy to go back and star it ๐
Or didnt like that one ?
You can see it here.. can upload images, think github is having server issues
https://vegarringdal.github.io/fuse-box-aurelia-seed/
We want to add this when its ready
We should add a license
Official skeleton is, how does that affect us?
https://github.com/aurelia/skeleton-navigation/blob/master/LICENSE
I've checked out your project, did a yarn install, and tried to run it. Unfortunately, the project had several issues:
fuse.js
materialize-bridge
(when I don't register the bridge, fuse-box runs just fine, but I get an error in the console (md-well.html
cannot be found):yarn start v0.24.6
$ node ./build/fuse dev
Launch "dev"
Resolve "copy-fonts"
Launch "copy-fonts"
โCopy to ../styles/materialize-css/fonts
โCopy to ../styles/materialize-css/fonts
Resolve "copy-css"
Launch "copy-css"
โCopy to ../styles/materialize-css/css
โCopy to ../styles/materialize-css/css
vendor ->
app ->
TypeError: Cannot read property 'entryFile' of undefined
at Function.onNode (C:\dev\temp\fuse-box-aurelia-seed-master\node_modules\fuse-box\dist\commonjs\analysis\plugins\OwnBundle.js:13:28)
at plugins.forEach.plugin (C:\dev\temp\fuse-box-aurelia-seed-master\node_modules\fuse-box\dist\commonjs\analysis\FileAnalysis.js:78:80)
I'm running node v8 (but I've also tried it on node v7) and fuse-box v2.1.0
getting SCRIPT5009: 'Promise' is undefined
So bluebird isnt loaded correct, bacause that would have acted like a polyfill for that
Will also need fetch pollyfill for IE11 whatwg-fetch
works
Info:
Got both to work here:
https://github.com/vegarringdal/aurelia-fusebox-test/blob/master/src/main.ts
Dunno if Im doing it the best way with bluebird though..
Anyone have the chance to take this:
And make it look like (todo list)
Im not using Aurelia atm/limited time.
Why not keep it as possible to original ?
Any special reasons?
fusebox-seed:
import {lazy} from 'aurelia-framework';
import {HttpClient} from 'aurelia-fetch-client';
// polyfill fetch client conditionally
const fetch = !self.fetch ? System.import('isomorphic-fetch') : Promise.resolve(self.fetch);
interface IUser {
avatar_url: string;
login: string;
html_url: string;
}
export class Users {
heading: string = 'Github Users';
users: Array<IUser> = [];
http: HttpClient;
constructor(@lazy(HttpClient) private getHttpClient: () => HttpClient) {}
async activate(): Promise<void> {
// ensure fetch is polyfilled before we create the http client
await fetch;
const http = this.http = this.getHttpClient();
http.configure(config => {
config
.useStandardConfiguration()
.withBaseUrl('https://api.github.com/');
});
const response = await http.fetch('users');
this.users = await response.json();
}
}
Original:
import {autoinject} from 'aurelia-framework';
import {HttpClient} from 'aurelia-fetch-client';
import 'fetch';
@autoinject
export class Users {
public heading = 'Github Users';
public users = [];
constructor(private http: HttpClient) {
http.configure(config => {
config
.useStandardConfiguration()
.withBaseUrl('https://api.github.com/');
});
}
public activate() {
return this.http.fetch('users')
.then(response => response.json())
.then(users => this.users = users as any);
}
}
Original works fine in ie11 too
https://vegarringdal.github.io/aurelia-fusebox-test/
On a clean checkout, running fuse dev seems to add all of the aurelia packages into the app.js bundle as well as the vendor.js. Adding !> [main.ts] doesn't change anything. Shouldn't just files from the src folder be in the app.js?
[~/fuse-box-aurelia-seed]$ node fuse.js dev
Launch "dev"
Resolve "copy-fonts"
โ Copy to ./styles/materialize-css/fonts
Resolve "copy-css"
โ Copy to ./styles/materialize-css/css
vendor ->
app ->
โโโ default (0 files, 53 Bytes)
โโโ aurelia-bootstrapper (1 files) 5.7 kB
โโโ aurelia-polyfills (1 files) 24.1 kB
โโโ aurelia-pal (1 files) 2.7 kB
โโโ process (1 files) 3 kB
โโโ object-assign-polyfill (1 files) 1 kB
โโโ fuse-box-aurelia-loader (2 files) 15.7 kB
โโโ aurelia-metadata (1 files) 7.3 kB
โโโ aurelia-loader (1 files) 4.7 kB
โโโ aurelia-path (1 files) 5.7 kB
โโโ aurelia-logging (1 files) 2.3 kB
โโโ aurelia-dependency-injection (1 files) 22.3 kB
โโโ aurelia-framework (1 files) 16.7 kB
โโโ aurelia-binding (1 files) 168.5 kB
โโโ aurelia-task-queue (1 files) 5.4 kB
โโโ aurelia-templating (1 files) 148.1 kB
โโโ aurelia-loader-default (1 files) 8.2 kB
โโโ aurelia-fetch-client (1 files) 7.8 kB
โโโ aurelia-pal-browser (1 files) 14.3 kB
โโโ aurelia-animator-css (1 files) 14 kB
โโโ aurelia-logging-console (1 files) 1.9 kB
โโโ aurelia-templating-binding (1 files) 25.1 kB
โโโ aurelia-templating-resources (32 files) 81.4 kB
โโโ aurelia-event-aggregator (1 files) 3.6 kB
โโโ aurelia-history-browser (1 files) 9.4 kB
โโโ aurelia-history (1 files) 1 kB
โโโ aurelia-templating-router (4 files) 15.6 kB
โโโ aurelia-router (1 files) 54.7 kB
โโโ aurelia-route-recognizer (1 files) 12.8 kB
โโโ aurelia-materialize-bridge (170 files) 552.4 kB
Size: 1.2 MB in 553ms
โ Typescript config: /tsconfig.json
โโโ default (15 files, 15 kB)
main.js
app.html
app.js
components/main-footer.html
components/nav-bar.html
components/nav-bar.js
routes/kendo-bridge.html
routes/kendo-bridge.js
routes/mat-bridge.html
routes/mat-bridge.js
routes/v-grid.html
routes/v-grid.js
routes/welcome.html
routes/welcome.js
โโโ fusebox-hot-reload (1 files) 1.8 kB
โโโ fusebox-websocket (1 files) 2.9 kB
โโโ events (1 files) 9.8 kB
โโโ fuse-box-aurelia-loader (2 files) 15.7 kB
โโโ aurelia-metadata (1 files) 7.3 kB
โโโ aurelia-pal (1 files) 2.7 kB
โโโ aurelia-loader (1 files) 4.7 kB
โโโ aurelia-path (1 files) 5.7 kB
โโโ aurelia-logging (1 files) 2.3 kB
โโโ aurelia-dependency-injection (1 files) 22.3 kB
โโโ aurelia-framework (1 files) 16.7 kB
โโโ aurelia-binding (1 files) 168.5 kB
โโโ aurelia-task-queue (1 files) 5.4 kB
โโโ aurelia-templating (1 files) 148.1 kB
โโโ aurelia-bootstrapper (1 files) 5.7 kB
โโโ aurelia-polyfills (1 files) 24.1 kB
โโโ process (1 files) 3 kB
โโโ object-assign-polyfill (1 files) 1 kB
โโโ aurelia-router (1 files) 54.7 kB
โโโ aurelia-route-recognizer (1 files) 12.8 kB
โโโ aurelia-history (1 files) 1 kB
โโโ aurelia-event-aggregator (1 files) 3.6 kB
Size: 534.8 kB in 1s 33ms
Waves (ripples) seem to be initialized twice so "waved" buttons stay dimmed after clicking. Annoying.
Any idea why there is no Aurelia debug log although it's activated?
I'll have a look at the waves and fonts (#21) tomorrow.
Would be great if it had sourcemaps :-)
Makes it simple for anyone to use as a start
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.