@samitouri / QOS-React-2 / commits / d6cbc710bd

remove examples/wrapup

Apparently it's no longer relevant.

Cheng Lou committed Oct 31, 2013 at 14:44 UTC d6cbc710bdeb65057e3aa4dfd8ac691c4e6a6a71
6 files changed +2 -128
Gruntfile.js
-6
@@ -3,7 +3,6 @@
3 var exec = require('child_process').exec;
4 var jsxTask = require('./grunt/tasks/jsx');
5 var browserifyTask = require('./grunt/tasks/browserify');
6 -var wrapupTask = require('./grunt/tasks/wrapup');
6 var populistTask = require('./grunt/tasks/populist');
7 var phantomTask = require('./grunt/tasks/phantom');
8 var npmTask = require('./grunt/tasks/npm');
@@ -16,7 +15,6 @@ module.exports = function(grunt) {
15 copy: require('./grunt/config/copy'),
16 jsx: require('./grunt/config/jsx/jsx'),
17 browserify: require('./grunt/config/browserify'),
19 - wrapup: require('./grunt/config/wrapup'),
18 populist: require('./grunt/config/populist'),
19 phantom: require('./grunt/config/phantom'),
20 npm: require('./grunt/config/npm'),
@@ -42,10 +40,6 @@ module.exports = function(grunt) {
40 // Our own browserify-based tasks to build a single JS file build
41 grunt.registerMultiTask('browserify', browserifyTask);
42
45 - // Similar to Browserify, use WrapUp to generate single JS file that
46 - // defines global variables instead of using require.
47 - grunt.registerMultiTask('wrapup', wrapupTask);
48 -
43 grunt.registerMultiTask('populist', populistTask);
44
45 grunt.registerMultiTask('phantom', phantomTask);
examples/wrapup/index.html deleted
-54
@@ -1,54 +0,0 @@
1 -<!DOCTYPE html>
2 -<html>
3 - <head>
4 - <meta http-equiv='Content-type' content='text/html; charset=utf-8'>
5 - <title>Basic Example (WrapUp)</title>
6 - <link rel="stylesheet" href="../shared/css/base.css" />
7 - </head>
8 - <body>
9 - <h1>Basic Example (WrapUp)</h1>
10 - <div id="container">
11 - <p>
12 - To install React, follow the instructions on
13 - <a href="http://www.github.com/facebook/react/">GitHub</a>.
14 - </p>
15 - <p>
16 - If you can see this, React is not working right.
17 - Make sure to run <code>grunt</code>.
18 - </p>
19 - </div>
20 - <h4>Example Details</h4>
21 - <ul>
22 - <li>
23 - This is built with
24 - <a href="https://github.com/mootools/wrapup">WrapUp</a>.
25 - </li>
26 - </ul>
27 - <p>
28 - </p>
29 - <p>
30 - Learn more at
31 - <a href="http://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
32 - </p>
33 - <script src="../../build/react.js"></script>
34 - <script>
35 - var ExampleApplication = React.createClass({
36 - render: function() {
37 - var elapsed = Math.round(this.props.elapsed / 100);
38 - var seconds = elapsed / 10 + (elapsed % 10 ? '' : '.0' );
39 - var message =
40 - 'React has been successfully running for ' + seconds + ' seconds.';
41 -
42 - return React.DOM.p(null, message);
43 - }
44 - });
45 - var start = new Date().getTime();
46 - setInterval(function() {
47 - React.renderComponent(
48 - ExampleApplication({elapsed: new Date().getTime() - start}),
49 - document.getElementById('container')
50 - );
51 - }, 50);
52 - </script>
53 - </body>
54 -</html>
grunt/config/compress.js
+2 -2
@@ -10,7 +10,7 @@ module.exports = {
10 archive: './build/react-' + version + '.zip'
11 },
12 files: [
13 - {cwd: './build/starter', src: ['**', '!examples/wrapup/**'], dest: 'react-' + version + '/'}
13 + {cwd: './build/starter', src: ['**'], dest: 'react-' + version + '/'}
14 ]
15 }
16 -};
\ No newline at end of file
16 +};
grunt/config/wrapup.js deleted
-31
@@ -1,31 +0,0 @@
1 -'use strict';
2 -
3 -var grunt = require('grunt');
4 -var UglifyJS = require('uglify-js');
5 -
6 -function minify(src) {
7 - return UglifyJS.minify(src, { fromString: true }).code;
8 -}
9 -
10 -// Our basic config which we'll add to to make our other builds
11 -var basic = {
12 - outfile: './build/react-global.js',
13 - requires: {
14 - React: './build/modules/React.js'
15 - },
16 - debug: true
17 -};
18 -
19 -module.exports = {
20 - basic: basic
21 -};
22 -
23 -// Create minified versions of each build
24 -for (var buildName in module.exports) {
25 - var build = module.exports[buildName];
26 - module.exports[buildName + '-min'] = grunt.util._.merge({}, build, {
27 - outfile: build.outfile.replace('.js', '.min.js'),
28 - debug: false,
29 - after: minify
30 - });
31 -}
grunt/tasks/wrapup.js deleted
-34
@@ -1,34 +0,0 @@
1 -'use strict';
2 -
3 -var grunt = require('grunt');
4 -
5 -module.exports = function() {
6 - var wrup = require('wrapup')();
7 - var config = this.data;
8 -
9 - // This task is async...
10 - var done = this.async();
11 -
12 - config.requires = config.requires || {};
13 -
14 - Object.keys(config.requires).forEach(function(id) {
15 - wrup = wrup.require(id, config.requires[id]);
16 - });
17 -
18 - wrup.options({
19 - sourcemap: config.debug && config.outfile.replace(/\.js$/i, ".map")
20 - }).up(function(err, src) {
21 - if (err) {
22 - grunt.log.error(err);
23 - done();
24 - }
25 -
26 - // TODO: post processing hooks, scope?
27 - if (config.after) {
28 - src = config.after.call(this, src);
29 - }
30 -
31 - grunt.file.write(config.outfile, src);
32 - done();
33 - });
34 -};
package.json
-1
@@ -42,7 +42,6 @@
42 },
43 "devDependencies": {
44 "browserify": "~2.34.1",
45 - "wrapup": "~0.12.0",
45 "populist": "~0.1.4",
46 "grunt-cli": "~0.1.9",
47 "grunt": "~0.4.1",