latest changes

This commit is contained in:
wassname
2017-11-04 09:13:23 +08:00
parent f0dfde06da
commit eca1741c0d
8 changed files with 14 additions and 89 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2014-2016 Igor Babuschkin, Kevin Dungs, Tadej Novak, Gabor Biro Copyright (c) 2016 wassname (Michael Clark)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

+3 -24
View File
@@ -4,7 +4,6 @@ var gulp = require('gulp');
var fs = require('fs'); var fs = require('fs');
var gutil = require('gulp-util') var gutil = require('gulp-util')
var webpack = require('webpack-stream');
var concurrent = require("concurrent-transform"); var concurrent = require("concurrent-transform");
var rename = require('gulp-rename'); var rename = require('gulp-rename');
@@ -18,26 +17,6 @@ var production = (process.env.NODE_ENV === 'production');
var DEBUG = !production; var DEBUG = !production;
console.log('Running in DEBUG='+DEBUG+' mode'); console.log('Running in DEBUG='+DEBUG+' mode');
var config = {
app_entry: 'client/scripts/main.js',
debug: DEBUG,
};
/*
Just run webpack
*/
gulp.task('webpack', function () {
DEBUG = config.debug=false; // run production mode
process.env.NODE_ENV='production';
var webpackConfig = require('./webpack.config.js');
console.log('debug: ', webpackConfig.debug);
return gulp.src(config.app_entry)
.pipe(webpack(require('./webpack.config.js')))
.pipe(gulp.dest('dist/'));
});
/** deploy to s3 using gulp-awspublish /** deploy to s3 using gulp-awspublish
@@ -57,7 +36,7 @@ gulp.task('s3', function () {
// ... // ...
}; };
return gulp.src('./dist/**/*.*',{cwd:'.'}) return gulp.src('./src/**/*.*',{cwd:'.'})
// rename to put in subfolder // rename to put in subfolder
// .pipe(rename(function (path) { // .pipe(rename(function (path) {
@@ -79,5 +58,5 @@ gulp.task('s3', function () {
.pipe(awspublish.reporter()); .pipe(awspublish.reporter());
}); });
gulp.task('default', ['webpack']); // gulp.task('default', ['webpack']);
gulp.task('deploy', ['webpack','s3']); gulp.task('deploy', [,'s3']);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

+8 -62
View File
@@ -167,7 +167,7 @@
"suit": "Spades", "suit": "Spades",
"color": "Black", "color": "Black",
"royal": false, "royal": false,
"face": true, "face": false,
"number": true, "number": true,
"red": false, "red": false,
"black": false, "black": false,
@@ -184,7 +184,7 @@
"value": 11, "value": 11,
"suit": "Spades", "suit": "Spades",
"color": "Black", "color": "Black",
"royal": true, "royal": false,
"face": true, "face": true,
"number": false, "number": false,
"red": false, "red": false,
@@ -401,7 +401,7 @@
"suit": "Hearts", "suit": "Hearts",
"color": "Red", "color": "Red",
"royal": false, "royal": false,
"face": true, "face": false,
"number": true, "number": true,
"red": false, "red": false,
"black": false, "black": false,
@@ -418,7 +418,7 @@
"value": 11, "value": 11,
"suit": "Hearts", "suit": "Hearts",
"color": "Red", "color": "Red",
"royal": true, "royal": false,
"face": true, "face": true,
"number": false, "number": false,
"red": false, "red": false,
@@ -635,7 +635,7 @@
"suit": "Diamonds", "suit": "Diamonds",
"color": "Red", "color": "Red",
"royal": false, "royal": false,
"face": true, "face": false,
"number": true, "number": true,
"red": false, "red": false,
"black": false, "black": false,
@@ -652,7 +652,7 @@
"value": 11, "value": 11,
"suit": "Diamonds", "suit": "Diamonds",
"color": "Red", "color": "Red",
"royal": true, "royal": false,
"face": true, "face": true,
"number": false, "number": false,
"red": false, "red": false,
@@ -869,7 +869,7 @@
"suit": "Clubs", "suit": "Clubs",
"color": "Black", "color": "Black",
"royal": false, "royal": false,
"face": true, "face": false,
"number": true, "number": true,
"red": false, "red": false,
"black": false, "black": false,
@@ -886,7 +886,7 @@
"value": 11, "value": 11,
"suit": "Clubs", "suit": "Clubs",
"color": "Black", "color": "Black",
"royal": true, "royal": false,
"face": true, "face": true,
"number": false, "number": false,
"red": false, "red": false,
@@ -934,58 +934,4 @@
"spade": false, "spade": false,
"club": false, "club": false,
"diamond": false "diamond": false
}, {
"key": "🂠",
"name": "Playing Card",
"value": 15,
"suit": "Black",
"color": "Black",
"royal": false,
"face": false,
"number": false,
"red": false,
"black": false,
"even": false,
"odd": true,
"loop": false,
"heart": false,
"spade": false,
"club": false,
"diamond": false
}, {
"key": "🃏",
"name": "Joker",
"value": 16,
"suit": "Black",
"color": "Black",
"royal": false,
"face": true,
"number": false,
"red": false,
"black": false,
"even": true,
"odd": false,
"loop": false,
"heart": false,
"spade": false,
"club": false,
"diamond": false
}, {
"key": "🃟",
"name": "Joker",
"value": 16,
"suit": "Red",
"color": "Red",
"royal": false,
"face": true,
"number": false,
"red": false,
"black": false,
"even": true,
"odd": false,
"loop": false,
"heart": false,
"spade": false,
"club": false,
"diamond": false
}] }]
+2 -2
View File
@@ -46,7 +46,7 @@ var extractLESS = new ExtractTextPlugin('[name].less');
// //
// inject bundles into html file template. Note html loader can overwrite output // inject bundles into html file template. Note html loader can overwrite output
var htmlWebpack = new HtmlWebpackPlugin({ var htmlWebpack = new HtmlWebpackPlugin({
template: 'src/index.webpack', template: 'src/index.html',
inject: 'body', inject: 'body',
filename: 'index.html', filename: 'index.html',
hash: true, hash: true,
@@ -104,7 +104,7 @@ module.exports = {
{ test: /\.(mp3|ac3|ogg|m4a|wav)$/i, loader: "file?name=[path][name].[ext]" }, { test: /\.(mp3|ac3|ogg|m4a|wav)$/i, loader: "file?name=[path][name].[ext]" },
{ test: /\.(ttf|woff|eot|svg|woff2|ico)(\?.*$|$)/i, loader: "file?&name=[path][name].[ext]" }, { test: /\.(ttf|woff|eot|svg|woff2|ico)(\?.*$|$)/i, loader: "file?&name=[path][name].[ext]" },
{ test: /\.(json)$/i, loader: "json-loader" }, // this loads it as javascript in one go { test: /\.(json)$/i, loader: "json-loader" }, // this loads it as javascript in one go
{ test: /\.html/i, loader: 'file?name=[path][name].[ext]!html-minify'}, // breaks html template // html-minify? { test: /\.html/i, loader: 'file?name=[path][name].[ext]'}, // breaks html template // html-minify?
{ test: /\.(less)$/i, loader: extractLESS.extract("style-loader", "css-loader",'less-loader') }, { test: /\.(less)$/i, loader: extractLESS.extract("style-loader", "css-loader",'less-loader') },
{ test: /\.(css)$/i, loader: ExtractTextPlugin.extract("style-loader", "css-loader") } { test: /\.(css)$/i, loader: ExtractTextPlugin.extract("style-loader", "css-loader") }
] ]