UNPKG

3.81 kBJavaScriptView Raw
1'use strict'
2
3const helpers = require('./helpers')
4
5module.exports = {
6 prepend: `\nBuilds .tag files to .js\n\nOptions:`,
7 append: `
8Build a single .tag file:
9
10 riot foo.tag To a same named file (foo.js)
11 riot foo.tag bar.js To a different named file (bar.js)
12 riot foo.tag bar To a different dir (bar/foo.js)
13
14Build all .tag files in a directory:
15
16 riot foo/bar To a same directory (foo/**/*.js)
17 riot foo/bar baz To a different directory (baz/**/*.js)
18 riot foo/bar baz.js To a single concatenated file (baz.js)
19
20Create an empty tag template
21
22 riot --new foo
23 riot --new foo/bar
24 riot --new foo/bar --ext html
25
26Examples for options:
27
28 riot foo bar
29 riot --config riot.config
30 riot --w foo bar
31 riot --watch foo bar
32 riot --compact foo bar
33 riot foo bar --compact
34 riot foo.tag --type coffeescript --expr
35 riot foo.tag --style sass --export css foo.css
36 riot foo.tag --exclude css foo.js
37
38Version ${ helpers.getVersion() }
39`,
40 options: [
41 {
42 option: 'help',
43 alias: 'h',
44 type: 'Boolean',
45 description: 'You\'re reading it'
46 },
47 {
48 option: 'version',
49 alias: 'v',
50 type: 'Boolean',
51 description: 'Print Riot\'s version'
52 },
53 {
54 option: 'watch',
55 alias: 'w',
56 type: 'Boolean',
57 description: 'Watch for changes'
58 },
59 {
60 option: 'compact',
61 alias: 'c',
62 type: 'Boolean',
63 description: 'Minify </p> <p> to </p><p>'
64 },
65 {
66 option: 'modular',
67 alias: 'm',
68 type: 'Boolean',
69 description: 'AMD and CommonJS'
70 },
71 {
72 option: 'silent',
73 alias: 's',
74 type: 'Boolean',
75 description: 'Silence build output'
76 },
77 {
78 option: 'whitespace',
79 type: 'Boolean',
80 description: 'Preserve newlines and whitepace'
81 },
82 {
83 option: 'check',
84 type: 'Boolean',
85 description: 'Check the syntax errors on a single tag'
86 },
87 {
88 option: 'colors',
89 type: 'Boolean',
90 description: 'Turn on colorized output'
91 },
92 {
93 option: 'expr',
94 type: 'Boolean',
95 description: 'Run expressions trough parser defined with --type'
96 },
97 {
98 option: 'config',
99 type: 'String',
100 description: 'Specify the path to a configuration file to compile your tags'
101 },
102 {
103 option: 'export',
104 type: 'String',
105 alias: 'e',
106 description: 'Compile and export only the css or html or js from your tags',
107 example: 'riot foo.tag --export css foo.css',
108 enum: ['css', 'js', 'html']
109 },
110 {
111 option: 'new',
112 type: 'String',
113 alias: 'n',
114 description: 'Create an empty tag template',
115 example: 'riot --new foo'
116 },
117 {
118 option: 'type',
119 alias: 't',
120 type: 'String',
121 description: 'JavaScript pre-processor. Built-in support for: es6, coffeescript, typescript, livescript, none'
122 },
123 {
124 option: 'exclude',
125 type: 'String',
126 description: 'Compile and excluding entities (css, html or js) from the output',
127 enum: ['css', 'js', 'html'],
128 example: 'riot foo.tag --exclude css --exclude html foo.js',
129 concatRepeatedArrays: true
130 },
131 {
132 option: 'template',
133 type: 'String',
134 description: 'HTML pre-processor. Built-in support for: pug'
135 },
136 {
137 option: 'style',
138 type: 'String',
139 description: 'Css pre-processor. Built-in support for: sass, scss, less, stylus',
140 example: 'riot foo.tag --style scss'
141 },
142 {
143 option: 'brackets',
144 type: 'String',
145 description: 'Change brackets used for expressions. Defaults to { }'
146 },
147 {
148 option: 'ext',
149 type: 'String',
150 default: 'tag',
151 description: 'Change tag file extension. Defaults to .tag'
152 }
153 ]
154}
\No newline at end of file