From d6cbc710bdeb65057e3aa4dfd8ac691c4e6a6a71 Mon Sep 17 00:00:00 2001 From: Cheng Lou Date: Thu, 31 Oct 2013 14:44:19 -0400 Subject: [PATCH] remove examples/wrapup Apparently it's no longer relevant. --- Gruntfile.js | 6 ----- examples/wrapup/index.html | 54 -------------------------------------- grunt/config/compress.js | 4 +-- grunt/config/wrapup.js | 31 ---------------------- grunt/tasks/wrapup.js | 34 ------------------------ package.json | 1 - 6 files changed, 2 insertions(+), 128 deletions(-) delete mode 100644 examples/wrapup/index.html delete mode 100644 grunt/config/wrapup.js delete mode 100644 grunt/tasks/wrapup.js diff --git a/Gruntfile.js b/Gruntfile.js index fba98aab27..6ecc654e32 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,7 +3,6 @@ var exec = require('child_process').exec; var jsxTask = require('./grunt/tasks/jsx'); var browserifyTask = require('./grunt/tasks/browserify'); -var wrapupTask = require('./grunt/tasks/wrapup'); var populistTask = require('./grunt/tasks/populist'); var phantomTask = require('./grunt/tasks/phantom'); var npmTask = require('./grunt/tasks/npm'); @@ -16,7 +15,6 @@ module.exports = function(grunt) { copy: require('./grunt/config/copy'), jsx: require('./grunt/config/jsx/jsx'), browserify: require('./grunt/config/browserify'), - wrapup: require('./grunt/config/wrapup'), populist: require('./grunt/config/populist'), phantom: require('./grunt/config/phantom'), npm: require('./grunt/config/npm'), @@ -42,10 +40,6 @@ module.exports = function(grunt) { // Our own browserify-based tasks to build a single JS file build grunt.registerMultiTask('browserify', browserifyTask); - // Similar to Browserify, use WrapUp to generate single JS file that - // defines global variables instead of using require. - grunt.registerMultiTask('wrapup', wrapupTask); - grunt.registerMultiTask('populist', populistTask); grunt.registerMultiTask('phantom', phantomTask); diff --git a/examples/wrapup/index.html b/examples/wrapup/index.html deleted file mode 100644 index eb17ca6ce4..0000000000 --- a/examples/wrapup/index.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Basic Example (WrapUp) - - - -

Basic Example (WrapUp)

-
-

- To install React, follow the instructions on - GitHub. -

-

- If you can see this, React is not working right. - Make sure to run grunt. -

-
-

Example Details

- -

-

-

- Learn more at - facebook.github.io/react. -

- - - - diff --git a/grunt/config/compress.js b/grunt/config/compress.js index 91d1aa1bfd..52ebd53f86 100644 --- a/grunt/config/compress.js +++ b/grunt/config/compress.js @@ -10,7 +10,7 @@ module.exports = { archive: './build/react-' + version + '.zip' }, files: [ - {cwd: './build/starter', src: ['**', '!examples/wrapup/**'], dest: 'react-' + version + '/'} + {cwd: './build/starter', src: ['**'], dest: 'react-' + version + '/'} ] } -}; \ No newline at end of file +}; diff --git a/grunt/config/wrapup.js b/grunt/config/wrapup.js deleted file mode 100644 index 3a8c5f7f02..0000000000 --- a/grunt/config/wrapup.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var grunt = require('grunt'); -var UglifyJS = require('uglify-js'); - -function minify(src) { - return UglifyJS.minify(src, { fromString: true }).code; -} - -// Our basic config which we'll add to to make our other builds -var basic = { - outfile: './build/react-global.js', - requires: { - React: './build/modules/React.js' - }, - debug: true -}; - -module.exports = { - basic: basic -}; - -// Create minified versions of each build -for (var buildName in module.exports) { - var build = module.exports[buildName]; - module.exports[buildName + '-min'] = grunt.util._.merge({}, build, { - outfile: build.outfile.replace('.js', '.min.js'), - debug: false, - after: minify - }); -} diff --git a/grunt/tasks/wrapup.js b/grunt/tasks/wrapup.js deleted file mode 100644 index f6be3be3b2..0000000000 --- a/grunt/tasks/wrapup.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var grunt = require('grunt'); - -module.exports = function() { - var wrup = require('wrapup')(); - var config = this.data; - - // This task is async... - var done = this.async(); - - config.requires = config.requires || {}; - - Object.keys(config.requires).forEach(function(id) { - wrup = wrup.require(id, config.requires[id]); - }); - - wrup.options({ - sourcemap: config.debug && config.outfile.replace(/\.js$/i, ".map") - }).up(function(err, src) { - if (err) { - grunt.log.error(err); - done(); - } - - // TODO: post processing hooks, scope? - if (config.after) { - src = config.after.call(this, src); - } - - grunt.file.write(config.outfile, src); - done(); - }); -}; diff --git a/package.json b/package.json index 8fc831a86f..e86eef0a15 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ }, "devDependencies": { "browserify": "~2.34.1", - "wrapup": "~0.12.0", "populist": "~0.1.4", "grunt-cli": "~0.1.9", "grunt": "~0.4.1",