Skip to content

Instantly share code, notes, and snippets.

@AlexMost
Created July 7, 2013 12:03
Show Gist options
  • Save AlexMost/5943249 to your computer and use it in GitHub Desktop.
Save AlexMost/5943249 to your computer and use it in GitHub Desktop.
modules:
- build: Cafe.build
- minify: Cafe.minify
- banner: Cafe.banner
- wrapper: Cafe.commonjswrapper
build :
sequence:
"""
recipe <= get-recipe@build 'recipe.yaml'
cache <- get-cache@build
_
bundles <= get-bundles@build recipe
modules <= get-modules@build recipe
-
realms <- realms@build
== <guard> realms or modules ==
_
changed_modules <= get-changed-modules@build modules
_
changed_bundles <= get-changed-bundles@build modules bundles
_
wrapped-modules <= wrap-modules@wrapper changed_modules
_
wrapped-bundles <= wrap-bundles@wrapper wrapped-modules
_
bundles-with-banner <= add-banner@banner wrapped-bundles
minify <- minify@minify wrapped-bundles
_
save-cache@build cache changed_modules changed_bundles
save-bundles@build cache changed_modules changed_bundles
"""
@EugeneN
Copy link

EugeneN commented Jul 8, 2013

http://en.wikipedia.org/wiki/YAML#Other_specified_data_types

можна написати якось так:

build :
    sequence: !do | 
        recipe <= get-recipe@build  'recipe.yaml'
        cache <- get-cache@build
        _ 

        bundles <= get-bundles@build recipe
        modules <= get-modules@build recipe
        ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment