GithubHelp home page GithubHelp logo

albatrosary / generator-angular2-eggs Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 5.0 51 KB

Angular2, Angular Component Router, Bootstrap v4(alpha), TingoDB(like MongoDB) and Express on Node.js.

Makefile 0.42% JavaScript 76.17% HTML 13.00% TypeScript 6.49% CSS 3.92%

generator-angular2-eggs's Introduction

NPM version Build Status Coverage Status Dependency Status devDependency Status peerDependency Status

Angular2, Component Router, Bootstrap v4-alpha and TingoDB(like MongoDB) App Generator

This generator are using Angular2, Angular Component Router, Bootstrap v4(alpha) and Express on Node.js. Instead of MongoDB, it will use the lighter TingoDB.

Angular we have emphasized the development life cycle. It supports the next thing for that.

  • Unit Test(unfinished)
  • End-to-End Test
  • Documentation(unfinished)
  • Coverage(unfinished)
  • Metric(unfinished)

Usage

Install: npm install -g generator-angular2-eggs

Make a new directory and cd into it:

mkdir [app-name] && cd $_
yo angular2-eggs

Development

Run the following command at the time of development:

npm run build

Although still some warning comes out, never mind :)

Generators

Available generators:

  • yo angular2-eggs:components [name] [name(option)]
  • yo angular2-eggs:attributes [name] [name(option)]
  • yo angular2-eggs:service [name]
  • yo angular2-eggs:server [name]

Case yo angular2-eggs:components appComp

make file

app/components/appcomp/appcomp.ts
app/components/appcomp/appcomp.html
test/components/appcomp/appcomp.spec.ts

component file

@Component({
  selector: 'app-comp',
  templateUrl: 'components/appcomp/appcomp.html'
})
export class AppCompComponent { }

Case yo angular2-eggs:components appComp subComp

make file

app/components/appcomp/appcomp.subcomp.ts
app/components/appcomp/appcomp.subcomp.html
test/components/appcomp/appcomp.subcomp.spec.ts

component file

@Component({
  selector: 'sub-comp',
  templateUrl: 'components/appcomp/appcomp.subcomp.html'
})
export class SubCompComponent { }

Case yo angular2-eggs:attribute appComp

make file

app/components/appcomp/appcomp.ts
app/components/appcomp/appcomp.html
test/components/appcomp/appcomp.spec.ts

component file

@Component({
  selector: '[appComp]',
  templateUrl: 'components/appcomp/appcomp.html'
})
export class AppCompComponent { }

Case yo angular2-eggs:attribute appComp subComp

make file

app/components/appcomp/appcomp.subcomp.ts
app/components/appcomp/appcomp.subcomp.html
test/components/appcomp/appcomp.subcomp.spec.ts

component file

@Component({
  selector: '[subComp]',
  templateUrl: 'components/appcomp/appcomp.subcomp.html'
})
export class SubCompComponent { }

License

MIT License

generator-angular2-eggs's People

Contributors

albatrosary avatar

Stargazers

Juan Manuel Alberro avatar  avatar masaki.kusuhata avatar Alin Capitanescu avatar cncgl avatar  avatar

Watchers

 avatar masaki.kusuhata avatar

generator-angular2-eggs's Issues

Error not found bootstrap.scss, but Why?

Running "concurrent:server" (concurrent) task
[1]
[1]     [HPM] Proxy created: /api  ->  http://localhost:8000/
[1]     Running "sass:server" (sass) task
[1]     >> File to import not found or unreadable: bootstrap/scss/bootstrap.scss
[1]     >> Parent style sheet: /Users/...blablabla.../angular2eggsYo/app/styles/main.scss
[1]     >>   Line 2  Column 1  app/styles/main.scss

AssertionError: app/service/gruntfiles/gruntfiles.js, no such file or directory

1 failing

  1. general creates expected files:
    AssertionError: app/service/gruntfiles/gruntfiles.js, no such file or directory
    • expected - actual
      -false
      +true
  at node_modules/yeoman-assert/index.js:46:12
  at Array.forEach (native)
  at Function.assert.file (node_modules/yeoman-assert/index.js:44:8)
  at Context.<anonymous> (test/general.js:21:12)

Sub Generator for Component

Component parts in type and there are four

  1. Defined as a custom tag (normal)
  2. Components for routing
  3. The child elements of the custom tag
  4. As an attribute

Because in this 1 and 2 to the same writing, I think that it is necessary to 3 pattern sub-generator

[Idea] Compiled ts files to a tmp folder

Hello,
First at all, thanks for this great generator.
I was using it for a couple of days and I saw that all the compiled files from the tsc are in the same folder with the .ts files.

Can you use the --outDir in the tsc and send all the compiled files to another place so they don't mix the .js and .ts and then serve from there?

Cheers!

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.