| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- /**
- * @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' );
- const pluginInstallTask = require( './utils/dev-plugin-install' );
- const pluginUpdateTask = require( './utils/dev-update' );
- const pluginStatusTask = require( './utils/dev-status' );
- const ckeditor5Path = process.cwd();
- module.exports = ( grunt ) => {
- const packageJSON = grunt.config.data.pkg;
- grunt.registerTask( 'dev-init', function() {
- 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 );
- } );
- grunt.registerTask( 'dev-plugin-install', function() {
- const done = this.async();
- const options = getOptions( this );
- pluginInstallTask( ckeditor5Path, options, grunt.log.writeln, grunt.log.error ).then( done );
- } );
- grunt.registerTask( 'dev-update', function() {
- const options = getOptions( this );
- pluginUpdateTask( ckeditor5Path, packageJSON, options, grunt.log.writeln, grunt.log.error );
- } );
- grunt.registerTask( 'dev-status', function() {
- const options = getOptions( this );
- pluginStatusTask( ckeditor5Path, packageJSON, options, grunt.log.writeln, grunt.log.error );
- } );
- function getOptions( context ) {
- const options = {
- workspaceRoot: '..'
- };
- return context.options( options );
- }
- };
|