diff options
Diffstat (limited to 'web-ui/config')
-rw-r--r-- | web-ui/config/alias-webpack.js | 1 | ||||
-rw-r--r-- | web-ui/config/compass.rb | 2 | ||||
-rw-r--r-- | web-ui/config/copy-webpack.js | 88 | ||||
-rw-r--r-- | web-ui/config/imagemin.js | 15 | ||||
-rw-r--r-- | web-ui/config/loaders-webpack.js | 4 | ||||
-rw-r--r-- | web-ui/config/protected-assets-webpack.js | 25 | ||||
-rw-r--r-- | web-ui/config/public-assets-webpack.js | 10 |
7 files changed, 51 insertions, 94 deletions
diff --git a/web-ui/config/alias-webpack.js b/web-ui/config/alias-webpack.js index 43b23836..d316bb2d 100644 --- a/web-ui/config/alias-webpack.js +++ b/web-ui/config/alias-webpack.js @@ -7,6 +7,7 @@ module.exports = { 'flight': path.join(__dirname, '../app/bower_components/flight'), 'found': path.join(__dirname, '../app/bower_components/foundation'), 'js': path.join(__dirname, '../app/js'), + 'src': path.join(__dirname, '../src'), 'scss': path.join(__dirname, '../app/scss'), 'mail_list': path.join(__dirname, '../app/js/mail_list'), 'page': path.join(__dirname, '../app/js/page'), diff --git a/web-ui/config/compass.rb b/web-ui/config/compass.rb index 9c52a04e..13940ba6 100644 --- a/web-ui/config/compass.rb +++ b/web-ui/config/compass.rb @@ -17,7 +17,7 @@ # Set this to the root of your project when deployed: -target_dir = ENV['PIXELATED_BUILD'] == 'package' ? 'dist' : 'app' +target_dir = 'app' http_path = "/" diff --git a/web-ui/config/copy-webpack.js b/web-ui/config/copy-webpack.js deleted file mode 100644 index a2567be6..00000000 --- a/web-ui/config/copy-webpack.js +++ /dev/null @@ -1,88 +0,0 @@ -var CopyWebpackPlugin = require('copy-webpack-plugin'); - -module.exports = new CopyWebpackPlugin([ - { context: 'app/', from: '404.html' }, - { context: 'app/', from: 'index.html' }, - { context: 'app/', from: 'sandbox.html' }, - { context: 'app/', from: 'account_recovery.html' }, - { context: 'app/', from: 'css/*' }, - { context: 'app/', from: 'fonts/*' }, - { context: 'app/', from: 'locales/**/*' }, - { context: 'app/', from: 'images/**/*' }, - { context: 'app/', from: 'bower_components/font-awesome/fonts/*' }, - { - context: 'app/', - from: 'bower_components/font-awesome/css/font-awesome.min.css', - to: 'bower_components/font-awesome/css' - }, - { - context: 'app/', - from: 'bower_components/jquery-file-upload/css/jquery.fileupload.css', - to: 'bower_components/jquery-file-upload/css' - }, - { - context: 'app/', - from: 'bower_components/modernizr/modernizr.js', - to: 'bower_components/modernizr' - }, - { - context: 'app/', - from: 'bower_components/lodash/dist/lodash.min.js', - to: 'bower_components/lodash/dist' - }, - { - context: 'app/', - from: 'bower_components/jquery/dist/jquery.min.js', - to: 'bower_components/jquery/dist' - }, - { - context: 'app/', - from: 'bower_components/jquery-ui/jquery-ui.min.js', - to: 'bower_components/jquery-ui' - }, - { - context: 'app/', - from: 'bower_components/jquery-file-upload/js/jquery.fileupload.js', - to: 'bower_components/jquery-file-upload/js' - }, - { - context: 'app/', - from: 'bower_components/handlebars/handlebars.min.js', - to: 'bower_components/handlebars' - }, - { - context: 'app/', - from: 'bower_components/typeahead.js/dist/typeahead.bundle.min.js', - to: 'bower_components/typeahead.js/dist' - }, - { - context: 'app/', - from: 'bower_components/iframe-resizer/js/iframeResizer.min.js', - to: 'bower_components/iframe-resizer/js' - }, - { - context: 'app/', - from: 'bower_components/iframe-resizer/js/iframeResizer.contentWindow.min.js', - to: 'bower_components/iframe-resizer/js' - }, - { - context: 'app/', - from: 'bower_components/foundation/js/foundation.js', - to: 'bower_components/foundation/js' - }, - { - context: 'app/', - from: 'bower_components/foundation/js/foundation/foundation.reveal.js', - to: 'bower_components/foundation/js/foundation' - }, - { - context: 'app/', - from: 'bower_components/foundation/js/foundation/foundation.offcanvas.js', - to: 'bower_components/foundation/js/foundation' - }, - { - context: 'app/', - from: 'js/foundation/initialize_foundation.js', - to: 'js/foundation' - } -]) diff --git a/web-ui/config/imagemin.js b/web-ui/config/imagemin.js index 2b2c87e0..a01f1dac 100644 --- a/web-ui/config/imagemin.js +++ b/web-ui/config/imagemin.js @@ -16,10 +16,19 @@ */ const imagemin = require('imagemin'); +const imageminSvgo = require('imagemin-svgo'); +const imageminPngquant = require('imagemin-pngquant'); -imagemin(['app/images/*.{gif,jpg,png,svg}'], - 'dist/images' -).then(files => { +imagemin(['app/images/*.{gif,jpg,png,svg}'], 'dist/public/images', { + use: [ + imageminSvgo({ + plugins: [ + {removeViewBox: false} + ] + }), + imageminPngquant() + ] +}).then(files => { console.log('Images list:') files.map(function(file) { console.log(file.path); }); }); diff --git a/web-ui/config/loaders-webpack.js b/web-ui/config/loaders-webpack.js index 21e9a572..9009f9fd 100644 --- a/web-ui/config/loaders-webpack.js +++ b/web-ui/config/loaders-webpack.js @@ -3,11 +3,11 @@ module.exports = [ test: /\.js$/, exclude: /(node_modules|bower_components)/, loader: 'babel', - query: { presets: ['es2015', 'react']} + query: { presets: ['es2015', 'react', 'stage-0']} }, { test: /\.scss|css$/, - loader: "style-loader!css-loader!sass-loader" + loader: "style-loader!css-loader!postcss-loader!sass-loader" }, { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, diff --git a/web-ui/config/protected-assets-webpack.js b/web-ui/config/protected-assets-webpack.js new file mode 100644 index 00000000..85654cf0 --- /dev/null +++ b/web-ui/config/protected-assets-webpack.js @@ -0,0 +1,25 @@ +var CopyWebpackPlugin = require('copy-webpack-plugin'); + +module.exports = new CopyWebpackPlugin([ + { context: 'app/', from: '404.html' }, + { context: 'app/', from: 'index.html' }, + { context: 'app/', from: 'sandbox.html' }, + { context: 'app/', from: 'css/*' }, + { context: 'src/backup_account/', from: 'backup_account.html' }, + { context: 'app/bower_components/font-awesome/', from: 'fonts/*' }, + { context: 'app/bower_components/font-awesome/', from: 'css/font-awesome.min.css', to: 'css' }, + { context: 'app/bower_components/jquery-file-upload/', from: 'css/jquery.fileupload.css', to: 'css' }, + { context: 'app/bower_components/modernizr/', from: 'modernizr.js' }, + { context: 'app/bower_components/lodash/dist/', from: 'lodash.min.js' }, + { context: 'app/bower_components/jquery/dist/', from: 'jquery.min.js' }, + { context: 'app/bower_components/jquery-ui/', from: 'jquery-ui.min.js' }, + { context: 'app/bower_components/jquery-file-upload/js/', from: 'jquery.fileupload.js' }, + { context: 'app/bower_components/handlebars/', from: 'handlebars.min.js' }, + { context: 'app/bower_components/typeahead.js/dist/', from: 'typeahead.bundle.min.js' }, + { context: 'app/bower_components/iframe-resizer/js/', from: 'iframeResizer.min.js' }, + { context: 'app/bower_components/iframe-resizer/js/', from: 'iframeResizer.contentWindow.min.js' }, + { context: 'app/bower_components/foundation/js/', from: 'foundation.js' }, + { context: 'app/bower_components/foundation/js/foundation/', from: 'foundation.reveal.js' }, + { context: 'app/bower_components/foundation/js/foundation/', from: 'foundation.offcanvas.js' }, + { context: 'app/js/foundation/', from: 'initialize_foundation.js' } +]) diff --git a/web-ui/config/public-assets-webpack.js b/web-ui/config/public-assets-webpack.js new file mode 100644 index 00000000..28dff566 --- /dev/null +++ b/web-ui/config/public-assets-webpack.js @@ -0,0 +1,10 @@ +var CopyWebpackPlugin = require('copy-webpack-plugin'); + +module.exports = new CopyWebpackPlugin([ + { context: 'src/login/', from: '*.html' }, + { context: 'src/login/', from: '*.css' }, + { context: 'src/interstitial/', from: '*' }, + { context: 'app/', from: 'fonts/*' }, + { context: 'app/', from: 'locales/**/*' }, + { context: 'app/', from: 'images/**/*' } +]); |