Moving tasks to files
This commit is contained in:
parent
27a582f5d9
commit
4b73fe68de
96
Gruntfile.js
96
Gruntfile.js
@ -1,92 +1,14 @@
|
||||
module.exports = function(grunt) {
|
||||
module.exports = function (grunt) {
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
grunt.initConfig({
|
||||
concat: {
|
||||
dist: {
|
||||
options: {},
|
||||
files: {
|
||||
'dist/cartostyles.css': [
|
||||
'.tmp/src/scss/**/*.css'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
connect: {
|
||||
server: {
|
||||
options: {
|
||||
port: 9003,
|
||||
livereload: 35732,
|
||||
open: true,
|
||||
hostname: '0.0.0.0', // to be able to access the server not only from localhost
|
||||
base: {
|
||||
path: '.'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
dist: {
|
||||
files: [{
|
||||
dot: true,
|
||||
src: [
|
||||
'.sass-cache',
|
||||
'.tmp',
|
||||
'dist',
|
||||
'!dist/.git*'
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
sass: {
|
||||
dist: {
|
||||
options: {
|
||||
sourceMap: false,
|
||||
outputStyle: 'compressed'
|
||||
},
|
||||
files: [{
|
||||
expand: true,
|
||||
src: [
|
||||
'src/scss/**/*.scss'
|
||||
],
|
||||
dest: '.tmp',
|
||||
ext: '.css'
|
||||
}]
|
||||
}
|
||||
},
|
||||
cssmin: {
|
||||
dist: {
|
||||
options: {
|
||||
check: 'gzip'
|
||||
},
|
||||
files: {
|
||||
'dist/cartostyles.css': [
|
||||
'dist/cartostyles.css'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
shell: {
|
||||
dist: {
|
||||
command: 'styleguide'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
scss: {
|
||||
files: [
|
||||
'src/scss/**/*.scss'
|
||||
],
|
||||
tasks: [
|
||||
'sass',
|
||||
'concat',
|
||||
'cssmin'
|
||||
],
|
||||
options: {
|
||||
spawn: false,
|
||||
livereload: 35732
|
||||
}
|
||||
}
|
||||
}
|
||||
concat: require('./tasks/concat'),
|
||||
connect: require('./tasks/connect'),
|
||||
clean: require('./tasks/clean'),
|
||||
sass: require('./tasks/sass'),
|
||||
cssmin: require('./tasks/cssmin'),
|
||||
shell: require('./tasks/shell'),
|
||||
watch: require('./tasks/watch')
|
||||
});
|
||||
|
||||
var baseTasks = [
|
||||
@ -108,4 +30,4 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('dev', devTasks);
|
||||
grunt.registerTask('build', baseTasks);
|
||||
grunt.registerTask('default', baseTasks);
|
||||
}
|
||||
};
|
||||
|
2
dist/cartostyles.css
vendored
2
dist/cartostyles.css
vendored
@ -1 +1 @@
|
||||
.CDB-Shape-dot{display:inline-block;width:8px;min-width:8px;height:8px;border-radius:8px}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}mark{background:#ff0;color:#000}sub,sup{line-height:0;position:relative}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}optgroup{font-weight:700}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}body{margin:0;line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
|
||||
.CDB-Shape-button,.CDB-Shape-dot,.CDB-Shape-tooltip{width:8px;min-width:8px;height:8px;border-radius:8px;display:inline-block}.CDB-Shape-button,.CDB-Shape-dot,.CDB-Shape-tooltip,.u-iBlock{display:inline-block}.CDB-Shape-button{background:red}.CDB-Shape-tooltip{background:green}.u-tSpace{margin-top:4px}.u-tSpace-xl{margin-top:12px}.u-rSpace{margin-right:4px}.u-rSpace--m{margin-right:8px}.u-rSpace--xl{margin-right:12px}.u-lSpace{margin-left:4px}.u-lSpace--xl{margin-left:12px}.u-iBlock{vertical-align:middle}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}mark{background:#ff0;color:#000}sub,sup{line-height:0;position:relative}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}optgroup{font-weight:700}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}body{margin:0;line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
|
@ -43,6 +43,10 @@
|
||||
"library",
|
||||
"CartoDB",
|
||||
"share",
|
||||
"assets"
|
||||
"assets",
|
||||
"styleguide",
|
||||
"shared components",
|
||||
"editor",
|
||||
"deep-insights"
|
||||
]
|
||||
}
|
||||
|
13
tasks/clean.js
Normal file
13
tasks/clean.js
Normal file
@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
dist: {
|
||||
files: [{
|
||||
dot: true,
|
||||
src: [
|
||||
'.sass-cache',
|
||||
'.tmp',
|
||||
'dist',
|
||||
'!dist/.git*'
|
||||
]
|
||||
}]
|
||||
}
|
||||
};
|
10
tasks/concat.js
Normal file
10
tasks/concat.js
Normal file
@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
dist: {
|
||||
options: {},
|
||||
files: {
|
||||
'dist/cartostyles.css': [
|
||||
'.tmp/src/scss/**/*.css'
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
13
tasks/connect.js
Normal file
13
tasks/connect.js
Normal file
@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
server: {
|
||||
options: {
|
||||
port: 9003,
|
||||
livereload: 35732,
|
||||
open: true,
|
||||
hostname: '0.0.0.0', // to be able to access the server not only from localhost
|
||||
base: {
|
||||
path: '.'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
12
tasks/cssmin.js
Normal file
12
tasks/cssmin.js
Normal file
@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
dist: {
|
||||
options: {
|
||||
check: 'gzip'
|
||||
},
|
||||
files: {
|
||||
'dist/cartostyles.css': [
|
||||
'dist/cartostyles.css'
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
16
tasks/sass.js
Normal file
16
tasks/sass.js
Normal file
@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
dist: {
|
||||
options: {
|
||||
sourceMap: false,
|
||||
outputStyle: 'compressed'
|
||||
},
|
||||
files: [{
|
||||
expand: true,
|
||||
src: [
|
||||
'src/scss/**/*.scss'
|
||||
],
|
||||
dest: '.tmp',
|
||||
ext: '.css'
|
||||
}]
|
||||
}
|
||||
};
|
5
tasks/shell.js
Normal file
5
tasks/shell.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
dist: {
|
||||
command: 'styleguide'
|
||||
}
|
||||
};
|
16
tasks/watch.js
Normal file
16
tasks/watch.js
Normal file
@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
scss: {
|
||||
files: [
|
||||
'src/scss/**/*.scss'
|
||||
],
|
||||
tasks: [
|
||||
'sass',
|
||||
'concat',
|
||||
'cssmin'
|
||||
],
|
||||
options: {
|
||||
spawn: false,
|
||||
livereload: 35732
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user