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

Commit 873146d

Browse files
authored
Merge pull request #13020 from ficristo/npm-thirdparty
Add a post install 'cleanup' for thirdparty dependencies
2 parents 6be6e29 + f275153 commit 873146d

File tree

11 files changed

+333
-327
lines changed

11 files changed

+333
-327
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Thumbs.db
1010
# ignore node_modules inside src
1111
/src/node_modules
1212

13+
#ignore file copied from node_modules to src/thirdparty
14+
/src/thirdparty/CodeMirror
15+
1316
# ignore compiled files
1417
/dist
1518
/src/.index.html

Gruntfile.js

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ module.exports = function (grunt) {
6565
cwd: 'src/',
6666
src: [
6767
'nls/{,*/}*.js',
68-
'package.json',
69-
'npm-shrinkwrap.json',
7068
'xorigin.js',
7169
'dependencies.js',
7270
'thirdparty/requirejs/require.js',
@@ -105,13 +103,7 @@ module.exports = function (grunt) {
105103
'!extensions/default/*/thirdparty/**/*.htm{,l}',
106104
'extensions/dev/*',
107105
'extensions/samples/**/*',
108-
'thirdparty/CodeMirror/addon/{,*/}*',
109-
'thirdparty/CodeMirror/keymap/{,*/}*',
110-
'thirdparty/CodeMirror/lib/{,*/}*',
111-
'thirdparty/CodeMirror/mode/{,*/}*',
112-
'!thirdparty/CodeMirror/mode/**/*.html',
113-
'!thirdparty/CodeMirror/**/*test.js',
114-
'thirdparty/CodeMirror/theme/{,*/}*',
106+
'thirdparty/CodeMirror/**',
115107
'thirdparty/i18n/*.js',
116108
'thirdparty/text/*.js'
117109
]
@@ -124,6 +116,22 @@ module.exports = function (grunt) {
124116
src: ['jsTreeTheme.css', 'fonts/{,*/}*.*', 'images/*', 'brackets.min.css*']
125117
}
126118
]
119+
},
120+
thirdparty: {
121+
files: [
122+
{
123+
expand: true,
124+
dest: 'src/thirdparty/CodeMirror',
125+
cwd: 'src/node_modules/codemirror',
126+
src: [
127+
'addon/{,*/}*',
128+
'keymap/{,*/}*',
129+
'lib/{,*/}*',
130+
'mode/{,*/}*',
131+
'theme/{,*/}*',
132+
]
133+
}
134+
]
127135
}
128136
},
129137
cleanempty: {
@@ -295,19 +303,7 @@ module.exports = function (grunt) {
295303
'spec' : '../test/spec',
296304
'text' : 'thirdparty/text/text',
297305
'i18n' : 'thirdparty/i18n/i18n'
298-
},
299-
map: {
300-
"*": {
301-
"thirdparty/CodeMirror2": "thirdparty/CodeMirror"
302-
}
303-
},
304-
packages: [
305-
{
306-
name: "thirdparty/CodeMirror",
307-
location: "node_modules/codemirror",
308-
main: "lib/codemirror"
309-
}
310-
]
306+
}
311307
}
312308
}
313309
}
@@ -355,7 +351,7 @@ module.exports = function (grunt) {
355351
'concat',
356352
/*'cssmin',*/
357353
/*'uglify',*/
358-
'copy',
354+
'copy:dist',
359355
'npm-install',
360356
'cleanempty',
361357
'usemin',

npm-shrinkwrap.json

Lines changed: 286 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
"branch": "",
1313
"SHA": ""
1414
},
15+
"dependencies": {
16+
"anymatch": "1.3.0",
17+
"chokidar": "1.6.0",
18+
"lodash": "4.15.0"
19+
},
1520
"devDependencies": {
1621
"glob": "7.0.6",
1722
"grunt": "0.4.5",

src/config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"branch": "",
3636
"SHA": ""
3737
},
38+
"dependencies": {
39+
"anymatch": "1.3.0",
40+
"chokidar": "1.6.0",
41+
"lodash": "4.15.0"
42+
},
3843
"devDependencies": {
3944
"glob": "7.0.6",
4045
"grunt": "0.4.5",

0 commit comments

Comments
 (0)