| 123456789101112131415161718192021222324252627282930313233343536 |
- /**
- * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
- 'use strict';
- const initTask = require( './utils/dev-init' );
- const pluginCreateTask = require( './utils/dev-plugin-create' );
- var ckeditor5Path = process.cwd();
- module.exports = ( grunt ) => {
- const packageJSON = grunt.config.data.pkg;
- grunt.registerTask( 'dev-init', function() {
- // Get workspace root relative path from configuration and convert it to absolute path.
- const options = getOptions( this );
- initTask( ckeditor5Path, packageJSON, options, grunt.log.writeln, grunt.log.error );
- } );
- grunt.registerTask( 'dev-plugin-create', function() {
- const done = this.async();
- const options = getOptions( this );
- pluginCreateTask( ckeditor5Path, options, grunt.log.writeln, grunt.log.error ).then( done );
- } );
- function getOptions( context ) {
- const options = {
- workspaceRoot: '..'
- };
- return context.options( options );
- }
- };
|