GithubHelp home page GithubHelp logo

greengerong / rebirth Goto Github PK

View Code? Open in Web Editor NEW
356.0 41.0 118.0 17.94 MB

GreenGerong(破狼) blog with Angular4.

Home Page: https://greengerong.github.io/rebirth

License: MIT License

JavaScript 3.77% HTML 21.77% TypeScript 40.77% CSS 33.69%
rebirth greengerong angular2 angular4

rebirth's Introduction

@rebirth/rebirth

Build Status dependcy dev dependcy

==================

破狼logo

GreenGerong(破狼) blog with Angular4. Online link https://greengerong.github.io/rebirth.

Links

How to build this project?

setup project

  • Install Nodejs( v6 or v7)
  • npm install -g @angular/cli@latest
  • npm install

run project

  • development: npm run jitnpm run aot
  • production: ng build --prod --aot
  • test: npm test
  • @angular/cli command

main dependency

  • @angular/cli: Angular cli tool.
  • sass
  • karma
  • tslint & codelyzer
  • typescript & @types
  • ...

My front end WeChat

破狼微信号

Web site preview

mobile


pc


Blog front

home page

question page

about me


Blog manage

login page

blog list

blog editor

editor full screen

rebirth's People

Contributors

ariesjia avatar ckile avatar greengerong avatar houko avatar program-monkey 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  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  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  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

rebirth's Issues

run project error

用run project指导中的npm run jit & npm run aot 运行项目错误。
单独使用npm run jit npm run aot可以成功。

创建component-cli的辅助工具

component大部分是一致的,可以尝试利用npm创建目录和文件结构(DRY):

1:命令行输入component文件名(以“-”风格)
2:生成文件包括:app下的component目录、[component name].component.ts、[component name].html、[component name].scss、 index.ts
3:文件内容:

index.ts:

export * from './[component name].component';

[component name].component.ts:

import { Component, Input, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
import {Article} from '../article-service';

@Component({
  selector: 'article-item',
  providers: [],
  directives: [],
  pipes: [],
  styles: [require('./article-item.scss')],
  template: require('./article-item.html')
})
export class [component name(驼峰命名)] {
    constructor() {

    }
}

[component name].html:

<div class="[component name](中划线分割)">
 [component name]
</div>

命令行文件组件生产,基于feature设计。

项目运行报错

你好,我将该项目下载下来后,按照github上的步骤进行运行,结果在开发环境上安装一直报错。由于github无法截取报错图片,因此我将报错信息copy过来,以下是报错信息:

styles.bundle.js:33Uncaught Error: Module build failed: Error: dlopen(/Users/LI/Desktop/rebirth/node_modules/node-sass/vendor/darwin-x64-48/binding.node, 1): no suitable image found. Did find:(…)696 @ styles.bundle.js:33__webpack_require__ @ bootstrap 61b1572…:52422 @ bootstrap.scss:4__webpack_require__ @ bootstrap 61b1572…:52794 @ addStyles.js:246__webpack_require__ @ bootstrap 61b1572…:52webpackJsonpCallback @ bootstrap 61b1572…:23(anonymous function) @ styles.bundle.js:1
index.js:61Uncaught Error: Module build failed: Error: dlopen(/Users/LI/Desktop/rebirth/node_modules/node-sass/vendor/darwin-x64-48/binding.node, 1): no suitable image found. Did find:(…)(anonymous function) @ index.js:61__webpack_require__ @ bootstrap 61b1572…:52(anonymous function) @ app.component.ts:9(anonymous function) @ app.component.ts:39__webpack_require__ @ bootstrap 61b1572…:52(anonymous function) @ app.component.ts:39__webpack_require__ @ bootstrap 61b1572…:52(anonymous function) @ rebirth-window.ts:50__webpack_require__ @ bootstrap 61b1572…:52(anonymous function) @ src async:22__webpack_require__ @ bootstrap 61b1572…:52(anonymous function) @ zone.js:1426__webpack_require__ @ bootstrap 61b1572…:52webpackJsonpCallback @ bootstrap 61b1572…:23(anonymous function) @ main.bundle.js:1
client?93b6:38[WDS] Errors while compiling.
client?93b6:80.//css-loader!.//postcss-loader!./~/sass-loader!./src/styles/bootstrap.scss
Module build failed: Error: dlopen(/Users/LI/Desktop/rebirth/node_modules/node-sass/vendor/darwin-x64-48/binding.node, 1): no suitable image found. Did find:
/Users/LI/Desktop/rebirth/node_modules/node-sass/vendor/darwin-x64-48/binding.node: truncated mach-o error: segment __TEXT extends to 1212416 which is past end of file 86576
at Error (native)
at Object.Module._extensions..node (module.js:583:18)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)

