Git Product home page Git Product logo

ng2-brunch's Introduction

Brunch with Angular

Join the chat at https://gitter.im/colinbate/ng2-brunch

This is an Angular ^2.4.5 application, built with Brunch. It uses TypeScript ^2.1.5

This version does not pin a specific version of Angular as it did in the past. All Angular 2 versions should be non-breaking.

Getting started

You will need Node.js installed. Recommend version 6.9.1 or later. Make sure you have at least version 4 and NPM 3.

If you plan to work with Brunch regularly, you may want to install it globally: npm install -g brunch

With Brunch installed globally you can simply run brunch new -s colinbate\ng2-brunch to initialize a folder with this project.

Otherwise clone this repository, remove the .git folder, and run npm install.

Run

  • npm start โ€” watches the project with continuous rebuild. This will also launch HTTP server with pushState.
  • npm run build:prod โ€” builds minified project for production

Learn

  • public/ dir is fully auto-generated and served by HTTP server.
  • Write your code in app/ dir.
  • Place static files in app/assets/. These will be copied directly.
  • Brunch site, Getting started guide

ng2-brunch's People

Contributors

colinbate avatar gitter-badger avatar kabir avatar lmu-pms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ng2-brunch's Issues

Vendor.js logical error???

Hi,

in brunch-config.js i saw:

'vendor.js': /^node_modules/,

WHY????

Brunch conc and compress all modules from "node_modules" into "vendor.js" including modules for brunch???

Better errors

I'm not sure if this is the place to put this, but How can I get better errors when compiling typescript? I get the following error:

18 Nov 13:59:54 - error: Compiling of app/models/preferences.model.ts failed.

I've got simple typescript errors, for example not using super() before everything else in a constructor. I want line numbers and the actual error from compiling. Does anyone know how to get this?

brunch watch -s mode doesn't like outside template files

I tried using your methodology of using require('./path_of_template.html'), but sometimes brunch doesn't like it, and sometimes angular doesn't like when i update the template file, then save. The autoreload becomes unhappy:

01 Nov 17:11:07 - info: compiling
01 Nov 17:11:11 - info: compiling.
01 Nov 17:11:15 - info: compiling..
01 Nov 17:11:19 - info: compiling...
01 Nov 17:11:23 - info: compiling
01 Nov 17:11:27 - info: compiling.
01 Nov 17:11:31 - info: compiling..
01 Nov 17:11:35 - info: still compiling...
01 Nov 17:11:39 - info: compiling
01 Nov 17:11:43 - info: compiling.
01 Nov 17:11:47 - info: compiling..
01 Nov 17:11:51 - info: compiling...
01 Nov 17:11:55 - info: compiling
01 Nov 17:11:59 - info: compiling.
01 Nov 17:12:03 - info: compiling..
01 Nov 17:12:07 - info: compiling...
01 Nov 17:12:11 - info: compiling
01 Nov 17:12:15 - info: compiling.
01 Nov 17:12:19 - info: compiling..
01 Nov 17:12:23 - info: compiling...
01 Nov 17:12:27 - info: compiling
01 Nov 17:12:31 - info: compiling.
01 Nov 17:12:35 - info: compiling..
01 Nov 17:12:39 - info: compiling...
01 Nov 17:12:43 - info: compiling
01 Nov 17:12:47 - info: compiling.

But it will go back to normal after killing and restarting the server.

Change default assets folder

Hi!

I'm new with Brunch but I want to know if it's possible to use and compile .scss and .jade/.pug files directly in the root (/app) instead to put all inside /app/assets, I mean, avoid to use assets to put all those files and keep the .jade and .scss files within the component folder without put inside /assets/

Kind regards!

WARN: index.ts compiled, but not written. Check your javascripts.joinTo config

I'm getting the above warning message whenever I try to build the skeleton with npm start. Looking around, it appears that it could be a regex problem, as detailed in this issue thread (starting with the comment by rodgomes)

Below is the full log:

22 Apr 12:58:43 - info: application started on http://localhost:3333/
22 Apr 12:58:45 - info: compiling
22 Apr 12:58:47 - warn: C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app\directives\router-active.ts compiled, but not written. Check your javascripts.joinTo config
22 Apr 12:58:47 - warn: C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app\about\index.ts compiled, but not written. Check your javascripts.joinTo config
22 Apr 12:58:47 - warn: C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app\home\index.ts compiled, but not written. Check your javascripts.joinTo config
22 Apr 12:58:47 - warn: C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app\app.ts compiled, but not written. Check your javascripts.joinTo config
22 Apr 12:58:47 - warn: C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app\vendor.ts compiled, but not written. Check your javascripts.joinTo config
22 Apr 12:58:48 - info: compiled 415 files into 2 files, copied index.html in 6.2 sec

ES6 spread syntax not getting compiled

Hi there,

Thank you very much for angular2 brunch seed project.

Just reporting a problem where, whenever I use es6 spread syntax, It fails to compile.

e.g.


private getMaxY(): number {
    let maxValuesOfAreas = [];
    this.config.forEach(data => maxValuesOfAreas.push(Math.max.apply(Math, data.dataset.map(d => d.y))));
    return Math.max(...maxValuesOfAreas);
  }


08 Nov 13:47:04 - error: Compiling of app/directives/area-chart/area-chart.component.ts failed.  

If I change

    return Math.max(...maxValuesOfAreas); 

to

 return Math.max.apply(this,maxValuesOfAreas)(); 

works fine.

would there be specific typescript config for this issue.

Thank you
Andy

Unresolved import in app.ts

I'm trying to install and utilize the skeleton. After I run npm start I keep running into this error:

    20 Apr 19:40:21 - info: application started on http://localhost:3333/
    20 Apr 19:40:24 - info: compiling
    20 Apr 19:40:28 - error: Resolving deps of app\app.ts failed. Could not load module 'app\home' from 'C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app'. Possible solution: add 'app' to package.json and `npm install`.
    20 Apr 19:40:28 - error: Resolving deps of app\about\index.ts failed. Could not load module 'app\about\about.tpl' from 'C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app\about'. Possible solution: add 'app' to package.json and `npm install`.
    20 Apr 19:40:28 - info: compiling.
    20 Apr 19:40:29 - info: compiled 477 files into 2 files, copied index.html in 8.4 sec

As far as I can tell, it looks like it's not importing files in app/home correctly? Apologies if this seems simple - I'm new to this.

I'm using node v4.4.1 and the lastest version of brunch (including the deppack fix in issue #3 ), if that helps.

Build failure

Hi Colin, I'm unable to run the example, it fails during compilation:

> [email protected] build /Users/joeri/work/github/colinbate/ng2-brunch
> brunch build

05 Apr 07:23:18 - info: compiling
05 Apr 07:23:19 - error: Resolving deps of app/app.ts failed. Could not load module 'home' from '/Users/joeri/work/github/colinbate/ng2-brunch/app'. Possible solution: add 'home' to package.json and `npm install`. 
05 Apr 07:23:20 - info: compiled 475 files into 2 files, copied index.html in 6.1 sec

This is on an OSX system with node version v5.9.1 and npm 3.7.3

Attached detailed build output obtained with DEBUG='brunch:*' npm run build and the output of npm shrinkwrap for more version numbers. If you need more info please let me know.

npm-shrinkwrap.json.txt
bruch-compile-failed.txt

Joeri

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.