Skip to content

Commit

Permalink
Clean-up unneeded parts of Gruntfile, update uglify dep
Browse files Browse the repository at this point in the history
  • Loading branch information
humphd committed Feb 15, 2017
1 parent cf93ccc commit 368b12e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 35 deletions.
35 changes: 2 additions & 33 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ module.exports = function (grunt) {
'xorigin.js',
'dependencies.js',
'thirdparty/requirejs/require.js',
'LiveDevelopment/MultiBrowserImpl/transports/**/*.js',
'LiveDevelopment/MultiBrowserImpl/launchers/**/*.js',

/* extensions and CodeMirror modes */
'!extensions/default/*/unittests.js',
Expand Down Expand Up @@ -139,8 +137,6 @@ module.exports = function (grunt) {
'thirdparty/slowparse/locale/*',
'thirdparty/github-markdown.css',
'LiveDevelopment/launch.html',
'LiveDevelopment/MultiBrowserImpl/transports/**',
'LiveDevelopment/MultiBrowserImpl/launchers/**',
'hosted.*'
]
},
Expand Down Expand Up @@ -520,30 +516,6 @@ module.exports = function (grunt) {
}
},

// Reduce the size of Tern.js def files by stripping !doc and !url fields,
// Which seem to be unused in Brackets. Turn something like this:
//
// "assign": {
// "!type": "fn(url: string)",
// "!url": "https://developer.mozilla.org/en/docs/DOM/window.location",
// "!doc": "Load the document at the provided URL."
// }
//
// into this:
//
// "assign": {
// "!type": "fn(url: string)"
// }
replace: {
ternDefs: {
src: ['src/extensions/default/JavaScriptCodeHints/bramble-tern-defs/*.json'],
dest: 'dist/extensions/default/JavaScriptCodeHints/bramble-tern-defs/',
replacements: [{
from: /,?\n\s*"!url":[^\n]+\n(\s*"!doc":[^\n]+\n)?/g,
to: ''
}]
}
},
exec: {
localize: 'node scripts/properties2js',
'localize-dist': 'node scripts/properties2js dist',
Expand All @@ -560,9 +532,6 @@ module.exports = function (grunt) {
// Load postcss
grunt.loadNpmTasks('grunt-postcss');

// Load text-replace
grunt.loadNpmTasks('grunt-text-replace');

// Bramble-task: smartCheckout
// Checks out to the branch provided as a target.
// Takes:
Expand Down Expand Up @@ -660,7 +629,8 @@ module.exports = function (grunt) {
/*'cssmin',*/
/*'uglify',*/
'copy:dist',
// 'npm-install',
/* XXXBramble: we skip this, since we don't use any of the node_modules in Bramble.
'npm-install', */
'cleanempty',
'usemin',
'build-config'
Expand All @@ -669,7 +639,6 @@ module.exports = function (grunt) {
// task: build dist/ for browser
grunt.registerTask('build-browser', [
'build',
'replace:ternDefs',
'requirejs:iframe',
'exec:localize-dist',
'uglify'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"grunt-postcss": "0.3.0",
"grunt-contrib-less": "1.4.0",
"grunt-contrib-requirejs": "0.4.1",
"grunt-contrib-uglify": "0.2.0",
"grunt-contrib-uglify": "2.1.0",
"grunt-git": "^0.3.4",
"grunt-npm": "git://github.com/sedge/grunt-npm.git#branchcheck",
"grunt-shell": "^1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"grunt-postcss": "0.3.0",
"grunt-contrib-less": "1.4.0",
"grunt-contrib-requirejs": "0.4.1",
"grunt-contrib-uglify": "0.2.0",
"grunt-contrib-uglify": "2.1.0",
"grunt-git": "^0.3.4",
"grunt-npm": "git://github.com/sedge/grunt-npm.git#branchcheck",
"grunt-shell": "^1.1.2",
Expand Down

0 comments on commit 368b12e

Please sign in to comment.