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

Commit

Permalink
Add a post install 'cleanup' for thirdparty dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ficristo committed Jan 3, 2017
1 parent 4be271e commit f275153
Show file tree
Hide file tree
Showing 11 changed files with 333 additions and 327 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -10,6 +10,9 @@ Thumbs.db
# ignore node_modules inside src
/src/node_modules

#ignore file copied from node_modules to src/thirdparty
/src/thirdparty/CodeMirror

# ignore compiled files
/dist
/src/.index.html
Expand Down
42 changes: 19 additions & 23 deletions Gruntfile.js
Expand Up @@ -65,8 +65,6 @@ module.exports = function (grunt) {
cwd: 'src/',
src: [
'nls/{,*/}*.js',
'package.json',
'npm-shrinkwrap.json',
'xorigin.js',
'dependencies.js',
'thirdparty/requirejs/require.js',
Expand Down Expand Up @@ -105,13 +103,7 @@ module.exports = function (grunt) {
'!extensions/default/*/thirdparty/**/*.htm{,l}',
'extensions/dev/*',
'extensions/samples/**/*',
'thirdparty/CodeMirror/addon/{,*/}*',
'thirdparty/CodeMirror/keymap/{,*/}*',
'thirdparty/CodeMirror/lib/{,*/}*',
'thirdparty/CodeMirror/mode/{,*/}*',
'!thirdparty/CodeMirror/mode/**/*.html',
'!thirdparty/CodeMirror/**/*test.js',
'thirdparty/CodeMirror/theme/{,*/}*',
'thirdparty/CodeMirror/**',
'thirdparty/i18n/*.js',
'thirdparty/text/*.js'
]
Expand All @@ -124,6 +116,22 @@ module.exports = function (grunt) {
src: ['jsTreeTheme.css', 'fonts/{,*/}*.*', 'images/*', 'brackets.min.css*']
}
]
},
thirdparty: {
files: [
{
expand: true,
dest: 'src/thirdparty/CodeMirror',
cwd: 'src/node_modules/codemirror',
src: [
'addon/{,*/}*',
'keymap/{,*/}*',
'lib/{,*/}*',
'mode/{,*/}*',
'theme/{,*/}*',
]
}
]
}
},
cleanempty: {
Expand Down Expand Up @@ -295,19 +303,7 @@ module.exports = function (grunt) {
'spec' : '../test/spec',
'text' : 'thirdparty/text/text',
'i18n' : 'thirdparty/i18n/i18n'
},
map: {
"*": {
"thirdparty/CodeMirror2": "thirdparty/CodeMirror"
}
},
packages: [
{
name: "thirdparty/CodeMirror",
location: "node_modules/codemirror",
main: "lib/codemirror"
}
]
}
}
}
}
Expand Down Expand Up @@ -355,7 +351,7 @@ module.exports = function (grunt) {
'concat',
/*'cssmin',*/
/*'uglify',*/
'copy',
'copy:dist',
'npm-install',
'cleanempty',
'usemin',
Expand Down
286 changes: 286 additions & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Expand Up @@ -12,6 +12,11 @@
"branch": "",
"SHA": ""
},
"dependencies": {
"anymatch": "1.3.0",
"chokidar": "1.6.0",
"lodash": "4.15.0"
},
"devDependencies": {
"glob": "7.0.6",
"grunt": "0.4.5",
Expand Down
5 changes: 5 additions & 0 deletions src/config.json
Expand Up @@ -35,6 +35,11 @@
"branch": "",
"SHA": ""
},
"dependencies": {
"anymatch": "1.3.0",
"chokidar": "1.6.0",
"lodash": "4.15.0"
},
"devDependencies": {
"glob": "7.0.6",
"grunt": "0.4.5",
Expand Down

0 comments on commit f275153

Please sign in to comment.