Giter VIP home page Giter VIP logo

fuse-box-aurelia-seed's Introduction

LIMITED SUPPORT. USE AT YOUR OWN RISK

A bundler that does it right

Downloads Circle ci npm version monthly downloads from npm code style: prettier
Backers on Open Collective Sponsors on Open Collective Follow FuseBox on Twitter

FuseBox on slack

FUSEBOX v4 is out!

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();

fuse-box-aurelia-seed's People

Contributors

arjendeblok avatar nchanged avatar thanood avatar vegarringdal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

thanood

fuse-box-aurelia-seed's Issues

IE 11 Performance

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.

loading screen

Just tried it, if you dont load the styles.css in the index.html the "loading screen" wont work

image

This should be:
image

Doesn't run with latest version of fuse-box or materialize

I've checked out your project, did a yarn install, and tried to run it. Unfortunately, the project had several issues:

  • The typecheck plugin isn't working anymore, so I've removed it from fuse.js
  • The following problem is probably related to the 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

fonts

@Thanood We need to look at fonts, atm I just included them
New docs might have something on how to make this better
@nchanged can we include fonts in fuse.register that would have been useful to have a kinds of files here, if that is possible

users.ts

@arjendeblok

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/

App bundle contains vendor packages/files

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

some ideas for improvement

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.

Sourcemaps

Would be great if it had sourcemaps :-)

Makes it simple for anyone to use as a start

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.