Skip to content
Permalink
Browse files

Merge branch 't/13037' into major

  • Loading branch information...
Reinmar committed Apr 2, 2015
2 parents deed99a + e22375b commit 5f2994874bcc509d70a71f2972411051bd8a27bf
@@ -3,69 +3,59 @@
'use strict';

module.exports = function( grunt ) {
var cssBanner = [
'/*',
'Copyright (c) 2003-' + new Date().getFullYear() + ', CKSource - Frederico Knabben. All rights reserved.',
'For licensing, see LICENSE.html or http://cksource.com/ckeditor/license',
'*/'
].join( '\n' );
var banner = [
'/**',
' * Copyright (c) 2003-' + new Date().getFullYear() + ', CKSource - Frederico Knabben. All rights reserved.',
' * For licensing, see LICENSE.html or http://cksource.com/ckeditor/license',
' */',
],
jsBanner = banner.concat( [ '', '// jscs: disable', '// jshint ignore: start', '' ] ),
samplesFrameworkDir = 'node_modules/cksource-samples-framework',
samplesFrameworkJsFiles = [
samplesFrameworkDir + '/js/sf.js',
samplesFrameworkDir + '/components/**/*.js'
];

grunt.config.merge( {
less: {
basicsample: {
samples: {
files: [
{
src: 'samples/less/sample.less',
dest: 'samples/css/sample.css'
src: 'samples/less/samples.less',
dest: 'samples/css/samples.css'
}
],

options: {
ieCompat: true,
paths: [ 'samples/' ],
relativeUrls: true,

banner: cssBanner,
banner: banner.join( '\n' ),
sourceMap: true,
sourceMapFilename: 'samples/css/sample.css.map',
sourceMapURL: 'sample.css.map',
sourceMapRootpath: '../../'
}
},

toolbarconfigurator: {
files: [
{
src: 'samples/toolbarconfigurator/less/toolbarmodifier.less',
dest: 'samples/toolbarconfigurator/css/toolbarmodifier.css'
}
],

options: {
paths: [ 'samples/toolbarconfigurator' ],

banner: cssBanner,
sourceMap: true,
sourceMapFilename: 'samples/toolbarconfigurator/css/toolbarmodifier.css.map',
sourceMapURL: 'toolbarmodifier.css.map',
sourceMapFileInline: true,
sourceMapFilename: 'samples/css/samples.css.map',
sourceMapURL: 'samples.css.map',
sourceMapRootpath: '../../'
}
}
},

watch: {
basicsample: {
files: '<%= less.basicsample.options.paths[ 0 ] + "/**/*.less" %>',
tasks: [ 'less:basicsample' ],
'samples-less': {
files: [
'<%= less.samples.options.paths[ 0 ] + "/**/*.less" %>',
samplesFrameworkDir + '/components/**/*.less'
],
tasks: [ 'less:samples' ],
options: {
nospawn: true
}
},

toolbarconfigurator: {
files: '<%= less.toolbarconfigurator.options.paths[ 0 ] + "/**/*.less" %>',
tasks: [ 'less:toolbarconfigurator' ],
options: {
nospawn: true
}
'samples-js': {
files: samplesFrameworkJsFiles,
tasks: [ 'concat:samples' ]
}
},

@@ -76,9 +66,21 @@ module.exports = function( grunt ) {
],
dest: 'samples/toolbarconfigurator/docs'
}
},

concat: {
samples: {
options: {
stripBanners: true,
banner: jsBanner.join( '\n' )
},
src: samplesFrameworkJsFiles,
dest: 'samples/js/sf.js'
}
}
} );

grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-less' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jsduck' );
@@ -14,10 +14,12 @@
"grunt-contrib-jshint": "~0.11.0",
"grunt-contrib-less": "~1.0.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-jsduck": "^1.0.1",
"grunt-contrib-concat": "~0.5.1",
"grunt-jsduck": "~1.0.1",
"grunt-githooks": "~0.3.1",
"less": "~2.3.1",
"shelljs": "~0.3.0"
"shelljs": "~0.3.0",
"cksource-samples-framework": "~0.2.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Oops, something went wrong.

0 comments on commit 5f29948

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