-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3155e5e
Showing
12 changed files
with
691 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.log* | ||
build | ||
node_modules | ||
coverage | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "8" | ||
- "stable" | ||
cache: | ||
directories: | ||
- "node_modules" | ||
env: | ||
global: | ||
- BUILD_TIMEOUT=10000 | ||
install: npm install | ||
script: npm run build | ||
after_success: npm run coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Greg Borota | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# syriac-cal | ||
|
||
[![npm version](https://badge.fury.io/js/syriac-cal.svg)](https://badge.fury.io/js/syriac-cal) | ||
[![npm module downloads](http://img.shields.io/npm/dt/syriac-cal.svg)](https://www.npmjs.org/package/syriac-cal) | ||
[![Build Status](https://travis-ci.org/peshitta/syriac-cal.svg?branch=master)](https://travis-ci.org/peshitta/syriac-cal) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/peshitta/syriac-cal/blob/master/LICENSE) | ||
[![Dependency Status](https://david-dm.org/peshitta/syriac-cal.svg)](https://david-dm.org/peshitta/syriac-cal) | ||
[![devDependencies Status](https://david-dm.org/peshitta/syriac-cal/dev-status.svg)](https://david-dm.org/peshitta/syriac-cal?type=dev) | ||
[![Coverage Status](https://coveralls.io/repos/github/peshitta/syriac-cal/badge.svg?branch=master)](https://coveralls.io/github/peshitta/syriac-cal?branch=master) | ||
|
||
Convert from Syriac Unicode to CAL code | ||
|
||
## Installation | ||
|
||
In order to use this library, [Node.js](https://nodejs.org) should be installed. | ||
Then run: | ||
``` | ||
npm install syriac-cal --save | ||
``` | ||
|
||
Following bundles are available: | ||
* `syriac-cal.js` - UMD ES5 version for use in browser, node, etc. | ||
* `syriac-cal.min.js` - minified version of `syriac-cal.js` | ||
* `syriac-cal.esm.js` - ES6 module version, suitable for bundling with other | ||
libraries and applications | ||
|
||
The package could also be downloaded directly from: | ||
[https://registry.npmjs.org/syriac-cal/-/syriac-cal-1.0.0.tgz](https://registry.npmjs.org/syriac-cal/-/syriac-cal-1.0.0.tgz) | ||
|
||
## More information | ||
|
||
[Peshitta App](https://peshitta.github.io) | ||
|
||
[Beth Mardutho](https://sedra.bethmardutho.org/about/fonts) | ||
|
||
[CAL](http://cal1.cn.huc.edu/searching/fullbrowser.html) | ||
|
||
## License | ||
|
||
[MIT](https://github.com/peshitta/syriac-cal/blob/master/LICENSE) | ||
|
||
## Contributing | ||
|
||
The final goal for this work is to learn the Word of God as recorded by | ||
[Peshitta](https://en.wikipedia.org/wiki/Peshitta). | ||
You are welcomed to improve this implementation or provide feedback. Please | ||
feel free to [Fork](https://help.github.com/articles/fork-a-repo/), create a | ||
[Pull Request](https://help.github.com/articles/about-pull-requests/) or | ||
submit [Issues](https://github.com/peshitta/syriac-cal/issues). | ||
Thank you! | ||
|
||
## Development | ||
|
||
``` | ||
npm install | ||
``` | ||
``` | ||
npm run build | ||
``` | ||
|
||
## API Reference | ||
|
||
* [syriac](#module_syriac) | ||
* [.mapper](#module_syriac.mapper) : <code>Mapper</code> | ||
* [.toCal](#module_syriac.toCal) ⇒ <code>string</code> | ||
|
||
<a name="module_syriac.mapper"></a> | ||
|
||
### syriac.mapper : <code>Mapper</code> | ||
Aramaic Mapper | ||
|
||
**Kind**: static constant of [<code>syriac</code>](#module_syriac) | ||
<a name="module_syriac.toCal"></a> | ||
|
||
### syriac.toCal ⇒ <code>string</code> | ||
Convert from Syriac Unicode to CAL | ||
|
||
**Kind**: static constant of [<code>syriac</code>](#module_syriac) | ||
**Returns**: <code>string</code> - the input word converted to CAL | ||
|
||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| word | <code>string</code> | input word in Syriac Unicode | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"modules": false | ||
} | ||
] | ||
], | ||
"plugins": ["external-helpers"], | ||
"ignore": ["node_modules/**"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# syriac-cal | ||
|
||
[![npm version](https://badge.fury.io/js/syriac-cal.svg)](https://badge.fury.io/js/syriac-cal) | ||
[![npm module downloads](http://img.shields.io/npm/dt/syriac-cal.svg)](https://www.npmjs.org/package/syriac-cal) | ||
[![Build Status](https://travis-ci.org/peshitta/syriac-cal.svg?branch=master)](https://travis-ci.org/peshitta/syriac-cal) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/peshitta/syriac-cal/blob/master/LICENSE) | ||
[![Dependency Status](https://david-dm.org/peshitta/syriac-cal.svg)](https://david-dm.org/peshitta/syriac-cal) | ||
[![devDependencies Status](https://david-dm.org/peshitta/syriac-cal/dev-status.svg)](https://david-dm.org/peshitta/syriac-cal?type=dev) | ||
[![Coverage Status](https://coveralls.io/repos/github/peshitta/syriac-cal/badge.svg?branch=master)](https://coveralls.io/github/peshitta/syriac-cal?branch=master) | ||
|
||
Convert from Syriac Unicode to CAL code | ||
|
||
## Installation | ||
|
||
In order to use this library, [Node.js](https://nodejs.org) should be installed. | ||
Then run: | ||
``` | ||
npm install syriac-cal --save | ||
``` | ||
|
||
Following bundles are available: | ||
* `syriac-cal.js` - UMD ES5 version for use in browser, node, etc. | ||
* `syriac-cal.min.js` - minified version of `syriac-cal.js` | ||
* `syriac-cal.esm.js` - ES6 module version, suitable for bundling with other | ||
libraries and applications | ||
|
||
The package could also be downloaded directly from: | ||
[https://registry.npmjs.org/syriac-cal/-/syriac-cal-1.0.0.tgz](https://registry.npmjs.org/syriac-cal/-/syriac-cal-1.0.0.tgz) | ||
|
||
## More information | ||
|
||
[Peshitta App](https://peshitta.github.io) | ||
|
||
[Beth Mardutho](https://sedra.bethmardutho.org/about/fonts) | ||
|
||
[CAL](http://cal1.cn.huc.edu/searching/fullbrowser.html) | ||
|
||
## License | ||
|
||
[MIT](https://github.com/peshitta/syriac-cal/blob/master/LICENSE) | ||
|
||
## Contributing | ||
|
||
The final goal for this work is to learn the Word of God as recorded by | ||
[Peshitta](https://en.wikipedia.org/wiki/Peshitta). | ||
You are welcomed to improve this implementation or provide feedback. Please | ||
feel free to [Fork](https://help.github.com/articles/fork-a-repo/), create a | ||
[Pull Request](https://help.github.com/articles/about-pull-requests/) or | ||
submit [Issues](https://github.com/peshitta/syriac-cal/issues). | ||
Thank you! | ||
|
||
## Development | ||
|
||
``` | ||
npm install | ||
``` | ||
``` | ||
npm run build | ||
``` | ||
|
||
## API Reference | ||
{{#module name="syriac"}} | ||
{{>body~}} | ||
{{>member-index~}} | ||
{{>separator~}} | ||
{{>members~}} | ||
{{/module}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"name": "syriac-cal", | ||
"version": "1.0.0", | ||
"description": "Convert from Syriac Unicode to CAL code", | ||
"main": "build/syriac-cal.js", | ||
"main݂Min": "build/syriac-cal.min.js", | ||
"module": "build/syriac-cal.esm.js", | ||
"scripts": { | ||
"pretest": "rollup -c", | ||
"test": "mocha --reporter test/istanbul.reporter.js --recursive", | ||
"prebuild": "npm run doc && npm test && npm run lint", | ||
"build": "npm run bundle", | ||
"bundle": "rollup -c --environment BUILD:production", | ||
"build:dev": "rollup -c --environment BUILD:dev", | ||
"lint": "eslint src test", | ||
"doc": "jsdoc2md -t doc/readme.hbs src/*.js > README.md", | ||
"coverage": "cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", | ||
"prepublish": "npm run build" | ||
}, | ||
"eslintConfig": { | ||
"extends": "airbnb-base", | ||
"rules": { | ||
"no-plusplus": 0, | ||
"comma-dangle": 0, | ||
"no-nested-ternary": 0, | ||
"function-paren-newline": 0, | ||
"import/extensions": 0, | ||
"arrow-parens": 0 | ||
} | ||
}, | ||
"files": [ | ||
"build/*.js" | ||
], | ||
"engines": { | ||
"node": ">=6.0.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/peshitta/syriac-cal.git" | ||
}, | ||
"keywords": [ | ||
"Peshitta", | ||
"Peshitto", | ||
"Pshitta", | ||
"Pshitto", | ||
"Sedra", | ||
"Sedra.js", | ||
"Sedrajs", | ||
"Aramaic", | ||
"Syriac", | ||
"CAL", | ||
"Estrangela", | ||
"Estrangelo" | ||
], | ||
"author": "Greg Borota", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/peshitta/syriac-cal/issues" | ||
}, | ||
"homepage": "https://github.com/peshitta/syriac-cal#readme", | ||
"dependencies": { | ||
"aramaic-mapper": "^1.0.5", | ||
"cal-code-util": "^1.0.5", | ||
"syriac-code-util": "^1.0.3" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^7.0.0-beta.1", | ||
"babel-plugin-external-helpers": "^7.0.0-beta.1", | ||
"babel-preset-env": "^2.0.0-beta.1", | ||
"babelrc-rollup": "^3.0.0", | ||
"coveralls": "^2.13.1", | ||
"eslint": "^4.7.2", | ||
"eslint-config-airbnb-base": "^12.0.0", | ||
"eslint-plugin-import": "^2.7.0", | ||
"istanbul": "^0.4.5", | ||
"jsdoc-to-markdown": "^3.0.0", | ||
"mocha": "^3.5.3", | ||
"rollup": "^0.50.0", | ||
"rollup-plugin-babel": "^3.0.2", | ||
"rollup-plugin-istanbul": "^1.1.0", | ||
"rollup-plugin-uglify": "^2.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import babel from 'rollup-plugin-babel'; | ||
import babelrc from 'babelrc-rollup'; | ||
import istanbul from 'rollup-plugin-istanbul'; | ||
import uglify from 'rollup-plugin-uglify'; | ||
import pkg from './package.json'; | ||
|
||
const isProduction = process.env.BUILD === 'production'; | ||
const isDev = process.env.BUILD === 'dev'; | ||
const banner = isProduction | ||
? '/**\n' + | ||
'* @file Convert from Syriac Unicode to CAL code\n' + | ||
'* @version 1.0.0\n' + | ||
'* @author Greg Borota\n' + | ||
'* @copyright (c) 2017 Greg Borota.\n' + | ||
'* @license MIT\n' + | ||
'*\n' + | ||
'* Permission is hereby granted, free of charge, to any person obtaining a copy\n' + | ||
'* of this software and associated documentation files (the "Software"), to deal\n' + | ||
'* in the Software without restriction, including without limitation the rights\n' + | ||
'* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n' + | ||
'* copies of the Software, and to permit persons to whom the Software is\n' + | ||
'* furnished to do so, subject to the following conditions:\n' + | ||
'*\n' + | ||
'* The above copyright notice and this permission notice shall be included in\n' + | ||
'* all copies or substantial portions of the Software.\n' + | ||
'*\n' + | ||
'* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n' + | ||
'* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n' + | ||
'* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n' + | ||
'* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n' + | ||
'* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM\n' + | ||
'* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n' + | ||
'* SOFTWARE.\n' + | ||
'*/\n\n' + | ||
'// https://peshitta.github.io\n' + | ||
'// https://sedra.bethmardutho.org/about/fonts\n' + | ||
'// http://cal1.cn.huc.edu/searching/fullbrowser.html\n' | ||
: ''; | ||
|
||
const external = Object.keys(pkg.dependencies); | ||
const input = 'src/main.js'; | ||
const name = 'syriacCal'; | ||
const format = 'umd'; | ||
const globals = { | ||
'cal-code-util': 'calCodeUtil', | ||
'syriac-code-util': 'syriacCodeUtil', | ||
'aramaic-mapper': 'aramaicMapper' | ||
}; | ||
const sourcemap = !isProduction; | ||
const plugins = [babel(babelrc({ path: 'babelrc.json' }))]; | ||
|
||
// browser-friendly UMD build | ||
const targets = [ | ||
{ | ||
input, | ||
output: [{ file: pkg.main, format }], | ||
external, | ||
plugins: plugins.slice(0), | ||
name, | ||
globals, | ||
banner, | ||
sourcemap | ||
} | ||
]; | ||
|
||
if (isProduction) { | ||
// ES module (for bundlers) build. | ||
targets.push({ | ||
input, | ||
output: [{ file: pkg.module, format: 'es' }], | ||
external, | ||
plugins: plugins.slice(0), | ||
banner | ||
}); | ||
|
||
plugins.push( | ||
uglify({ | ||
output: { | ||
comments: (node, comment) => { | ||
const { value, type } = comment; | ||
return type === 'comment2' && /@license/i.test(value); | ||
} | ||
} | ||
}) | ||
); | ||
|
||
// browser-friendly minified UMD build | ||
targets.push({ | ||
input, | ||
output: [{ file: pkg.main݂Min, format }], | ||
external, | ||
plugins, | ||
name, | ||
globals, | ||
banner | ||
}); | ||
} else if (!isDev) { | ||
targets[0].plugins.push( | ||
istanbul({ | ||
exclude: ['test/**/*', 'node_modules/**/*'] | ||
}) | ||
); | ||
} | ||
|
||
export default targets; |
Oops, something went wrong.