Skip to content

Commit ef6e0d8

Browse files
committed
chore(build): remove obsolete html.js, copy.js, srcFolderInsertion.
1 parent db97d73 commit ef6e0d8

File tree

4 files changed

+0
-171
lines changed

4 files changed

+0
-171
lines changed

gulpfile.js

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ var path = require('path');
1010
var gulpTraceur = require('./tools/transpiler/gulp-traceur');
1111
var clean = require('./tools/build/clean');
1212
var transpile = require('./tools/build/transpile');
13-
var html = require('./tools/build/html');
1413
var pubget = require('./tools/build/pubget');
1514
var linknodemodules = require('./tools/build/linknodemodules');
1615
var pubbuild = require('./tools/build/pubbuild');
1716
var dartanalyzer = require('./tools/build/dartanalyzer');
1817
var jsserve = require('./tools/build/jsserve');
1918
var pubserve = require('./tools/build/pubserve');
2019
var rundartpackage = require('./tools/build/rundartpackage');
21-
var copy = require('./tools/build/copy');
2220
var file2moduleName = require('./tools/build/file2modulename');
2321
var karma = require('karma').server;
2422
var minimist = require('minimist');
@@ -94,22 +92,6 @@ var COMMON_PACKAGE_JSON = {
9492
}
9593
};
9694

97-
var SRC_FOLDER_INSERTION = {
98-
js: {
99-
'**': ''
100-
},
101-
dart: {
102-
'**': 'lib',
103-
'*/test/**': '',
104-
'benchmarks/**': 'web',
105-
'benchmarks/test/**': '',
106-
'benchmarks_external/**': 'web',
107-
'benchmarks_external/test/**': '',
108-
'example*/**': 'web',
109-
'example*/test/**': ''
110-
}
111-
};
112-
11395
var CONFIG = {
11496
dest: {
11597
js: {
@@ -128,7 +110,6 @@ var CONFIG = {
128110
dart: 'dist/dart',
129111
docs: 'dist/docs'
130112
},
131-
srcFolderInsertion: SRC_FOLDER_INSERTION,
132113
transpile: {
133114
src: {
134115
js: ['modules/**/*.js', 'modules/**/*.es6'],
@@ -178,19 +159,6 @@ var CONFIG = {
178159
pipes: {}
179160
}
180161
},
181-
dart: {
182-
src: [
183-
'modules/**/*.md', '!modules/**/*.js.md', 'modules/**/*.png', 'modules/**/*.html',
184-
'modules/**/*.dart', 'modules/*/pubspec.yaml', 'modules/**/*.css', '!modules/**/e2e_test/**'
185-
],
186-
pipes: {
187-
'**/*.dart': util.insertSrcFolder(gulpPlugins, SRC_FOLDER_INSERTION.dart),
188-
'**/*.dart.md': gulpPlugins.rename(function(file) {
189-
file.basename = file.basename.substring(0, file.basename.lastIndexOf('.'));
190-
}),
191-
'**/pubspec.yaml': gulpPlugins.template({ 'packageJson': COMMON_PACKAGE_JSON })
192-
}
193-
}
194162
},
195163
multicopy: {
196164
js: {
@@ -298,36 +266,6 @@ gulp.task('build/tree.dart', ['build.broccoli.tools'], function() {
298266
return getBroccoli().forDartTree().buildOnce();
299267
});
300268

301-
// ------------
302-
// html
303-
304-
gulp.task('build/html.dart', html(gulp, gulpPlugins, {
305-
src: CONFIG.html.src.dart,
306-
dest: CONFIG.dest.dart,
307-
srcFolderInsertion: CONFIG.srcFolderInsertion.dart,
308-
scriptsPerFolder: CONFIG.html.scriptsPerFolder.dart
309-
}));
310-
311-
// ------------
312-
// copy
313-
314-
gulp.task('build/copy.dart', copy.copy(gulp, gulpPlugins, {
315-
src: CONFIG.copy.dart.src,
316-
pipes: CONFIG.copy.dart.pipes,
317-
dest: CONFIG.dest.dart
318-
}));
319-
320-
321-
// ------------
322-
// multicopy
323-
324-
gulp.task('build/multicopy.dart', copy.multicopy(gulp, gulpPlugins, {
325-
src: CONFIG.multicopy.dart.src,
326-
pipes: CONFIG.multicopy.dart.pipes,
327-
exclude: CONFIG.multicopy.dart.exclude,
328-
dest: CONFIG.dest.dart
329-
}));
330-
331269
// ------------
332270
// pubspec
333271

@@ -577,7 +515,6 @@ gulp.task('test.unit.cjs', ['build.js.cjs'], function () {
577515
var relPath = path.relative(__dirname, event.path).replace(/\\/g, "/");
578516
gulp.src(relPath)
579517
.pipe(gulpPlugins.rename({extname: '.'+ 'js'}))
580-
.pipe(util.insertSrcFolder(gulpPlugins, CONFIG.srcFolderInsertion.js))
581518
.pipe(gulpTraceur(CONFIG.transpile.options.js.cjs, file2moduleName))
582519
.pipe(transformCJSTests())
583520
.pipe(gulp.dest(CONFIG.dest.js.cjs + path.dirname(relPath.replace("modules", ""))));

tools/build/copy.js

Lines changed: 0 additions & 46 deletions
This file was deleted.

tools/build/html.js

Lines changed: 0 additions & 49 deletions
This file was deleted.

tools/build/util.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var Q = require('q');
77
module.exports = {
88
processToPromise: processToPromise,
99
streamToPromise: streamToPromise,
10-
insertSrcFolder: insertSrcFolder,
1110
filterByFile: filterByFile,
1211
subDirs: subDirs,
1312
forEachSubDir: forEachSubDir,
@@ -79,15 +78,3 @@ function filterByFile(pathMapping, folder) {
7978
throw new Error('No entry for folder '+folder+' found in '+JSON.stringify(pathMapping));
8079
}
8180
}
82-
83-
function insertSrcFolder(plugins, srcFolderInsertion) {
84-
return plugins.rename(function(file) {
85-
var folder = file.dirname;
86-
var srcDir = filterByFile(srcFolderInsertion, path.join(folder, file.basename));
87-
if (srcDir) {
88-
var folderParts = file.dirname.split(path.sep);
89-
folder = [folderParts[0], srcDir].concat(folderParts.slice(1)).join(path.sep);
90-
}
91-
file.dirname = folder;
92-
});
93-
}

0 commit comments

Comments
 (0)