Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fix deploy #86

Merged
merged 5 commits into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var gulp = require('gulp');
var deploy = require('gulp-gh-pages');
var ghpages = require('gh-pages');
var path = require('path');

gulp.task('deploy', ['build'], function () {
return gulp.src("./dist/**/*")
.pipe(deploy())
});
gulp.task('deploy', function (cb) {
ghpages.publish(path.join(process.cwd(), 'dist'), {message: 'Publicado em: ' + new Date()}, cb);
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"scripts": {
"start": "webpack-dev-server --open --mode development",
"build": "webpack --mode production",
"deploy": "gulp deploy"
"deploy": "npm run build && gulp deploy"
},
"license": "UNLICENSED",
"dependencies": {
"autoprefixer": "6.7.7",
"gh-pages": "^2.0.1",
"gulp": "3.9.1",
"jquery": "3.2.1",
"normalize.css": "5.0.0",
Expand All @@ -18,10 +19,10 @@
"webpack-dev-server": "^3.1.5"
},
"devDependencies": {
"cname-webpack-plugin": "^1.0.3",
"css-loader": "^1.0.0",
"expose-loader": "^0.7.5",
"file-loader": "^1.1.11",
"gulp-gh-pages": "0.5.4",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"img-loader": "^3.0.0",
Expand Down
7 changes: 6 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const webpack = require('webpack');
const HtmlWebPackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const CnameWebpackPlugin = require('cname-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
Expand Down Expand Up @@ -84,10 +85,14 @@ module.exports = {
minChunks: 2
}
}
}
}
},
plugins: [
new CnameWebpackPlugin({
domain: 'afropython.org',
}),
new HtmlWebPackPlugin({
favicon: "src/favicon.ico",
template: "src/index.html",
filename: "./index.html"
}),
Expand Down