Browse Source

Refactor Gruntfile.js targets.

pull/464/head
XhmikosR 11 years ago committed by XhmikosR
parent
commit
518000d2cb
  1. 53
      Gruntfile.js

53
Gruntfile.js

@ -68,13 +68,21 @@ module.exports = function (grunt) {
style: 'expanded', style: 'expanded',
unixNewlines: true unixNewlines: true
}, },
dist: { core: {
files: { src: 'sass/ratchet.scss',
'<%= meta.distPath %>css/<%= pkg.name %>.css': 'sass/ratchet.scss', dest: '<%= meta.distPath %>css/<%= pkg.name %>.css'
'<%= meta.distPath %>css/<%= pkg.name %>-theme-ios.css': 'sass/theme-ios.scss', },
'<%= meta.distPath %>css/<%= pkg.name %>-theme-android.css': 'sass/theme-android.scss', android: {
'<%= meta.docsAssetsPath %>css/docs.css': 'sass/docs.scss' src: 'sass/theme-android.scss',
} dest: '<%= meta.distPath %>css/<%= pkg.name %>-theme-android.css'
},
ios: {
src: 'sass/theme-ios.scss',
dest: '<%= meta.distPath %>css/<%= pkg.name %>-theme-ios.css'
},
docs: {
src: 'sass/docs.scss',
dest: '<%= meta.docsAssetsPath %>css/docs.css'
} }
}, },
@ -82,16 +90,24 @@ module.exports = function (grunt) {
options: { options: {
config: 'sass/.csscomb.json' config: 'sass/.csscomb.json'
}, },
dist: { core: {
files: {
'<%= sass.core.dest %>': '<%= sass.core.dest %>'
}
},
android: {
files: {
'<%= sass.android.dest %>': '<%= sass.android.dest %>'
}
},
ios: {
files: { files: {
'<%= meta.distPath %>css/<%= pkg.name %>.css': '<%= meta.distPath %>css/<%= pkg.name %>.css', '<%= sass.ios.dest %>': '<%= sass.ios.dest %>'
'<%= meta.distPath %>css/<%= pkg.name %>-theme-android.css': '<%= meta.distPath %>css/<%= pkg.name %>-theme-android.css',
'<%= meta.distPath %>css/<%= pkg.name %>-theme-ios.css': '<%= meta.distPath %>css/<%= pkg.name %>-theme-ios.css'
} }
}, },
docs: { docs: {
files: { files: {
'<%= meta.docsAssetsPath %>css/docs.css': '<%= meta.docsAssetsPath %>css/docs.css' '<%= sass.docs.dest %>': '<%= sass.docs.dest %>'
} }
} }
}, },
@ -126,9 +142,9 @@ module.exports = function (grunt) {
] ]
}, },
core: { core: {
src: '<%= meta.distPath %>css/<%= pkg.name %>.css' src: '<%= sass.core.dest %>'
}, },
android_theme: { android: {
options: { options: {
browsers: [ browsers: [
'Android 2.3', 'Android 2.3',
@ -138,18 +154,15 @@ module.exports = function (grunt) {
'Opera >= 12' 'Opera >= 12'
] ]
}, },
src: '<%= sass.android_theme.dest %>' src: '<%= sass.android.dest %>'
}, },
ios_theme: { ios: {
options: { options: {
browsers: ['iOS >= 6'] browsers: ['iOS >= 6']
}, },
src: '<%= sass.ios_theme.dest %>' src: '<%= sass.ios.dest %>'
}, },
docs: { docs: {
options: {
browsers: ['last 2 versions', 'ie 9', 'android 2.3', 'android 4', 'opera 12']
},
src: '<%= sass.docs.dest %>' src: '<%= sass.docs.dest %>'
} }
}, },

Loading…
Cancel
Save