Run grunt build command on Travis CI

前端 未结 4 1627
不思量自难忘°
不思量自难忘° 2021-01-30 20:29

I am using Travis CI to test and build my project and as part of it I want travis to run grunt build i have tried the following but have had no luck.

4条回答
  •  猫巷女王i
    2021-01-30 21:28

    My .travis.yml looks like this:

    It runs much faster than npm as NodeJSpackage manager, I'm using Yarnon this example. It installs yarn, grunt cli, rubyand sass.

    Hopefully it helps.

    
      language: node_js
    
      node_js:
        - "7.1.0"
    
      before_install:
        - npm install -g yarn
        - yarn add global ruby
        - gem install sass
    
      install:
        - yarn add global sass
        - yarn add global grunt-cli
        - yarn add yarn install
    
     before_script: grunt
    
    

提交回复
热议问题