-
Notifications
You must be signed in to change notification settings - Fork 11
1.x QuickStart
fkei edited this page Dec 20, 2013
·
1 revision
beez-project コマンドを使用して雛形プロジェクトを作成します。
- プロジェクト名
- option:
-n example
- option:
- 作成先ディレクトリ
- option:
-o ~/
- option:
- デバッグモード
- option:
-d
- option:
- テンプレート名
- option:
-b [simple|github|todos]
- option:
$ beez-project -n example -o ~/Desktop -b todos
Create Project: example
Project Directory: ~/Desktop/example
Create File:
vendor
beez.js
beez.min.js
zepto.js
zepto.min.js
underscore.js
underscore-min.js
backbone.localStorage.js
backbone.localStorage-min.js
backbone.js
backbone-min.js
handlebars.runtime.js
handlebars.runtime.min.js
require.js
require.min.js
.jsdoc.json
.jshintignore
.jshintrc
Gruntfile.js
package.json
build.local.js
conf
local
local.json
mockdata
s
core
index
===============================
Let me get started right away!!
Foundation Server Start
===============================
$ cd ~/Desktop/example
$ npm install grunt-cli -g
$ npm install .
$ grunt foundation
---> Good luck to you :)
ローカル環境にWebサーバーを起動して、雛形プロジェクト(Todos Service) を起動させます。
beez-foundationがローカルにインストールされている必要があります。
$ cd ~/Desktop/example
$ npm install grunt-cli -g # すでにインストールしてある場合はSkip
$ npm install .
$ grunt foundation
>> [environment] project name: example
>> [environment] project directory: ~/Desktop/example
>> [options] env: local
Running "exec:beez_foundation" (exec) task
##
## Start
## Beez Foundation Servers!!
##
##
## Express server listening on port:1109
## Static Server start [ success ]
## compress: [on]
## Please try to access.
## http://0.0.0.0:1109
##
## Express server listening on port:1121
## Mock Server start [ success ]
## compress: [on]
## Please try to access.
## http://0.0.0.0:1121
##
ローカルサーバーにアクセス

port:1109 で listen されています
port:1121 で listen されています。
.
├── Gruntfile.js # Grunt file
├── build.local.js # `r.js`ビルド用の設定ファイル.環境別に作成してください
├── conf
│ ├── local
│ │ ├── develop.json # 開発用の設定ファイル
│ │ └── release.json # リリース用の設定ファイル
│ ├── local.json # `local` 環境用の設定ファイル
│ └── mockdata # モックデータディレクトリ
│ ├── index.json
│ └── now.json
├── node_modules
├── package.json # プロジェクトで利用しているnode.js設定ファイル
├── s # ソースディレクトリ
│ ├── core # コアモジュール (共通モジュール)
│ │ ├── i18n
│ │ │ ├── en.js
│ │ │ └── ja.js
│ │ └── index.js
│ ├── index # index モジュール (起点)
│ │ ├── hbs
│ │ │ └── info.hbs
│ │ ├── index.html.hbs # 唯一のHTML file (Handlebars)
│ │ ├── index.js # Index Controller
│ │ ├── model
│ │ │ └── index.js
│ │ ├── require.beez.js.hbs # require.config + data-main
│ │ ├── styl
│ │ │ ├── _sprite-logo-1.png
│ │ │ ├── _sprite-logo-2.jpg
│ │ │ ├── _sprite-logo-3.png
│ │ │ ├── index.styl
│ │ │ └── info.styl
│ │ └── view
│ │ ├── index.js
│ │ └── info.js
│ └── todos # todos サブモジュール
│ ├── collection
│ │ └── todos.js
│ ├── hbs
│ │ ├── footer.hbs
│ │ ├── header.hbs
│ │ ├── main.hbs
│ │ └── todo.hbs
│ ├── i18n
│ │ ├── en.js
│ │ └── ja.js
│ ├── index.js
│ ├── model
│ │ └── todo.js
│ ├── styl
│ │ ├── footer.styl
│ │ ├── header.styl
│ │ └── main.styl
│ └── view
│ ├── footer.js
│ ├── header.js
│ ├── main.js
│ └── todo.js
└── vendor # 3rd party library
├── backbone-min.js
├── backbone.js
├── backbone.localStorage-min.js
├── backbone.localStorage.js
├── beez.js
├── beez.min.js
├── handlebars.runtime.js
├── handlebars.runtime.min.js
├── require.js
├── require.min.js
├── underscore-min.js
├── underscore.js
├── zepto.js
└── zepto.min.js
13 directories, 32 files
$ cd ~/Desktop/example/s
$ ohcount -s
Examining 65 file(s)
Ohloh Line Count Summary
Language Files Code Comment Comment % Blank Total
---------------- ----- --------- --------- --------- --------- ---------
javascript 23 805 155 16.1% 186 1146
css 5 58 0 0.0% 0 58
html 2 28 0 0.0% 0 28
---------------- ----- --------- --------- --------- --------- ---------
Total 30 891 155 14.8% 186 1232