diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e4ef38f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ + +language: node_js + +node_js: + # TODO: Support a Node v4 version + # https://github.com/FormidableLabs/denim-react-app/issues/3 + #- "4" + - "5" + - "6" + +sudo: false + +branches: + only: + - master + +before_install: + # GUI for real browsers. + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + +script: + # Check module. + - node --version + - npm --version + # TODO: npm run test + + # Initialize a fresh project from templates + - npm install -g denim + - mkdir .test-project-tmp + - cd .test-project-tmp + - >- + denim $PWD/.. --prompts='{ + "name":"whiz-bang", + "description":"Whiz Bang", + "destination":"whiz-bang"}' + + # Run initialized project's own CI. + - cd whiz-bang + - npm install + - npm run lint + - npm run test diff --git a/denim.js b/denim.js index 2046e45..2c5c008 100644 --- a/denim.js +++ b/denim.js @@ -6,17 +6,17 @@ module.exports = { }, prompts: { - name: { - message: "What would you like your application to be named?", - validate: function (val) { - return !!val.trim() || "A name must be entered!"; - } - }, - description: { - message: "Please provide a description of your application:", - validate: function (val) { - return !!val.trim() || "A description must be entered!"; - } + name: { + message: "What would you like your application to be named?", + validate: function (val) { + return !!val.trim() || "A name must be entered!"; } + }, + description: { + message: "Please provide a description of your application:", + validate: function (val) { + return !!val.trim() || "A description must be entered!"; + } + } } -}; \ No newline at end of file +};