-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.js
More file actions
51 lines (49 loc) · 1 KB
/
Copy pathbuild.js
File metadata and controls
51 lines (49 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
'use strict'
const map = {
'Localize.min.js': ['Localize.js'],
'ImageAndDetail.min.js': [
'ImageManager.js',
'Detail.js',
'ImageFileCache.js',
],
'webxoss.js': [
'./lib/util.js',
'./lib/bugfix.js',
'MessageBox.js',
'IO.js',
'Card.js',
'CardBitmap.js',
'StateBitmap.js',
'Style.js',
'Zone.js',
'Game.js',
'ZonePosition.js',
'Button.js',
'ButtonList.js',
'Selector.js',
'Dialog.js',
'GameBackground.js',
'FakeSocket.js',
'GameAudio.js',
'ChatManager.js',
'RoomManager.js',
],
// DeckEditor
'./DeckEditor/Deck.min.js': [
'./lib/util.js',
'./DeckManager.js',
'./DeckEditor/Rules.js',
'./DeckEditor/Searcher.js',
],
'./DeckEditor/DeckEditor.js': [
'./lib/util.js',
'./DeckEditor/editor.js',
],
}
const fs = require('fs')
const uglify = require('uglify-js')
Object.keys(map).forEach(key => {
let code = uglify.minify(map[key]).code
fs.writeFileSync(key, code)
console.log(`${key} done.`)
})