Skip to content

Commit

Permalink
Replaced gulp with webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Zadielerick committed Aug 10, 2015
1 parent a16c8a3 commit 46f0e27
Show file tree
Hide file tree
Showing 22 changed files with 207 additions and 286 deletions.
29 changes: 15 additions & 14 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ Now you can run your local server:
```
npm start
```
#Description of [Gulp](https://github.com/gulpjs/gulp) Plugins


##[browserify](https://github.com/substack/node-browserify)
Browsers do not allow us to use the require method from Node.js. With browserify, we can implement dependency management on the browser. It also will bundle the code into one file in an efficient way to not repeat dependiencies that are used more than once.

##[browserSync](http://www.browsersync.io/)
When developing and testing the website, browserSync is a powerful tool that will rebuild and refresh the webpage so you can see the changes you make as you are working.

##markup
Copies all of the files from /src/www to the build folder.

##[gulp_starter](https://github.com/greypants/gulp-starter)
A useful repository that explains how many of gulp's features work and contains an example project to get familiar with it. We use this example to construct our own project.
Open http://localhost:3000 to view the documentation site.
#Description of [Webpack](http://webpack.github.io/docs/)
Webpack is a module bundler that we are using to run our documentation site. This is a quick overview of how the configuration file works.
##Webpack Configuration:
###Entry:
Webpack creates entry points for the application to know where it starts.
###Resolve:
Webpack uses this configuration options to determine how it will deal with requiring files. For example, when the extension is omitted in a require, Webpack will look at the extensions option and try applying one of those.
###Output:
This is where the bundled project will go to and any other files necessary for it to run.
###Plugins:
These are plugins Webpack uses for more functionality. The HTML Webpack Plugin, for example, will add the index.html to your build folder.
###Modules:
Modules and other things that are required will usually need to be loaded and interpreted by Webpack when bundling, and this is where Webpack looks for the different loaders.
*Loading .js files in es6 and es7 will require a loader like babel-loader to interpret the files into es5.
40 changes: 0 additions & 40 deletions docs/gulp/config.js

This file was deleted.

7 changes: 0 additions & 7 deletions docs/gulp/tasks/browserSync.js

This file was deleted.

91 changes: 0 additions & 91 deletions docs/gulp/tasks/browserify.js

This file was deleted.

3 changes: 0 additions & 3 deletions docs/gulp/tasks/build.js

This file was deleted.

7 changes: 0 additions & 7 deletions docs/gulp/tasks/css.js

This file was deleted.

3 changes: 0 additions & 3 deletions docs/gulp/tasks/default.js

This file was deleted.

16 changes: 0 additions & 16 deletions docs/gulp/tasks/eslint.js

This file was deleted.

7 changes: 0 additions & 7 deletions docs/gulp/tasks/fontIcons.js

This file was deleted.

7 changes: 0 additions & 7 deletions docs/gulp/tasks/markup.js

This file was deleted.

5 changes: 0 additions & 5 deletions docs/gulp/tasks/setWatch.js

This file was deleted.

12 changes: 0 additions & 12 deletions docs/gulp/tasks/watch.js

This file was deleted.

21 changes: 0 additions & 21 deletions docs/gulp/util/bundleLogger.js

This file was deleted.

15 changes: 0 additions & 15 deletions docs/gulp/util/handleErrors.js

This file was deleted.

16 changes: 0 additions & 16 deletions docs/gulpfile.js

This file was deleted.

25 changes: 7 additions & 18 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,15 @@
"url": "https://github.com/callemall/material-ui.git"
},
"scripts": {
"start": "gulp"
},
"devDependencies": {
"babelify": "^6.1.1",
"browser-sync": "^1.8.1",
"browserify": "^10.2.0",
"gulp": "^3.8.10",
"gulp-eslint": "^0.15.0",
"gulp-notify": "^2.1.0",
"gulp-shell": "^0.4.1",
"gulp-sourcemaps": "1.5.2",
"gulp-util": "^3.0.1",
"pretty-hrtime": "^0.2.2",
"require-dir": "^0.1.0",
"underscore": "^1.7.0",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.0.0",
"watchify": "^2.2.1"
"prestart": "webpack-dev-server --config webpack-dev-server.config.js --progress --colors --inline",
"start": "open http://localhost:3000",
"build": "webpack --config webpack-production.config.js --progress --colors --profile"
},
"dependencies": {
"highlight.js": "^8.4.0"
},
"devDependencies": {
"webpack": "^1.11.0",
"webpack-dev-server": "^1.10.1"
}
}
2 changes: 1 addition & 1 deletion docs/src/app/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// This is our callback function, whenever the url changes it will be called again.
// Handler: The ReactComponent class that will be rendered
.run(function (Handler) {
React.render(<Handler/>, document.body);
React.render(<Handler/>, document.getElementById('app'));
});

})();
4 changes: 3 additions & 1 deletion docs/src/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
s.parentNode.insertBefore(wf, s);
})();
</script>
<script src="app.js"></script>
<div id='app'>
<script src="app.js"></script>
<div>
</body>

</html>
Loading

0 comments on commit 46f0e27

Please sign in to comment.