Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Foodtranslations (#627)
Browse files Browse the repository at this point in the history
* move contact us into es5 bundle

* build simplification

* fix road closures lookup

Co-authored-by: Aaron Hans <[email protected]>
  • Loading branch information
aaronhans and aaronhans authored Mar 10, 2020
1 parent 7e7dce9 commit 990cba6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/js/alerts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if (document.querySelector('body.js-alerts')) {

const awesompleteSettings = {
list: awesompleteList,
autoFirst: true,
filter: function (text, input) {
return Awesomplete.FILTER_CONTAINS(text, input.match(/[^,]*$/)[0]);
},
Expand Down
4 changes: 0 additions & 4 deletions src/js/alerts/zips.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/js/roads/getobstructions.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,8 @@ export default async function getObstructions (stepMap, coords, callback) {
callback(finalObstructions);
}
}

// call checkout here in case we have 0 steps with highways
checkOut();
// reverted promise.all version which didn't include proper catch logic because sometimes routes can be missing
}
2 changes: 1 addition & 1 deletion src/js/roads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function addListeners () {
const endPlace = document.querySelector('.js-geocoder-start input').value;
const startCoords = await getLatLon(endPlace);
const errorSelector = document.querySelector('.error2');
if (startCoords.status !== 200) {
if (startCoords.status !== '200') {
errorSelector.innerHTML = startCoords.message;
errorSelector.style.display = 'block';
} else {
Expand Down
3 changes: 3 additions & 0 deletions src/lang-global.csv
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ path,token,en,es,zh
/find-minimum-wage-your-city,,employees,empleados,员工
/find-minimum-wage-your-city,,Employers with,Los empleadores con,与雇主
/find-minimum-wage-your-city,,for employers with,para los empleadores con,雇主
/find-food-banks-near-you,,Find food banks near you,Encuentre bancos de alimentos más cercanos,查找附近的粮食银行
/find-food-banks-near-you,,We'll help you find the food banks and pantries closest to you.,Nosotros le ayudaremos a encontrar los bancos de alimentos y despensas más cercanos a tu.,我们将帮助您寻找食物银行和最接近茶水间给你。
/find-food-banks-near-you,,Please enter your city or zip code:,"Por favor, introduzca su ciudad o código postal:",请输入您的城市或邮政编码:
/find-food-banks-near-you,,Other resources,Otros recursos,其他资源
/find-food-banks-near-you,,Text us to find food close to you,Envíe un mensaje de texto para encontrar comida cerca de usted,发送短信去寻找食物靠近你
/find-food-banks-near-you,,Text us anytime at,Envíenos un mensaje de texto en cualquier momento al,在任何时候发送短信
Expand Down
17 changes: 8 additions & 9 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ const minificationOptions = {
const minificationOptionsWithComments = JSON.parse(JSON.stringify(minificationOptions));
minificationOptionsWithComments.removeComments = false;

const excludedChunks = ['roads', 'shelters', 'lifeline'];
const allChunks = ['style', 'roads', 'shelters', 'lifeline'];

// usage
// excludeChunks: excludeChucksExcept("roads"),
// excludeChunks: excludeChucksExcept("roads","alerts"),
const excludeChucksExcept = (...args) => excludedChunks.filter(x => !args.includes(x));
const excludeChucksExcept = (...args) => allChunks.filter(x => !args.includes(x));

module.exports = {
entry: {
Expand Down Expand Up @@ -253,43 +252,43 @@ module.exports = {
new HtmlWebpackPlugin({
filename: 'en/apply-for-unemployment-insurance/index.html',
template: 'src/services/apply-for-unemployment-insurance/index.html',
excludeChunks: excludedChunks,
excludeChunks: allChunks,
minify: minificationOptions
}),
new HtmlWebpackPlugin({
filename: 'en/apply-for-unemployment-insurance/after-you-apply/index.html',
template: 'src/services/apply-for-unemployment-insurance/after-you-apply/index.html',
excludeChunks: excludedChunks,
excludeChunks: allChunks,
minify: minificationOptions
}),
new HtmlWebpackPlugin({
filename: 'en/apply-for-unemployment-insurance/how-to-apply/index.html',
template: 'src/services/apply-for-unemployment-insurance/how-to-apply/index.html',
excludeChunks: excludedChunks,
excludeChunks: allChunks,
minify: minificationOptions
}),
new HtmlWebpackPlugin({
filename: 'en/apply-for-unemployment-insurance/update-us-every-two-weeks/index.html',
template: 'src/services/apply-for-unemployment-insurance/update-us-every-two-weeks/index.html',
excludeChunks: excludedChunks,
excludeChunks: allChunks,
minify: minificationOptions
}),
new HtmlWebpackPlugin({
filename: 'en/apply-for-unemployment-insurance/what-you-need-before-you-apply/index.html',
template: 'src/services/apply-for-unemployment-insurance/what-you-need-before-you-apply/index.html',
excludeChunks: excludedChunks,
excludeChunks: allChunks,
minify: minificationOptions
}),
new HtmlWebpackPlugin({
filename: 'en/apply-for-unemployment-insurance/when-to-apply/index.html',
template: 'src/services/apply-for-unemployment-insurance/when-to-apply/index.html',
excludeChunks: excludedChunks,
excludeChunks: allChunks,
minify: minificationOptions
}),
new HtmlWebpackPlugin({
filename: 'en/office-of-digital-innovation/index.html',
template: 'src/office-of-digital-innovation/index.html',
excludeChunks: excludedChunks,
excludeChunks: allChunks,
minify: minificationOptions
}),

Expand Down

0 comments on commit 990cba6

Please sign in to comment.