Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
59naga committed Apr 12, 2016
0 parents commit 2914b0e
Show file tree
Hide file tree
Showing 15 changed files with 806 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"plugins": [
"transform-object-assign"
],
"env": {
"development": {
"presets": [
"es2015",
"stage-1"
],
"plugins": [
"espower"
]
},
"production": {
"presets": [
"es2015-rollup",
"stage-1"
]
}
}
}
8 changes: 8 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
engines:
eslint:
enabled: false
ratings:
paths:
- src/**
- test/**
- "**.js"
22 changes: 22 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
extends: airbnb/base
parser: babel-eslint

env:
node: true
mocha: true

rules:
valid-jsdoc:
- 2
- prefer:
return: returns

max-len:
- 1
- 120
arrow-body-style: 1

complexity:
- 1
- max: 10
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Thumbs.db
.DS_Store

node_modules
bower_components

.nyc_output
coverage
docs
lib
npm-debug.log
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# keep the empty
# publish only the file that defined in the "files" of package.json
# (follow the same pattern rules as .gitignore if .npmignore not exists)
# https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package
44 changes: 44 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
notifications:
email: false

# Quick boot options
sudo: false
cache:
directories:
- node_modules

# Ignore version tags
branches:
except:
- /^v[0-9]/

env:
global:
# CODECLIMATE_REPO_TOKEN
- secure: InurJWi7HXZVZ2M6AESXIkNi7WivYvhNii2vopJaUwvEzbYFA8SK8NtukZKqriBNlKD2QYHlmHtXhgtqjZ+/FPJRQsGXVJo3MZw7l027NMFNl9UHj5/SxUPx++1oCt9hw+VmAyVnIUecB31i0oUkS0+3Us4lectiY+U9W04trqRUd7N11m/Kw2mRiVS54XQ5UJ4ISBPB/A8H8y9e4I9kyCYm0dLfqk5kQmHK1oIE9CiHw5w8gW2LR0pPnhumkGmer3JHXIOt5jcLoNoqBvrqDt3Hqcyt3sCPnsa5YkxV3ZpQw+buwq/numcGKVkTqyjTzemq77tzyeho4UCRweczn4uCekP0jVaK43CH1IZKFLUMYdiLV/dANhUk7LTrMwxNmqCL4K1QYhNII0kS2t88/sh/O1vgeZogJurQSYmDE5T7uFGW2481v/DjFT/+GIAZiRIvRfbIJBiE+uU6/cRfLw4US+p42tMXGEBq1cQ1Mc1IgyaPvkSIP2xfOP9Ou1hpa+1CRlWnmhhQLXlKCHAxuztoWQWWdAZenfXl+4K5s6FJHm+3su9gna9nmQviT7ZHZDQ30XOnTUuEYt6ezuhpM7nBmxXPzdveSyJgXLMZZL2ZJUaXRLKMSIHj/OmY5MrFeUuWW1AiXFSx1WETgBA1NNK+idy3xXw4WDQqNdRZRbM=

# Language options
language: node_js
before_install:
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
node_js:
- "0"
- 4
- 5
before_script:
- npm prune
script:
- npm run cover
- npm run lint

# Npm publish options
before_deploy:
- npm run build
deploy:
skip_cleanup: true # keep the devDependencies
provider: npm
email: [email protected]
api_key:
secure: FLZYQsy/QqVOz6nuJMstBoAl9QfSwIJoyBBNfEcUkJK2NEoSXxkXsk/bLaPAnJzWHbWLqoAERry+x79vtSx/rvTDgh/tNupnDs3+yDlkRwDOJj7o5pyS7SN0ccUaTs7XG7f5JwIZoqdjHIQH/6AzoDKxCfxth8Ku3lVia8Apt5Y+1Jg0nh46hfuI8OliaQcYsd55j+oG9GU6yv+2uXdvbE98lKzjZ2kH3U+/spn/ulyEJRMZg7VJeIFvFVyJ3LErwLcGM+guLA09ngOOGgIb5m5DSbD0dqUSsOWCeb0pqxNhpeSYhiJeZvFm/8oCvyJZLUAFzVmvvOC4fU8vJ121mdo7ZmceevVWPaYgkaqykeHIi8UulYa3Ok7uL4/g4UKtHdJUUkMUZJm58bEfEoqOLwLGnuckVeiX4ibE7zcmpXbkR8w+WdXZlhOXQYT9XQG7YA4YRQA+4OvTAPH3FgWjMePwUI2zGgDDhiLs355GO4CqKEBiXiPkoZYKOeaFghw46/wApTG7cxhaCV4x07EjxY3RYETvsdy8ZzubYRehbTQkxcA8nmKBprdk/uVRQTShS9Azf1ZY7VxZkWWnTPWbEQhZRS5QueD2jx8pm18rDoihTE+0UCcg60uiM3ks50IJN7QcAXJubApWo03yTi5GVjVd3ECVO7frLyA2ChoETAo=
on:
node: 4
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Itako
---

<p align="right">
<a href="https://npmjs.org/package/itako">
<img src="https://img.shields.io/npm/v/itako.svg?style=flat-square">
</a>
<a href="https://travis-ci.org/59naga/itako">
<img src="http://img.shields.io/travis/59naga/itako.svg?style=flat-square">
</a>
<a href="https://ci.appveyor.com/project/59naga/itako">
<img src="https://img.shields.io/appveyor/ci/59naga/itako.svg?style=flat-square">
</a>
<a href="https://codeclimate.com/github/59naga/itako/coverage">
<img src="https://img.shields.io/codeclimate/github/59naga/itako.svg?style=flat-square">
</a>
<a href="https://codeclimate.com/github/59naga/itako">
<img src="https://img.shields.io/codeclimate/coverage/github/59naga/itako.svg?style=flat-square">
</a>
<a href="https://gemnasium.com/59naga/itako">
<img src="https://img.shields.io/gemnasium/59naga/itako.svg?style=flat-square">
</a>
</p>

Installation
---
```bash
npm install itako --save
```

Stacktrace was broken
---
```bash
node
> require('itako')('error')
# TypeError: Cannot convert undefined or null to object
# at f (/Users/59naga/itako/lib/index.js:1:2469)
```
published code is compressed and the source map is provided.
not supported by the sourcemap in NodeJS. but this resolved in the [node-source-map-support](https://github.com/evanw/node-source-map-support#readme).

```bash
npm install source-map-support --save-dev
```
```js
import 'source-map-support/register';
```
or...
```bash
$ mocha --require source-map-support/register
```

Development
---
Requirement global
* NodeJS v5.10.0
* Npm v3.8.3

```bash
git clone https://github.com/59naga/itako
cd itako
npm install

npm test
```

License
---
[MIT](http://59naga.mit-license.org/)
20 changes: 20 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
build: off
deploy: off

# Ignore version tags
branches:
except:
- /^v[0-9]/

environment:
nodejs_version: "4"

install:
- ps: Install-Product node $env:nodejs_version
- npm install npm@3 --global
- npm install

test_script:
- node --version
- npm --version
- npm test
86 changes: 86 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"name": "itako",
"description": "a pluggable text reader",
"version": "0.0.0",
"main": "lib",
"files": [
"lib"
],
"scripts": {
"start": "ava --watch",
"test": "ava",
"lint": "eslint src test",
"cover": "abby cover:*",
"cover:test": "nyc --reporter=lcov --reporter=text ava",
"cover:report": "node -e \"if(process.env.TRAVIS){}else{process.exit(1)}\" && codeclimate-test-reporter < coverage/lcov.info || echo skip coverage report",
"build": "abby build:* --env",
"build:compile": "rollup -c",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
"postversion": "git push --follow-tags && conventional-github-releaser -p angular -r 0"
},
"abigail": {
"plugins": {
"watch": false,
"parse": "serial",
"launch": "force"
}
},
"ava": {
"files": [
"test/options.js",
"test/transform.js",
"test/read.js"
],
"require": [
"babel-register"
]
},
"devDependencies": {
"abigail": "^1.6.1",
"assert-exception": "^1.1.0",
"ava": "^0.14.0",
"babel-cli": "^6.6.5",
"babel-eslint": "^6.0.2",
"babel-plugin-espower": "^2.1.2",
"babel-plugin-transform-object-assign": "^6.5.0",
"babel-polyfill": "^6.7.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015-rollup": "^1.1.1",
"babel-preset-stage-1": "^6.5.0",
"babel-register": "^6.7.2",
"bluebird": "^3.3.4",
"chokidar": "^1.4.3",
"codeclimate-test-reporter": "^0.3.1",
"conventional-changelog-cli": "^1.1.1",
"conventional-github-releaser": "^1.1.1",
"eslint": "^2.6.0",
"eslint-config-airbnb": "^7.0.0",
"itako-token": "^0.0.0",
"lodash.flattendeep": "^4.2.0",
"lodash.get": "^4.2.1",
"lodash.set": "^4.1.0",
"nyc": "^6.1.1",
"pascal-case": "^1.1.2",
"rollup": "^0.25.8",
"rollup-plugin-babel": "^2.4.0",
"rollup-plugin-commonjs": "^2.2.1",
"rollup-plugin-json": "^2.0.0",
"rollup-plugin-node-resolve": "^1.4.0",
"rollup-plugin-uglify": "^0.3.1"
},
"repository": {
"type": "git",
"url": "https://github.com/59naga/itako.git"
},
"keywords": [
"itako",
"text",
"reader"
],
"author": "59naga <[email protected]> (http://berabou.me/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/59naga/itako/issues"
},
"homepage": "https://github.com/59naga/itako#readme"
}
25 changes: 25 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
import babel from 'rollup-plugin-babel';
import uglify from 'rollup-plugin-uglify';
import pascalCase from 'pascal-case';

export default {
entry: 'src/index.js',
dest: 'lib/index.js',
sourceMap: true,
format: 'umd',
moduleName: pascalCase(require('./package.json').name),
plugins: [
nodeResolve({
jsnext: true,
skip: [
],
}),
commonjs(),
json(),
babel(),
uglify(),
],
};
Loading

0 comments on commit 2914b0e

Please sign in to comment.