├── .gitattributes ├── .npmrc ├── .babelrc ├── .instanbul.yml ├── img └── originator.png ├── src └── index.js ├── .gitignore ├── .zuul.yml ├── .editorconfig ├── .eslintrc ├── test └── index.test.js ├── LICENSE ├── .travis.yml ├── package.json └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org/ 2 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "stage": 0, 3 | "loose": "all" 4 | } 5 | -------------------------------------------------------------------------------- /.instanbul.yml: -------------------------------------------------------------------------------- 1 | instrumentation: 2 | preserve-comments: true -------------------------------------------------------------------------------- /img/originator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zanuka/originator/HEAD/img/originator.png -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | export class Originator { 2 | 3 | constructor() { 4 | 5 | } 6 | 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | npm-debug.log 3 | node_modules 4 | logs 5 | *.log 6 | coverage 7 | dist 8 | lib 9 | build 10 | -------------------------------------------------------------------------------- /.zuul.yml: -------------------------------------------------------------------------------- 1 | ui: tape 2 | browsers: 3 | - name: chrome 4 | version: latest 5 | - name: firefox 6 | version: latest 7 | - name: safari 8 | version: latest 9 | browserify: 10 | - transform: 11 | name: babelify 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_size = 2 8 | indent_style = space 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | end_of_line = lf 12 | charset = utf-8 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "xo/esnext", 3 | "rules": { 4 | "consistent-return": 0, 5 | "indent": [2, 2], 6 | "no-new": 0, 7 | "no-trailing-spaces": 0, 8 | "prefer-reflect": 0, 9 | "semi": [1, "never"], 10 | "space-before-function-paren": [2, "never"] 11 | }, 12 | "parser": "babel-eslint", 13 | "env": { 14 | "node": true, 15 | "es6": true 16 | }, 17 | "emcaFeatures": { 18 | "modules": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/index.test.js: -------------------------------------------------------------------------------- 1 | import {Originator} from '../src/index' 2 | import test from 'blue-tape' 3 | 4 | test('exports a class', t => { 5 | t.equal(typeof Originator, 'function') 6 | t.end() 7 | }) 8 | 9 | test('throws if instantiated improperly', t => { 10 | t.throws(() => { 11 | Originator() 12 | }) 13 | t.end() 14 | }) 15 | 16 | test('does not throw if instantiated properly', t => { 17 | t.doesNotThrow(() => { 18 | new Originator() 19 | }) 20 | t.end() 21 | }) 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Juno Framework 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - '0.12' 5 | script: npm run ci 6 | addons: 7 | sauce_connect: true 8 | env: 9 | global: 10 | - secure: Gz9mRK6561S519H8/8EcN3n+ATy9sEd/+TvVr7qnSiYC9ucshHtYuqdId1TTz/iG6W/WtmlZCUCHMfoEz04osODWddpq1GjtJc6M6jhFC7OPcCxmRo9RsRayZwHLbRj0ujeFrEZUfmKqVVs3jIiVjHFoaGW5eHogI0fj5R7TCAO8PIzve5bEPEfzrKXfUyjHBhVR8CUjILGH8aR/abdJ2m2FqieGig+iJZQ+k5Oxdif8Mbyn3PaPDC8rUpjeWR2pUv7IBaLP6aYiqyhlPg0FwmSb7HgoZa/JRx7AOb3A59azm6xHX8J+y8x1LNlJa1CYTgFQw+uKE7z8e9NpZdxRBYwEsNU8/b/HvDxNIxwjtt2T/rtrq3aUVAz0P9bpwFmJDhdPvwHoMFU9eztRANP6sVWdlY/PlKVNeLFA/InlyigWbmS6X/SJTY9E6889oR4aR1CS1vFnAxcJNxKOCbrLzjD7gjpLcAB9ajdj+cKKN8OEMoKts2U4RIBiBQC6OCyYTjmyOjCWAd7tnYDI/FO5pWMOkub80YHbmKoSVQ6fBI9FudACWEYNELYCKV0lc+h1JjMoEsoExPM6+tFDmP+LmI/vHLOlbPUXl6x2VGJxWAK8gojJsujW/4uyN80DTBl5wOvdXcuWHmcU7c3ZO3mxGaNTLisRDqvcsmKmgkAOfRo= 11 | - secure: EYwVOkXNU+Es/5eRhGZx5Mam4OWITxQrFRKCsGZM7eShkhQh/VSrV5bg8VQEo5LQ+yfHR7hxavWV3nMf3DHZGlJPqPFC8a6IJUiPpkt5iiIy4aAOZ1dxZzCCtTJKxu1AHSyPKsMWBwqND8x9Y8LiE099AgLy14MIJ1v1hIp+sZJO6G71jQBmCjYCudnvTaiCEXdGT3FdK9djKoglg/5+qKgZtuLs+/vMIN7B8XnIm4Q+AMCl+SBjl4i0VDx7tKjGIg0oIyBCPWo8YY+5cLFx9/Q3vuiISxLnwd6qADHUpqedUHi9PDVGCQNPzoh2Qsy6ZAeM/duDM3kaHjlSFuzGqzcMo6r4zbizfr/9Mhh/vxgRE/AiyBlnAomdxhk7yYN2Sav9ts+C+g4CZRIeoZ5VsYEdDBIBXKZvtDMhuN2akqWB1nWzvzsGuG5XZwtpd2Scpg+Q3cDFa9kMD3j9EhVsbpdJiYH65B1dYVlTTyXheqRWkHrZWvynUKrgEytGJhmEMFadWp42+YNQ90qFFO0gDmy5MSX5eV0zXvK+tz1MEkgKwsX8OOQhmPxxvLuznnEU7P/7zSLto/t07aC22kVrVikDOoy36aaZtGqF1UosQlIZTDngOl9TjMO20YlQdWOj7HbzzhuKMG8FUzQ6k+0FKQS8iBPlNwK2z+Ujxvw1rxk= 12 | after_success: npm run coveralls -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "originator", 3 | "version": "0.1.1", 4 | "description": "node module originator with test & ci pipeline", 5 | "license": "MIT", 6 | "main": "src/index.js", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+ssh://git@github.com/zanuka/originator.git" 10 | }, 11 | "author": { 12 | "name": "zanuka", 13 | "url": "https://github.com/zanuka" 14 | }, 15 | "scripts": { 16 | "watch": "node_modules/.bin/babel src -d lib --experimental -w", 17 | "clean": "rimraf lib build coverage", 18 | "lint": "eslint src", 19 | "ci": "babel-node test/*.test.js && zuul -- test/*.test.js", 20 | "compile": "babel --stage 0 -d lib/ src/", 21 | "build": "npm run clean && babel --optional runtime -d build src", 22 | "test": "babel-node node_modules/.bin/blue-tape test/*.test.js | tspec", 23 | "cover": "npm run compile && babel-node node_modules/.bin/babel-istanbul cover node_modules/.bin/blue-tape ./lib/*.js --report text-summary", 24 | "report": "npm run compile && babel-node node_modules/.bin/babel-istanbul cover node_modules/.bin/blue-tape ./lib/*.js --report html && open ./coverage/index.html", 25 | "coveralls": "npm run compile && babel-node node_modules/.bin/babel-istanbul cover node_modules/.bin/blue-tape ./lib/*.js --report lcovonly && cat ./coverage/lcov.info | coveralls", 26 | "postcoveralls": "rimraf coverage", 27 | "postpublish": "git push origin master --follow-tags", 28 | "deploy": "git pull --rebase origin master && git push origin master", 29 | "zuul": "babel-node test/*.test.js && zuul --local 9966 -- test/*.test.js" 30 | }, 31 | "bugs": { 32 | "url": "https://github.com/zanuka/originator/issues" 33 | }, 34 | "keywords": [ 35 | "es6", 36 | "node", 37 | "module", 38 | "starter" 39 | ], 40 | "homepage": "https://github.com/zanuka/originator#readme", 41 | "devDependencies": { 42 | "babel": "5.8.23", 43 | "babel-core": "5.8.33", 44 | "babel-eslint": "4.1.3", 45 | "babel-istanbul": "^0.12.2", 46 | "babelify": "6.3.0", 47 | "blue-tape": "0.1.10", 48 | "coveralls": "2.11.4", 49 | "eslint": "^6.1.0", 50 | "eslint-config-xo": "0.7.1", 51 | "eslint-plugin-babel": "2.1.1", 52 | "rimraf": "2.4.3", 53 | "tap-spec": "4.1.0", 54 | "zuul": "^3.12.0" 55 | }, 56 | "dependencies": { 57 | "babel-runtime": "^6.0.14" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # originator 2 | [![Known Vulnerabilities](https://snyk.io/test/github/mdelucchi/originator/badge.svg?targetFile=package.json)](https://snyk.io/test/github/mdelucchi/originator?targetFile=package.json) 3 | 4 | ![](./img/originator.png) 5 | 6 | ## [deprecated] 7 | at this point this thing is ancient history, not recommended for modern use ;-) 8 | 9 | ## intent 10 | This is currently intended to be cloned as a starter template for a new node module. It was created to serve as a utility/backup for my module template experiments and is a bit outdated now. 11 | 12 | ## usage 13 | `git clone https://github.com/mdelucchi/originator.git your-module-name` 14 | 15 | ## npm scripts 16 | 17 | `watch` - starts file watcher 18 | 19 | `lint` - runs eslint on `/src` 20 | 21 | `test` - runs tests and formats piped TAP output with [tap-spec](https://github.com/scottcorgan/tap-spec). 22 | 23 | `ci` - Travis CI integration + zuul multi-framework & browser tests 24 | 25 | `cover` - generates code coverage text-summary report in terminal 26 | 27 | `report` - generates code coverage html report and opens it in browser 28 | 29 | `coveralls` - runs code coverage and sends report to coveralls 30 | 31 | `zuul` - runs browser tests via zuul at `http://localhost:9966/__zuul` 32 | 33 | ## devDependencies: 34 | 35 | - [**babel**](https://github.com/babel/babel) - compiler for writing next generation JavaScript 36 | 37 | - [**babel-eslint**](https://github.com/babel/babel-eslint) - ESLint using Babel as the parser 38 | 39 | - [**babel-istanbul**](https://github.com/ambitioninc/babel-istanbul) - excellent coverage tool 40 | 41 | - [**babelify**](https://github.com/babel/babelify) - Browserify transform for Babel. Used in multi-framework testing with zuul. 42 | 43 | - [**blue-tape**](https://github.com/spion/blue-tape) - substack's tape test runner with promise support 44 | 45 | - [**coveralls**](https://github.com/nickmerwin/node-coveralls) - test coverage and history statistics support for node.js 46 | 47 | - [**eslint**](https://github.com/eslint/eslint) - A fully pluggable tool for identifying and reporting on patterns in JavaScript. 48 | 49 | - [**eslint-config-xo**](https://github.com/sindresorhus/eslint-config-xo) - ESLint shareable config for XO 50 | 51 | - [**eslint-plugin-babel**](https://github.com/babel/eslint-plugin-babel) - an eslint rule plugin companion to babel-eslint 52 | 53 | - [**nsp**](https://github.com/nodesecurity/nsp) - check for vulnerabilities 54 | 55 | - [**rimraf**](https://github.com/isaacs/rimraf) - remove stuff 56 | 57 | - [**tap-spec**](https://github.com/scottcorgan/tap-spec) - formatted TAP output 58 | 59 | - [**zuul**](https://github.com/defunctzombie/zuul) - multi-framework javascript browser testing 60 | 61 | 62 | ## Travis CI / Sauce Connect Configuration 63 | 64 | [**Sauce Connect**](https://docs.saucelabs.com/reference/sauce-connect/) - Used to create tunnel allowing [Travis CI](https://travis-ci.org/) to utilize [Sauce Labs](https://saucelabs.com), a browser and mobile testing platform. 65 | 66 | If you plan to use Sauce Connect in your new module, be sure to [sign up](https://saucelabs.com/signup) with Sauce Labs if you haven’t already (it’s free for Open Source projects), and get your access key from your account page. 67 | 68 | Then you'll want to replace the secured access key in `.travis.yml` with your own. See the [Getting Started](https://docs.saucelabs.com/ci-integrations/travis-ci/) guide on Travis for more info on setting this up. 69 | 70 | Best bet if you're a new Travis and/or Sauce Labs user is to follow their steps to create a new `.travis.yml` file. 71 | 72 | ## Publishing 73 | When you are ready to publish a new version of your module, the following steps can be used: 74 | 1. add and commit your changes via git 75 | 2. `npm version patch -m "Ugrade message..."` 76 | 3. `npm publish` 77 | 78 | If publish is a success, the `postpublish` npm script will run `git push origin master --follow-tags`, pushing up and tagging your code properly. 79 | 80 | If you run `npm version patch` before committing your changes, you'll get a message like `npm ERR! Git working directory not clean.`. Commit and retry. 81 | 82 | 83 | 84 | --------------------------------------------------------------------------------