This repository has been archived by the owner on Mar 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mimosa-config-commented.coffee
393 lines (362 loc) · 29.2 KB
/
mimosa-config-commented.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# THE FOLLOWING IS A COMMENTED VERSION OF THE mimosa-config.coffee WITH
# ALL OF THE MOST RECENT DEFAULTS. THIS FILE IS MEANT FOR REFERENCE ONLY.
# All of the below are mimosa defaults and only need to be uncommented in the event you want
# to override them.
#
# IMPORTANT: Be sure to comment out all of the nodes from the base to the option you want to
# override. If you want to turn change the source directory you would need to uncomment watch
# and sourceDir. Also be sure to respect coffeescript indentation rules. 2 spaces per level
# please!
exports.config = {
# minMimosaVersion:null # The minimum Mimosa version that must be installed to use the
# project. Defaults to null, which means Mimosa will not check
# the version. This is a no-nonsense way for big teams to ensure
# everyone stays up to date with the blessed Mimosa version for a
# project.
###
The list of Mimosa modules to use for this application. The defaults (lint, server, require,
minify, live-reload, bower) come bundled with Mimosa and do not need to be installed. The
'mimosa-' that preceeds all Mimosa module names is assumed, however you can use it if you
want. If a module is listed here that Mimosa is unaware of, Mimosa will attempt to install it.
###
modules: ["server","minify","lint","live-reload","require","bower","post-hook","server-reload"]
# watch:
# sourceDir: "assets" # directory location of web assets, can be relative to
# the project root, or absolute
# compiledDir: "public" # directory location of compiled web assets, can be
# relative to the project root, or absolute
# javascriptDir: "javascripts" # Location of precompiled javascript (i.e.
# coffeescript), must be relative to sourceDir
# exclude: [/[/\\](\.|~)[^/\\]+$/] # regexes or strings matching the files to be
# ignored by mimosa, the default matches all sorts of
# dot files and temp files. Strings are paths and can
# be relative to sourceDir or absolute.
# throttle: 0 # number of file adds the watcher handles before
# taking a 100 millisecond pause to let those files
# finish their processing. This helps avoid EMFILE
# issues for projects containing large numbers of
# files that all get copied at once. If the throttle
# is set to 0, no throttling is performed. Recommended
# to leave this set at 0, thedefault, until you start
# encountering EMFILE problems. throttle has no effect
# if usePolling is set to false.
# usePolling: true # WARNING: Do not change this default if you are on
# *Nix. Windows users, read on.
# Whether or not to poll for system file changes.
# Unless you have a lot files and your CPU starts
# running hot, it is best to leave this setting alone.
# interval: 100 # Interval of file system polling.
# binaryInterval: 300 # Interval of file system polling for binary files
# vendor: # settings for vendor assets
# javascripts: "javascripts/vendor" # location, relative to the watch.sourceDir, of vendor
# javascript assets. Unix style slashes please.
# stylesheets: "stylesheets/vendor" # location, relative to the watch.sourceDir, of vendor
# stylesheet assets. Unix style slashes please.
# compilers:
# extensionOverrides: # A list of extension overrides, format is:
# [compilerName]:[arrayOfExtensions], see
# http://mimosa.io/compilers.html for list of compiler names
# coffee: ["coff"] # This is an example override, this is not a default, must be
# array of strings
# libs: {} # If Mimosa contains a version of a compiler that your code is
# not compatible with, use this setting to adjust to the right
# version. The key to the libs object is the name of the
# compiler and the value is a nodejs require call to pull the
# library in. Ex: libs: less: require('less'). You will need
# to have the version of the compiler you need installed in
# your project. This is the only means to use node-sass as
# Mimosa does not come bundled with it.
# coffeescript: # config settings for coffeescript
# sourceMap:true # whether to generate source during "mimosa watch".
# Source maps are not generated during "mimosa build"
# regardless of setting.
# sourceMapDynamic: true # Whether or not to inline the source maps, this adds base64
# encoded source maps to the compiled file rather than write
# an extra map file.
# sourceMapExclude: [/\/specs?\//, /_spec.js$/] # files to exclude from source map generation
# bare:true # whether or not to include the top level wrapper around
# each compiled coffeescript file. Defaults to not wrapping
# as wrapping with define/require is assumed.
# iced: # config settings for iced coffeescript
# sourceMap:true # whether to generate source during "mimosa watch".
# Source maps are not generated during "mimosa build"
# regardless of setting.
# sourceMapDynamic: true # Whether or not to inline the source maps, this adds base64
# encoded source maps to the compiled file rather than write
# an extra map file.
# sourceMapExclude: [/\/specs?\//, /_spec.js$/] # files to exclude from source map generation
# bare:true # whether or not to include the top level wrapper around each
# compiled iced file. Defaults to not wrapping as wrapping with
# define/require is assumed.
# runtime:"none" # No runtime boilerplate is included
# typescript: # config settings for typescript
# module: null # how compiled tyepscript is wrapped, defaults to no wrapping,
# can be "amd" or "commonjs"
# coco: # config settings for coco
# bare:true # whether or not to include the top level wrapper around
# each compiled coco file. Defaults to not wrapping
# as wrapping with define/require is assumed.
# livescript: # config settings for livescript
# bare:true # whether or not to include the top level wrapper around
# each compiled coffeescript file. Defaults to not wrapping
# as wrapping with define/require is assumed.
# stylus: # config settings for stylus
# use:['nib'] # names of libraries to use, should match the npm name for
# the desired libraries
# import:['nib'] # Files to import for compilation
# define: {} # An object containing stylus variable defines
# includes: [] # Files to include for compilation
# template: # overall template object can be set to null if no
# templates being used
# nameTransform: "fileName" # means by which Mimosa creates the name for each
# template, options: default "fileName" is name of file,
# "filePath" is path of file after watch.sourceDir
# with the extension dropped, a supplied regex can be
# used to remove any unwanted portions of the filePath,
# and a provided function will be called with the
# filePath as input
# wrapType: "amd" # The type of module wrapping for the output templates
# file. Possible values: "amd", "common", "none".
# commonLibPath: null # Valid when wrapType is 'common'. The path to the
# client library. Some libraries do not have clients
# therefore this is not strictly required when choosing
# the common wrapType.s
# outputFileName: "javascripts/templates" # the file all templates are compiled into,
# is relative to watch.sourceDir.
# outputFileName: # outputFileName Alternate Config 1
# hogan:"hogans" # Optionally outputFileName can be provided an object of
# jade:"jades" # file extension to file name in the event you are using
# multiple templating libraries. The file extension must
# match one of the default compiler extensions or one of
# the extensions configured for a compiler in the
# compilers.extensionOverrides section above.
# output: [{ # output Alternate Config 2
# folders:[""] # Use output instead of outputFileName if you want
# outputFileName: "" # to break up your templates into multiple files, for
# }] # instance, if you have a two page app and want the
# templates for each page to be built separately.
# For each entry, provide an array of folders that
# contain the templates to combine. folders entries are
# relative to watch.sourceDir and must exist.
# outputFileName works identically to outputFileName
# above, including the alternate config, however, no
# default file name is assumed. An output name must be
# provided for each output entry, and the names
# must be unique.
# handlebars: # handlebars specific configuration
# helpers:["app/template/handlebars-helpers"] # the paths from watch.javascriptDir to
# the files containing handlebars helper/partial
# registrations
# ember: # Ember.js has its own Handlebars compilation needs,
# use this config block to provide Ember specific
# Handlebars configuration.
# enabled: false # Whether or not to use the Ember Handlebars compiler
# path: "vendor/ember" # location of the Ember library, this is used as
# as a dependency in the compiled templates.
###
# the extensions of files to copy from sourceDir to compiledDir. vendor js/css, images, etc.
###
# copy:
# extensions: ["js","css","png","jpg","jpeg","gif","html","eot","svg","ttf","woff","otf","yaml","kml","ico","htc","htm","json","txt","xml","xsd","map","md"]
# growl:
# onStartup: false # Controls whether or not to Growl when assets successfully
# compile/copy on startup, If you've got 100 CoffeeScript files,
# and you do a clean and then start watching, you'll get 100 Growl
# notifications. This is set to false by default to prevent that.
# Growling for every successful file on startup can also cause
# EMFILE issues. See watch.throttle
# onSuccess: # Controls whether to Growl when assets successfully compile/copy
# javascript: true # growl on successful compilation? will always send on failure
# css: true # growl on successful compilation? will always send on failure
# template: true # growl on successful compilation? will always send on failure
# copy: true # growl on successful copy?
# server: # configuration for server when server option is enabled via CLI
# defaultServer:
# enabled: false # whether or not mimosa starts a default server for you, when
# true, mimosa starts its own on the port below, when false,
# Mimosa will use server provided by path below
# onePager: false # Whether or not your app is a one page application. When set to
# true, all routes will be pointed at index
# path: 'server.coffee' # valid when defaultServer.enabled: false, path to file for provided
# server which must contain export startServer method that takes
# an enriched mimosa-config object
# port: 3000 # port to start server on
# base: '' # base of url for the app, if altered should start with a slash
# views: # configuration for the view layer of your application
# compileWith: 'jade' # Valid options: "jade", "hogan", "html", "ejs", "handlebars", "dust".
# The compiler for your views.
# extension: 'jade' # extension of your server views
# path: 'views' # This is the path to project views, it can be absolute or
# relative. If defaultServer.enabled is true, it is relative to the
# root of the project. If defaultServer.enabled is false it is
# relative to the server.path setting above.
# minify: # Configuration for non-require minification/compression via
# uglify using the --minify flag.
# exclude:[/\.min\./] # List of string paths and regexes to match files to exclude
# when running minification. Any path with ".min." in its name,
# like jquery.min.js, is assumed to already be minified and is
# ignored by default. Paths can be relative to the
# watch.compiledDir, or absolute. Paths are to compiled files,
# so '.js' rather than '.coffee'
# lint: # settings for js, css linting/hinting
# exclude:[] # array of strings or regexes that match files to not lint,
# strings are paths that can be relative to the watch.compiledDir
# or absolute
# compiled: # settings for compiled files
# javascript:true # fire jshint on successful compile of meta-language to javascript
# css:true # fire csslint on successful compile of meta-language to css
# copied: # settings for copied files, files already in .css and .js files
# javascript: true # fire jshint for copied javascript files
# css: true # fire csslint for copied css files
# vendor: # settings for vendor files
# javascript: false # fire jshint for copied vendor javascript files (like jquery)
# css: false # fire csslint for copied vendor css files (like bootstrap)
# rules: # All hints/lints come with defaults built in. Here is where
# you'd override those defaults. Below is listed an example of an
# overridden default for each lint type, also listed, next to the
# lint types is the url to find the settings for overriding.
# jshintrc: ".jshintrc" # This is the path, either relative to the root of the project or
# absolute, to a .jshintrc file. By default mimosa will look at
# the root of the project for this file. The file does not need to
# be present. If it is present, it must be valid JSON.
# javascript: # Settings: http://www.jshint.com/options/, these settings will
# override any settings set up in the jshintrc
# plusplus: true # This is an example override, this is not a default
# css: # Settings: https://github.com/stubbornella/csslint/wiki/Rules
# floats: false # This is an example override, this is not a default
# liveReload: # Configuration for live-reload
# enabled:true # Whether or not live-reload is enabled
# additionalDirs:["views"] # Additional directories outside the watch.compiledDir
# that you would like to have trigger a page refresh,
# like, by default, static views. Is string path,
# can be relative to project root, or absolute
# require: # configuration for requirejs options.
# exclude:[] # Regex or string paths. Paths can be absolute or relative to the
# watch.javascriptDir. These files will be excluded from all
# require module functionality. That includes AMD verification and
# being considered a root level file to be optimized.
# commonConfig: "common" # The path from 'javascriptDir' to the location of common requirejs
# config. This is config shared across multiple requirejs modules.
# This should be either a require.config({}) or a requirejs.config({}) function call.
# Defaults to the value `common` - referring to a file named common.js in the root of javascriptDir.
# Does not need to exist, so can be left alone if a commonConfig is not
# being used.
# tracking: # every time mimosa starts up, mimosa-require needs to be able to
# build a dependency graph for the codebase. It can do that by
# processing all the files, but that means each file needs to be
# processed when mimosa watch starts which slows down startup.
# tracking allows mimosa-require to write interim state to the file
# system so that from one mimosa run to another it can persist the
# important information and not need the entire application to be
# rebuilt
# enabled: true # whether or not tracking is enabled
# path: ".mimosa/require/tracking.json" # the path to the tracking file relative to the
# root of the project.
# verify: # settings for requirejs path verification
# enabled: true # Whether or not to perform verification
# optimize :
# inferConfig:true # Mimosa figures out all you'd need for a simple r.js optimizer run.
# If you rather Mimosa not do that, set inferConfig to false and
# provide your config in the overrides section. See here
# https://github.com/dbashford/mimosa#requirejs-optimizer-defaults
# to see what the defaults are.
# modules: # If using a modules config, place it here. mimosa-require will use
# the modules config directly, but also base many other r.js config
# options based on a modules setup instead of a single file setup.
# moduleCachingPath: ".mimosa/require/moduleCaching" # Only valid if using modules. This
# path is where pristine root module files are kept in between r.js
# runs. This cache allows you to keep "mimosa watch" running while
# building and rebuilding your application.
# overrides: # Optimization configuration and Mimosa overrides. If you need to
# make tweaks uncomment this line and add the r.js config
# (http://requirejs.org/docs/optimization.html#options) as new
# paramters inside the overrides ojbect. To unset Mimosa's defaults,
# set a property to null.
#
# overrides can also be a function that takes mimosa-require's
# inferred config for each module. This allows the inferred config
# to be updated and enhanced instead of just overridden.
# bower: # Configuration for bower module
# watch: true # Whether or not to watch the bower.json file to automatically
# kick off a bower install when it changes.
# bowerDir:
# path: ".mimosa/bower/bower_components" # The location mimosa-bower places temporary
# bower assets.
# clean: true # whether or not to remove temporary bower assets after install
# copy: # configuration for the copying of assets from bower temp
# directories into the project
# enabled: true # whether or not to copy the assets out of the bowerDir.path
# into the project vendor location
# trackChanges: true # When set to true, mimosa-bower will keep track of your
# bower.json and mimosa-config "bower" configuration and kick
# off installs based on changes. When set to false, bower's
# default checking is used. This is based on the contents of
# bowerDir.path. If bowerDir.clean is true, and trackChanges is
# false, mimosa-bower will not perform installs during "watch"
# and "build" because installs would occur every time mimosa
# starts up.
# outRoot: null # A string path to append to the vendor directory before
# copying in assets. All copied assets would go inside this
# directory. Example: "bower-managed". null means no outRoot
# is applied.
# exclude:[] # An array of string paths or regexes. Files to exclude from
# copying. Paths should be relative to the bowerdir.path or
# absolute.
# mainOverrides: {} # Occasionally bower packages do not clearly indicate what file
# is the main library file. In those cases, mimosa cannot find
# the main files to copy them to the vendor directory. json2 is
# a good example. mainOverrides allows for setting which files
# should be copied for a package. The key for this object is
# the name of the package. The value is an array of path
# strings representing the package's main files. The paths
# should be relative to the root of the package. For example:
# {"json2":["json2.js","json_parse.js"]}. The paths can also
# be to directories. That will include all the directory's
# files. mainOverrides packages can also be provided an object
# in addition to string paths. The object maps input paths to
# output paths and allow for specific placement of files and
# folders. Ex {"json2":{"json2.js":"json-utils/json2.js"}. In
# this case the "json2.js" file will be placed in
# "json-utils/json2.js" in the vendor.javascripts folder.
# strategy: "packageRoot" # The copying strategy. "vendorRoot" places all files at the
# root of the vendor directory. "packageRoot" places the files
# in the vendor directory in a folder named for that package.
# "none" will copy the assets into the vendor directory without
# modification. strategy can also be an object with keys that
# match the names of packages and values of strategy types.
# When using a strategy object, the key of "*" provides a
# default strategy. If only 2 of 10 packages are specified
# the rest get the "*" strategy. If no "*" is provided,
# "packageRoot" is the assumed default.
# forceLatest: true # If you are running into a problem where dependency versions
# are clashing, use forceLatest to make it so the latest
# version is loaded. For instance, you might have jquery 2.0.0
# as a package, but something else depends on 1.8.1.
# pathMod: [] # pathMod can be an array of strings or a regex. It is used to
# strip full pieces of a path from the output file when the
# selected strategy is "none". If a bower package script is in
# "packageName/lib/js/foo.js" and "pathMod" is set to
# ['js', 'lib'] the output path would have "lib" and "js"
# stripped. Feel free to suggest additions to this based on
# your experience!
# postHook: # config for postHook module
# commands: [] # A list of strings, the commands/scripts to execute at the end of
# 'mimosa watch' startup processing. These would be how you would
# execute them at the command line. For example: ["./doSomething", "rm foo.bar"]
# serverReload: # Configuration for automatically restarting a user's server. Used in
# conjunction with the 'mimosa-server' module.
###
# "watch" is an array of strings, folders and files whose contents trigger a server reload when
# they are changed. Can be relative to the base of the project or can be absolute
###
# watch: ["server.coffee", "server.js", "server.ls", "server.iced", "routes", "src", "lib"]
# exclude:[] # An array of regexs or strings that match files to exclude from
# reloading the server. Can be a mix of regex and strings. Strings
# should be a path relative to the base of the project (location of
# mimosa-config) or absolute. ex: [/.txt$/,"src/README.md"]
# validate: true # set validate to false if you do not want Mimosa to validate that the
# changed files inside 'watch' are safe to use. If you, for instance,
# write not-compilable CoffeeScript inside one of the 'folder's, when
# Mimosa restarts your server, your server will fail and Mimosa will
# error out.
}