使用rebirth新版,如何查看效果

破狼,你好。
更新你的代码,npm install后,打开浏览器查看不到效果。
我执行步骤如下:

按照其中的提示,打开http://localhost:8000/, 浏览器找不到网页。还请在READ.md中说明下,如何实时查看修改后的效果。

Server start at: 'http://localhost:8000

$ npm run jit

> [email protected] jit E:\Project_Dev\Angularjs2\rebirth
> npm run run-parallel mock ng-jit


> [email protected] run-parallel E:\Project_Dev\Angularjs2\rebirth
> npm-run-all --parallel "mock" "ng-jit"


> [email protected] mock E:\Project_Dev\Angularjs2\rebirth
> node ./build/mock-server.js


> [email protected] ng-jit E:\Project_Dev\Angularjs2\rebirth
> ng serve

[19:47:36] Stubby HTTP server listening on port 8000
[19:47:36] Stubby HTTPS server listening on port 8443
[19:47:36] Admin server listening on port 8010
Server start at: 'http://localhost:8000                                                                         10708ms15ms ad02053ms 138ms asset63ms emittingHash: 605c9f17289906f66e22
Version: webpack 2.1.0-beta.25
Time: 13378ms
                                 Asset     Size  Chunks             Chunk Names
                            0.chunk.js  1.78 MB    0, 4  [emitted]
  f4769f9bdb7466be65088239c12046d1.eot  20.1 kB          [emitted]
  674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]
  912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]
  e18bbf611f2a2e43afc071aa2f4e1512.ttf  45.4 kB          [emitted]
 fa2772327f55d8198301fdb8bcfc8158.woff  23.4 kB          [emitted]
448c34a56d699c29117adc64c43affeb.woff2    18 kB          [emitted]
  b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]
af7ae505a9eed503f8b8e6982036873e.woff2  77.2 kB          [emitted]
 fee66e712a8a08eef5805a46892932ad.woff    98 kB          [emitted]
  89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]
                            1.chunk.js   114 kB    1, 4  [emitted]
                        main.bundle.js  3.33 MB    2, 4  [emitted]  main
                      styles.bundle.js   247 kB    3, 4  [emitted]  styles
                      inline.bundle.js  5.54 kB       4  [emitted]  inline
                          0.bundle.map  2.16 MB    0, 4  [emitted]
                          1.bundle.map   113 kB    1, 4  [emitted]
                       main.bundle.map  3.44 MB    2, 4  [emitted]  main
                     styles.bundle.map   329 kB    3, 4  [emitted]  styles
                     inline.bundle.map   5.6 kB       4  [emitted]  inline
                            index.html  2.94 kB          [emitted]
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  5.52 kB       0
webpack: bundle is now VALID.
[default] Checking started in a separate process...
[default] Ok, 1.759 sec.

README也要改改了吧

都升级了ng4 ,readme是不是也要改下了呢
angular-cli的安装 还有main dependency 中ng的版本。

ng2 怎么支持SEO搜索呢

使用google 抓取到的网站首页只是没渲染之前的index,里面一些title meta都还没有渲染上,则怎么处理呢

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.