Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/201687
Change subject: build: Use grunt-contrib-copy instead of our own implementation
......................................................................
build: Use grunt-contrib-copy instead of our own implementation
Minor technical debt. But important now because it blocks Ic6cdc9ac1.
Change-Id: Iac5e4340444791f48548a639c7feba20d004082e
---
M Gruntfile.js
D build/tasks/copy.js
M package.json
3 files changed, 4 insertions(+), 22 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/87/201687/1
diff --git a/Gruntfile.js b/Gruntfile.js
index 4226d22..b098087 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -9,6 +9,7 @@
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
+ grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
@@ -79,7 +80,8 @@
copy: {
i18n: {
src: 'i18n/*.json',
- dest: 'dist/'
+ dest: 'dist/',
+ expand: true
}
},
buildloader: {
diff --git a/build/tasks/copy.js b/build/tasks/copy.js
deleted file mode 100644
index b4592d1..0000000
--- a/build/tasks/copy.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*!
- * Build a distribution file
- *
- * Concatenates the list of input files, and performs
- * version/date placeholder replacements.
- */
-
-/*jshint node:true */
-module.exports = function ( grunt ) {
-
- grunt.registerMultiTask( 'copy', function () {
- var destDir = this.data.dest + '/',
- strip = this.data.strip;
- this.filesSrc.forEach( function ( fileName ) {
- var destFileName = strip ? fileName.replace( strip, ''
) : fileName;
- grunt.file.copy( fileName, destDir + destFileName );
- } );
- grunt.log.writeln( 'Copied ' + this.filesSrc.length + ' files.'
);
- } );
-
-};
diff --git a/package.json b/package.json
index 346cc89..c9d926f 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"grunt-banana-checker": "0.2.1",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-concat": "0.5.1",
+ "grunt-contrib-copy": "0.8.0",
"grunt-contrib-csslint": "0.4.0",
"grunt-contrib-jshint": "0.11.0",
"grunt-contrib-watch": "0.6.1",
--
To view, visit https://gerrit.wikimedia.org/r/201687
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac5e4340444791f48548a639c7feba20d004082e
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits