generate-travis
Advanced tools
+39
| 'use strict'; | ||
| var path = require('path'); | ||
| var isValid = require('is-valid-app'); | ||
| module.exports = function(app) { | ||
| // returns false if `app` is not an instance of Generate, or `generate-travis` is already registered | ||
| if (!isValid(app, 'generate-travis')) return; | ||
| /** | ||
| * Generates a `.travis.yml` file in the current working directory. | ||
| * | ||
| * ```sh | ||
| * $ gen travis:travis-yml | ||
| * ``` | ||
| * @name travis:travis-yml | ||
| * @api public | ||
| */ | ||
| app.task('travis-yml', { silent: true }, function(cb) { | ||
| return app.src('travis.yml', {cwd: path.resolve(__dirname, 'templates')}) | ||
| .pipe(app.dest(function(file) { | ||
| file.basename = '.travis.yml'; | ||
| return app.options.dest || app.cwd; | ||
| })); | ||
| }); | ||
| /** | ||
| * Alias to enable running the [travis-yml](#travis-yml) task with the following command: | ||
| * | ||
| * ```sh | ||
| * $ gen travis | ||
| * ``` | ||
| * @name travis:default | ||
| * @api public | ||
| */ | ||
| app.task('default', { silent: true }, ['travis-yml']); | ||
| }; |
| 'use strict'; | ||
| exports.json = { | ||
| sudo: false, | ||
| language: 'node_js', | ||
| node_js: [ '5', '4', '0.12', '0.10' ], | ||
| matrix: { | ||
| fast_finish: true, | ||
| allow_failures: [ | ||
| {node_js: '4'}, | ||
| {node_js: '0.10'}, | ||
| {node_js: '0.12'} | ||
| ] | ||
| } | ||
| }; | ||
| exports.yaml = [ | ||
| 'sudo: false', | ||
| 'language: node_js', | ||
| 'node_js:', | ||
| ' - "5"', | ||
| ' - "4"', | ||
| ' - "0.12"', | ||
| ' - "0.10"', | ||
| 'matrix:', | ||
| ' fast_finish: true', | ||
| ' allow_failures:', | ||
| ' - node_js: "4"', | ||
| ' - node_js: "0.10"', | ||
| ' - node_js: "0.12"', | ||
| '' | ||
| ].join('\n'); |
| sudo: false | ||
| language: node_js | ||
| node_js: | ||
| - "5" | ||
| - "4" | ||
| - "0.12" | ||
| - "0.10" | ||
| matrix: | ||
| fast_finish: true | ||
| allow_failures: | ||
| - node_js: "4" | ||
| - node_js: "0.10" | ||
| - node_js: "0.12" |
+28
-7
| { | ||
| "name": "generate-travis", | ||
| "description": "Generate a .travis.yml file to the cwd or specified directory. Install globally and run with generate's CLI, or use as a component in your own generator.", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "homepage": "https://github.com/generate/generate-travis", | ||
@@ -13,3 +13,5 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
| "files": [ | ||
| "index.js" | ||
| "generator.js", | ||
| "index.js", | ||
| "templates" | ||
| ], | ||
@@ -33,5 +35,15 @@ "main": "index.js", | ||
| }, | ||
| "keywords": [], | ||
| "keywords": [ | ||
| "generate", | ||
| "generateplugin", | ||
| "generator", | ||
| "plugin", | ||
| "travis" | ||
| ], | ||
| "verb": { | ||
| "layout": "default", | ||
| "toc": false, | ||
| "layout": "generator", | ||
| "tasks": [ | ||
| "readme" | ||
| ], | ||
| "plugins": [ | ||
@@ -41,8 +53,17 @@ "gulp-format-md" | ||
| "related": { | ||
| "list": [] | ||
| "list": [ | ||
| "generate", | ||
| "generate-file", | ||
| "generate-git" | ||
| ] | ||
| }, | ||
| "reflinks": [ | ||
| "verb" | ||
| ] | ||
| "generate", | ||
| "verb", | ||
| "verb-readme-generator" | ||
| ], | ||
| "lint": { | ||
| "reflinks": true | ||
| } | ||
| } | ||
| } |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
4233
93.91%6
100%65
3150%0
-100%