Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from anatoliychakkaev/master
Man
- Loading branch information
Showing
9 changed files
with
548 additions
and
8 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 |
---|---|---|
|
@@ -10,3 +10,4 @@ log/test.log | |
analyse-ab.r | ||
log | ||
tags.sh | ||
man |
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 |
---|---|---|
@@ -1,14 +1,55 @@ | ||
# TESTS | ||
|
||
TESTER = ./node_modules/.bin/mocha | ||
OPTS = --require ./test/init.js | ||
TESTS = test/*.test.js | ||
|
||
test: | ||
@./node_modules/.bin/mocha --require ./test/init.js test/*.test.js | ||
$(TESTER) $(OPTS) $(TESTS) | ||
test-verbose: | ||
@./node_modules/.bin/mocha --reporter spec --require ./test/init.js test/*.test.js | ||
$(TESTER) $(OPTS) --reporter spec $(TESTS) | ||
testing: | ||
./node_modules/.bin/mocha --watch --reporter min --require ./test/init.js --require should test/*.test.js | ||
$(TESTER) $(OPTS) --watch $(TESTS) | ||
|
||
# MAN DOCS | ||
|
||
CLI_MAN = $(shell find docs/cli -name '*.md' \ | ||
|sed 's|.md|.1|g' \ | ||
|sed 's|docs/cli/|man/|g' ) | ||
|
||
API_MAN = $(shell find docs/api -name '*.md' \ | ||
|sed 's|.md|.3|g' \ | ||
|sed 's|docs/api/|man/|g' ) | ||
|
||
API_WEB = $(shell find docs/api -name '*.md' \ | ||
|sed 's|.md|.html|g' \ | ||
|sed 's|docs/api/|man/html/|g' ) | ||
|
||
man/%.1: docs/cli/%.md scripts/doc.sh | ||
@[ -d man ] || mkdir man | ||
scripts/doc.sh $< $@ | ||
|
||
man/%.3: docs/api/%.md scripts/doc.sh | ||
@[ -d man ] || mkdir man | ||
scripts/doc.sh $< $@ | ||
|
||
man/html/%.html: docs/api/%.md scripts/doc.sh | ||
@[ -d man/html ] || mkdir -p man/html | ||
scripts/doc.sh $< $@ | ||
|
||
MAN = $(API_MAN) $(CLI_MAN) | ||
|
||
build: all | ||
|
||
all: $(MAN) $(API_WEB) | ||
|
||
man: $(MAN) | ||
|
||
# WEBSITE DOCS | ||
|
||
docs: | ||
node docs/sources/build | ||
apidocs: | ||
makedoc lib/*.js lib/*/*.js -t "RailwayJS API docs" -g "1602/express-on-railway" --assets | ||
|
||
.PHONY: test | ||
.PHONY: doc | ||
.PHONY: docs | ||
.PHONY: test doc docs |
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
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,74 @@ | ||
compound-helpers(3) - view helpers | ||
================================== | ||
|
||
## DESCRIPTION | ||
|
||
Helpers produce html code. [Built-in][BUILT-IN HELPERS] helpers available in any | ||
view. Custom helpers available in specific controller, see [CUSTOM HELPERS][] | ||
section. | ||
|
||
## BUILT-IN HELPERS | ||
|
||
### stylesheetLinkTag(file1[, file2[, ...[, fileN]]]) | ||
|
||
Generates `<link rel="stylesheets" href="..." />` tag. | ||
Following ejs: | ||
|
||
<%- stylesheetLinkTag('reset', 'style', 'mobile') %> | ||
|
||
will produce in develompent env: | ||
|
||
<link rel="stylesheet" type="text/css" href="/stylesheets/reset.css" /> | ||
<link rel="stylesheet" type="text/css" href="/stylesheets/style.css" /> | ||
<link rel="stylesheet" type="text/css" href="/stylesheets/mobile.css" /> | ||
|
||
and in production env: | ||
|
||
<link rel="stylesheet" type="text/css" href="/stylesheets/cache/somehash.css" /> | ||
|
||
depending on `app.set('merge stylesheets');` option. | ||
|
||
### javascriptIncludeTag | ||
### linkTo | ||
### contentFor | ||
### anchor | ||
### matcher | ||
### icon | ||
### imageTag | ||
### csrfTag | ||
### csrfMetaTag | ||
### metaTag | ||
### formFor | ||
### fieldsFor | ||
### errorMessagesFor | ||
### formTag | ||
### formTagBegin | ||
### formTagEnd | ||
### labelTag | ||
### submitTag | ||
### buttonTag | ||
### selectTag | ||
### optionTag | ||
|
||
## FORM HELPERS | ||
|
||
### begin | ||
### end | ||
### label | ||
### select | ||
### input | ||
### file | ||
### textarea | ||
### checkbox | ||
### submit | ||
|
||
## CUSTOM HELPERS | ||
|
||
There are two kind of custom helpers: application-wide and local. To define | ||
custom helpers create *./app/helpers/application_helper.js* file. Local helpers | ||
available only for specific controller, and should be located in | ||
*./app/helpers/controllerName_helper.js* file. | ||
|
||
## SEE ALSO | ||
|
||
routing(3) |
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,2 @@ | ||
# manuals | ||
routing(3) routing |
Oops, something went wrong.