jHipster - 安装

作者: CC_简书 | 来源:发表于2016-12-20 15:16 被阅读404次

    依赖环境

    • Java 8 SDK
    • nodeJs
    • Git 版本控制

    jdk

    jHipster 需要使用jdk 8 版本
    JDK下载地址

    nodeJs

    nodejs.org 官方网站
    v4.4.4 (WINDOWS) 下载
    v6.2.0 (WINDOWS) 下载

    下载上述任意安装包,根据提示逐步安装。
    安装好之后我们就可以使用nodejs安装其他的依赖包了。
    由于nodejs默认文件源在国外,直接使用npm安装依赖包的速度会很慢。
    此处建议使用淘宝的源替换。
    打开命令行

    npm config set registry https://registry.npm.taobao.org
    

    这时候nodejs就安装成功了

    安装GIT

    windows版本下载地址 https://git-for-windows.github.io/

    # ubuntu系统安装方式
    apt-get install git
    # centos系统安装方式
    yum install git
    

    安装jHipster

    安装 yo[1] / bower[2] / gulp[3]

    npm install -g yo bower gulp-cli
    

    安装jhipster

    npm install -g generator-jhipster
    

    以下是执行npm安装过程中出现的提示,大同小异

    /usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js
    > yo@1.8.4 postinstall /usr/local/lib/node_modules/yo
    > yodoctor
    Yeoman Doctor
    Running sanity checks on your system
    ✔ Global configuration file is valid
    ✔ NODE_PATH matches the npm root
    ✔ Node.js version
    ✔ No .bowerrc file in home directory
    ✔ No .yo-rc.json file in home directory
    ✔ npm version
    Everything looks all right!
    /usr/local/lib
    └── yo@1.8.4
    
    /usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower
    /usr/local/lib
    └── bower@1.7.9
    
    npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
    npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
    npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
    /usr/local/bin/gulp -> /usr/local/lib/node_modules/gulp/bin/gulp.js
    /usr/local/lib
    └─┬ gulp@3.9.1
      └─┬ gulp-util@3.0.7
        └─┬ dateformat@1.0.12
          └─┬ meow@3.7.0
            └─┬ loud-rejection@1.4.1
              └── currently-unhandled@0.4.1
    
    npm WARN deprecated cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead!
    npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
    /usr/local/lib
    └── generator-jhipster@3.4.0
    

    以上就是整个jHipster安装过程所需要涉及到的操作(省略了一些常用软件jdk,nodejs的安装步骤,相信大家很容易在百度上搜索到)


    1. Yo是一个 Web应用的架构(scaffolding)工具。它提供了非常多的模板,用来生成不同类型的 Web 应用。

    2. Bower 是一个前端库管理工具,可以很好的解决在 Web 应用中引用第三方库时可能遇到的问题。

    3. gulp是基于Nodejs的自动任务运行器, 她能自动化地完成 javascript/coffee/sass/less/html/image/css 等文件的的测试、检查、合并、压缩、格式化、浏览器自动刷新、部署文件生成,并监听文件在改动后重复指定的这些步骤

    相关文章

      网友评论

        本文标题:jHipster - 安装

        本文链接:https://www.haomeiwen.com/subject/vftfvttx.html