Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 0081406

Browse files
author
Marcel Gerber
committed
Exclude more unneeded files in dist builds
1 parent 1e1feb9 commit 0081406

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

Gruntfile.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function (grunt) {
2525
'use strict';
2626

2727
// load dependencies
28-
require('load-grunt-tasks')(grunt, {pattern: ['grunt-contrib-*', 'grunt-targethtml', 'grunt-usemin']});
28+
require('load-grunt-tasks')(grunt, {pattern: ['grunt-contrib-*', 'grunt-targethtml', 'grunt-usemin', 'grunt-cleanempty']});
2929
grunt.loadTasks('tasks');
3030

3131
// Project configuration.
@@ -72,6 +72,8 @@ module.exports = function (grunt) {
7272
src: [
7373
'extensibility/node/**',
7474
'!extensibility/node/spec/**',
75+
'!extensibility/node/node_modules/**/{test,tst}/**/*',
76+
'!extensibility/node/node_modules/**/examples/**/*',
7577
'filesystem/impls/appshell/node/**',
7678
'!filesystem/impls/appshell/node/spec/**'
7779
]
@@ -82,15 +84,21 @@ module.exports = function (grunt) {
8284
dest: 'dist/',
8385
cwd: 'src/',
8486
src: [
87+
'extensions/default/**/*',
8588
'!extensions/default/*/unittest-files/**/*',
8689
'!extensions/default/*/unittests.js',
87-
'extensions/default/*/**/*',
90+
'!extensions/default/{*/thirdparty,**/node_modules}/**/test/**/*',
91+
'!extensions/default/{*/thirdparty,**/node_modules}/**/doc/**/*',
92+
'!extensions/default/{*/thirdparty,**/node_modules}/**/examples/**/*',
93+
'!extensions/default/*/thirdparty/**/*.htm{,l}',
8894
'extensions/dev/*',
8995
'extensions/samples/**/*',
9096
'thirdparty/CodeMirror2/addon/{,*/}*',
9197
'thirdparty/CodeMirror2/keymap/{,*/}*',
9298
'thirdparty/CodeMirror2/lib/{,*/}*',
9399
'thirdparty/CodeMirror2/mode/{,*/}*',
100+
'!thirdparty/CodeMirror2/mode/**/*.html',
101+
'!thirdparty/CodeMirror2/**/*test.js',
94102
'thirdparty/CodeMirror2/theme/{,*/}*',
95103
'thirdparty/i18n/*.js',
96104
'thirdparty/text/*.js'
@@ -106,6 +114,13 @@ module.exports = function (grunt) {
106114
]
107115
}
108116
},
117+
cleanempty: {
118+
options: {
119+
force: true,
120+
files: false
121+
},
122+
src: ['dist/**/*'],
123+
},
109124
less: {
110125
dist: {
111126
files: {
@@ -330,6 +345,7 @@ module.exports = function (grunt) {
330345
/*'cssmin',*/
331346
/*'uglify',*/
332347
'copy',
348+
'cleanempty',
333349
'usemin',
334350
'build-config'
335351
]);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"q": "0.9.2",
3838
"semver": "^4.1.0",
3939
"jshint": "2.1.4",
40-
"xmldoc": "^0.1.2"
40+
"xmldoc": "^0.1.2",
41+
"grunt-cleanempty": "1.0.3"
4142
},
4243
"scripts": {
4344
"postinstall": "grunt install",

src/config.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"jasmine-node": "1.11.0",
4040
"grunt-jasmine-node": "0.1.0",
4141
"grunt-cli": "0.1.9",
42-
"phantomjs": "1.9.11",
42+
"phantomjs": "1.9.13",
4343
"grunt-lib-phantomjs": "0.3.0",
4444
"grunt-contrib-jshint": "0.6.0",
4545
"grunt-contrib-watch": "0.4.3",
@@ -59,7 +59,8 @@
5959
"q": "0.9.2",
6060
"semver": "^4.1.0",
6161
"jshint": "2.1.4",
62-
"xmldoc": "^0.1.2"
62+
"xmldoc": "^0.1.2",
63+
"grunt-cleanempty": "1.0.3"
6364
},
6465
"scripts": {
6566
"postinstall": "grunt install",

0 commit comments

Comments
 (0)