forked from Antriel/phaser3-docs
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheader.js
More file actions
24 lines (18 loc) · 687 Bytes
/
header.js
File metadata and controls
24 lines (18 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var fs = require('fs');
var dirTree = require('directory-tree');
var prependFile = require('prepend-file');
var rootDir = '../phaser/src/';
var txt = `/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
`;
var filteredTree = dirTree(rootDir, { extensions: /\.js$/ }, (item, PATH) => {
var where = item.path.replace('..\\phaser\\src\\', '');
if (where.substr(0, 21) !== 'physics\\matter-js\\lib' && where.substr(0, 9) !== 'polyfills')
{
console.log(item.path);
prependFile.sync(item.path, txt);
}
});