Skip to content
Permalink
Browse files

Build: Create demos targets

- Combine several copy targets to simplify demo asset copying
  • Loading branch information...
nschonni committed Nov 30, 2013
1 parent b855462 commit 6be4209dc83dcd62bcdbdef948973579afc3928e
Showing with 54 additions and 52 deletions.
  1. +54 −52 Gruntfile.coffee
@@ -19,10 +19,9 @@ module.exports = (grunt) ->
"test"
"build"
"assets-dist"
"assemble:demos"
"assemble:demos_min"
"demos"
"demos-dist"
"imagemin:min"
"htmlcompressor"
]
)

@@ -31,7 +30,7 @@ module.exports = (grunt) ->
"Produces unminified files"
[
"build"
"assemble:demos"
"demos"
]
)

@@ -52,9 +51,6 @@ module.exports = (grunt) ->
"Build and deploy artifacts to wet-boew-dist"
[
"dist"
"assemble:demos"
"assemble:demos_min"
"htmlcompressor"
"copy:deploy"
"gh-pages"
]
@@ -103,9 +99,6 @@ module.exports = (grunt) ->
"copy:other"
"copy:deps"
"copy:jsAssets"
"copy:jsDemoPlugins"
"copy:jsDemoPolyfills"
"copy:jsDemoOther"
"i18n"
"concat:core"
"concat:coreIE8"
@@ -132,15 +125,32 @@ module.exports = (grunt) ->
"INTERNAL: Process non-CSS/JS assets to dist"
[
"copy:assets_min"
"copy:misc_min"
]
)

@registerTask(
"demos"
"INTERNAL: Create unminified demos"
[
"copy:demos"
"assemble:demos"
]
)

@registerTask(
"demos-dist"
"INTERNAL: Create minified demos"
[
"copy:demos_min"
"assemble:demos_min"
"htmlcompressor"
]
)

@registerTask(
"assets"
"INTERNAL: Process non-CSS/JS assets to dist"
[
"copy:misc"
"copy:themeAssets"
"copy:bootstrap"
]
@@ -593,19 +603,6 @@ module.exports = (grunt) ->
expand: true
flatten: true

misc:
cwd: "src/plugins"
src: [
"**/*.*"
"!**/*.js"
"!**/*.scss"
"!**/*.hbs"
"!**/assets/*"
"!**/sprites/*"
]
dest: "dist/unmin/demos"
expand: true

polyfills:
cwd: "src/polyfills"
src: "**/*.js"
@@ -645,27 +642,33 @@ module.exports = (grunt) ->
expand: true
flatten: true

jsDemoPlugins:
cwd: "src/plugins"
src: "**/demo/*.js"
dest: "dist/unmin/demos/"
expand: true

jsDemoPolyfills:
cwd: "src/polyfills"
src: "**/demo/*.js"
dest: "dist/unmin/demos/"
expand: true

jsDemoOther:
cwd: "src/other"
src: "**/demo/*.js"
dest: "dist/unmin/demos/"
expand: true
demos:
files: [
cwd: "src/plugins"
src: [
"**/*.{jpg,html,xml}"
"**/demo/*.*"
"**/ajax/*.*"
"**/img/*.*"
"!**/assets/*.*"
]
dest: "dist/unmin/demos/"
expand: true
,
cwd: "src/polyfills"
src: "**/demo/*.js"
dest: "dist/unmin/demos/"
expand: true
,
cwd: "src/other"
src: "**/demo/*.js"
dest: "dist/unmin/demos/"
expand: true
]

themeAssets:
cwd: "theme/"
src: "**/assets/*.*"
src: "assets/*.*"
dest: "dist/unmin"
expand: true

@@ -680,17 +683,16 @@ module.exports = (grunt) ->
dest: "dist"
expand: true

misc_min:
cwd: "src/plugins"
demos_min:
cwd: "dist/unmin"
src: [
"**/*.*"
"!**/*.js"
"!**/*.scss"
"!**/*.hbs"
"!**/assets/*"
"!**/sprites/*"
"**/*.{jpg,html,xml}"
"**/demo/*.*"
"**/ajax/*.*"
"**/img/*.*"
"!**/assets/*.*"
]
dest: "dist/demos"
dest: "dist/demos/"
expand: true

deploy:

0 comments on commit 6be4209

Please sign in to comment.
You can’t perform that action at this time.