-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from ckeditor/t/296
Other: Removed gulp dependency across the whole project. Closes #296. Now all packages use only npm scripts. Depending on usage you might either create a `"script"` entry in `pacakge.json` to invoke bin executables or require the library into a script. * Package `ckeditor5-dev-env` exposes new `translations` binary. * Package `ckeditor5-dev-tests` exposes new `test:manual` binary. * Removed `gulp-jsdoc3` from `ckeditor5-dev-docs`. Now `jsdoc` is invoked directly. * Removed `options` param from logger methods. Logger no longer uses `gutil.log` method. BREAKING CHANGE: Gulp tasks were removed. New npm scripts were introduced.
- Loading branch information
Showing
26 changed files
with
316 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const chalk = require( 'chalk' ); | ||
|
||
const task = process.argv[ 2 ]; | ||
|
||
const tasks = { | ||
/** | ||
* Collects translation strings ( from `t()` calls ) and stores them in ckeditor5/build/.transifex directory. | ||
*/ | ||
collect() { | ||
const collectTranslations = require( './../lib/translations/collect' ); | ||
|
||
collectTranslations(); | ||
}, | ||
|
||
/** | ||
* Uploads translation strings on the Transifex server. | ||
* | ||
* @returns {Promise} | ||
*/ | ||
upload() { | ||
const uploadTranslations = require( './../lib/translations/upload' ); | ||
const getToken = require( './../lib/translations/gettoken' ); | ||
|
||
return getToken() | ||
.then( credentials => uploadTranslations( credentials ) ); | ||
}, | ||
|
||
/** | ||
* Download translations from the Transifex server. | ||
* | ||
* @returns {Promise} | ||
*/ | ||
download() { | ||
const downloadTranslations = require( './../lib/translations/download' ); | ||
const getToken = require( './../lib/translations/gettoken' ); | ||
|
||
return getToken() | ||
.then( credentials => downloadTranslations( credentials ) ); | ||
} | ||
}; | ||
|
||
const taskNames = Object.keys( tasks ); | ||
|
||
if ( !task || !tasks[ task ] ) { | ||
console.log( `Please provide valid task name. Available tasks: ${ taskNames.map( task => chalk.bold( task ) ).join( ', ' ) }.` ); | ||
|
||
process.exit( 1 ); | ||
} | ||
|
||
tasks[ task ](); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.