Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fkei committed Dec 18, 2013
1 parent d914ca3 commit cd3b642
Show file tree
Hide file tree
Showing 79 changed files with 16,352 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,21 @@ results

npm-debug.log
node_modules
.DS_Store
.idea
test.hbsc.js
test.hbsp.js
require.beez.test.js
test.html
test.css
logo-10.png
logo-13.png
logo-20.png
logo-30.png
logo-600x600.png
sprite-logo.styl
sprite-logo@*
user.copy.json
.tern-port
test/hbs/local.develop.html
test/hbs/require.beez.local.develop.js
11 changes: 11 additions & 0 deletions .jsdoc3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"tags": {
"allowUnknownTags": true
},
"source": {
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"plugins": [],
"jsVersion": 180
}
2 changes: 2 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
test
76 changes: 76 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum errors before stopping.


// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.

"node" : true,
"rhino" : false,
"couch" : false,
"wsh" : true, // Windows Scripting Host.

"jquery" : true,
"prototypejs" : false,
"mootools" : false,
"dojo" : false,

"predef" : [ // Extra globals.
"describe", // Used by mocha
"it", // Used by mocha
"before", // Used by mocha
"beforeEach", // Used by mocha
"after", // Used by mocha
"afterEach" // Used by mocha
],


// Development.
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
"devel" : true, // Allow development statements e.g. `console.log();`.


// EcmaScript 5.
//"es5" : true, // Allow EcmaScript 5 syntax.
"strict" : false, // Require `use strict` pragma in every file.
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').


// The Good Parts.
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
"laxbreak" : true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.).
"boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"curly" : true, // Require {} for every new block or scope.
"eqeqeq" : true, // Require triple equals i.e. `===`.
"eqnull" : false, // Tolerate use of `== null`.
"evil" : true, // Tolerate use of `eval`.
"expr" : true, // Tolerate `ExpressionStatement` as Programs.
"forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
"immed" : false, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef" : true, // Prohibit variable use before definition.
"loopfunc" : true, // Allow functions to be defined within loops.
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"proto" : true, // Tolerate the __proto__ property.
"regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
"regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
"scripturl" : true, // Tolerate script-targeted URLs.
"smarttabs" : true, // This option suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only.
"shadow" : true, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
"supernew" : true, // Tolerate `new function () { ... };` and `new Object;`.
"undef" : true, // Require all non-global variables be declared before they are used.


// Persone styling prefrences.
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
"noempty" : false, // Prohibit use of empty blocks.
"nonew" : true, // Prohibit use of constructors for side-effects.
"nomen" : false, // Prohibit use of initial or trailing underbars in names.
"onevar" : false, // Allow only one `var` statement per function.
"plusplus" : false, // Prohibit use of `++` & `--`.
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"trailing" : true, // Prohibit trailing whitespaces.
"white" : false // Check against strict whitespace and indentation rules.
}
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
all: test jshint jsdoc

jshint:
./node_modules/jshint/bin/jshint --config .jshintrc ./lib

test:
./node_modules/.bin/mocha -r should test/test-*.js

jsdoc:
./node_modules/jsdoc/jsdoc -c .jsdoc3.json -d ./docs -p -r -l ./lib

clean:
rm -rf ./docs

.PHONY: all test jshint jsdoc clean
127 changes: 127 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,129 @@
beezlib
=======


# About

Node.js library for beez and beez-founation with beez-tools.


# Used Project

- [beez](https://github.com/CyberAgent/beez)
- [beez-foundation](https://github.com/CyberAgent/beez-foundation)
- [beez-tools](https://github.com/CyberAgent/beez-tools)

# Requirements

- [ImageMagick](http://www.imagemagick.org/script/index.php)
- [Underscore.js](http://underscorejs.org/)
- [mkdirp](https://github.com/substack/node-mkdirp)
- [suns.js](https://github.com/CyberAgent/suns.js)
- [handlebars](http://handlebarsjs.com/)
- [jsonminify](https://github.com/fkei/JSON.minify)
- [Stylus](http://learnboost.github.com/stylus/)
- [nib](https://github.com/visionmedia/nib)
- [colors](https://npmjs.org/package/colors)
- [jshint](https://npmjs.org/package/jshint)
- [beez-ua](https://github.com/CyberAgent/beez-ua)
- [node-spritesheet](https://github.com/shibucafe/node-spritesheet)
- [mocha](https://npmjs.org/package/mocha)
- [should](https://npmjs.org/package/should)
- [jsdoc3](https://github.com/jsdoc3/jsdoc)


# Features

- sprite
- 複数画像を一枚にする
- StylusファイルでCSSを出力可能
- stylus
- コンパイル
- b64 サポート
- web-font サポート
- nib 標準搭載
- image
- optipng
- imagemagick
- 画像サイズ取得
- ファイル名のpixelRatioから、それ以外のpixelRatio画像をリサイズ
- fsys
- ファイルのタイプを判定(file, directory, block device, charactor device, symlink, fifo, socket)
- rm -rf (sync) : フォルダ削除
- mkdir -p (async|sync) : フォルダ作成
- glob : フォルダ内を走査
- JSONファイルを読み込む
- JSファイル(JSON)を読み込む
- chmod ファイル権限変更
- cp : ファイルコピー
- ファイルパスの '~' をパスに変換
- fsys.store
- ディレクトリ内の、JSON, Function-JSON ファイルをまとめてロードし保持する。
- Auto-load
- simple logging
- ログレベル、端末のカラーリング、ログ出力行番号サポート
- obj
- cp -rf フォルダ内を再帰的にコピー
- template
- handlebars
- hbs to hbsc.js
- hbsp to hbsp.js
- require.beez.js.hbs to require.beez.hbsc.js
- hbs to hbsc to html

# Install

```sh
$ npm install beezlib
```

# Test

```sh
$ npm install .
$ make test
```

# jshint

```sh
$ npm install .
$ make jshint
```

# jsdoc

```sh
$ npm install .
$ make jsdoc
```


# Contributing


- Kei FUNAGAYAMA - [@fkei](https://twitter.com/fkei) [github](https://github.com/fkei)
- Kazuma MISHIMAGI - [@maginemu](https://twitter.com/maginemu) [github](https://github.com/maginemu)
- HIRAKI Satoru - [github](https://github.com/Layzie)
- Yuhei Aihara - [github](https://github.com/yuhei-a)

# Copyright

CyberAgent, Inc. All rights reserved.

# LICENSE

@see : [LICENSE](https://raw.github.com/CyberAgent/beezlib/master/LICENSE)

```
The MIT License (MIT)
Copyright © CyberAgent, Inc. All Rights Reserved.
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.
```
Loading

0 comments on commit cd3b642

Please sign in to comment.