Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zbayoff committed Aug 5, 2019
1 parent 99294d0 commit 58b661a
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 212 deletions.
122 changes: 0 additions & 122 deletions config-corp.js

This file was deleted.

2 changes: 0 additions & 2 deletions layouts/_default/404-baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
{{- partial "hreflang.html" . -}}
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" type="image/png" href="https://docs.datadoghq.com/favicon.ico">
{{/* <link rel="stylesheet" href="{{ .Site.BaseURL }}css/{{ (index .Site.Data.manifests.css "main-dd-css" ) }}"> */}}
<link rel="stylesheet" href="{{ (index $.Site.Data.manifest "main-dd-css") | relURL}}"></link>

{{- if ne $.Params.disable_opengraph_meta_tags true -}}
Expand Down Expand Up @@ -62,7 +61,6 @@

{{ partial "footer/footer.html" . }}

{{/* <script src="{{ .Site.BaseURL }}js/{{ (index .Site.Data.manifests.js "main-dd-js.js") }}"></script> */}}
<script src="{{ (index $.Site.Data.manifest "vendor.js") | relURL}}"></script>
<script src="{{ (index $.Site.Data.manifest "main-dd-js.js") | relURL}}"></script>

Expand Down
2 changes: 0 additions & 2 deletions layouts/_default/api-baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
{{- partial "hreflang.html" . -}}
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" type="image/png" href="https://docs.datadoghq.com/favicon.ico">
{{/* <link rel="stylesheet" href="{{ .Site.BaseURL }}static/{{ (index .Site.Data.manifests.css "main-dd-css.css" ) }}"> */}}
<link rel="stylesheet" href="{{ (index $.Site.Data.manifest "main-dd-css.css") | relURL}}"></link>

{{- if ne $.Params.disable_opengraph_meta_tags true -}}
Expand All @@ -52,7 +51,6 @@

{{ partial "footer/footer.html" . }}

{{/* <script src="{{ .Site.BaseURL }}js/{{ (index .Site.Data.manifests.js "main-dd-js.js") }}"></script> */}}
<script src="{{ (index $.Site.Data.manifest "vendor.js") | relURL}}"></script>
<script src="{{ (index $.Site.Data.manifest "main-dd-js.js") | relURL}}"></script>

Expand Down
2 changes: 0 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
{{- partial "hreflang.html" . -}}
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" type="image/png" href="https://docs.datadoghq.com/favicon.ico">
{{/* <link rel="stylesheet" href="{{ .Site.BaseURL }}css/{{ (index .Site.Data.manifests.css "main-dd-css.css" ) }}"> */}}
<link rel="stylesheet" href="{{ (index $.Site.Data.manifest "main-dd-css.css") | relURL }}" >
{{- if ne $.Params.disable_opengraph_meta_tags true -}}
{{- partial "meta.html" . -}}
Expand Down Expand Up @@ -59,7 +58,6 @@

{{ partial "footer/footer.html" . }}

{{/* <script src="{{ .Site.BaseURL }}static/{{ (index .Site.Data.manifests.js "main-dd-js.js") }}"></script> */}}
<script src="{{ (index $.Site.Data.manifest "vendor.js") | relURL}}"></script>
<script src="{{ (index $.Site.Data.manifest "main-dd-js.js") | relURL}}"></script>

Expand Down
1 change: 0 additions & 1 deletion layouts/partials/img.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
{{ end }}
{{ $img_param := .root.Scratch.Get "img_param" }}

{{/* $url := (print (.root.Site.Params.img_url) "static/" (index .root.Site.Data.image_manifest (printf "%s/%s" "images" .src)) ($img_param)) | safeURL */}}
{{ $url := (print (.root.Site.Params.img_url) (printf "%s/%s" "images" .src) ($img_param)) | safeURL }}

{{ $image_type_arr := split .src "." }}
Expand Down
18 changes: 0 additions & 18 deletions local/bin/sh/run-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,12 @@ if [ ${RUN_SERVER} == true ]; then
echo "checking that node modules are installed and up-to-date"
npm --global install yarn && \
npm cache clean --force && yarn install --frozen-lockfile
webpackargs ="--config webpack.dev.js"
hugoargs ="-D -d ../dist -s site --port 3000 --navigateToChanged --noHTTPCache --ignoreCache --disableFastRender"
echo "starting webpack and hugo build"
yarn run start



sleep 5
fi

# # hugo
# args=""
# if [ ${RENDER_SITE_TO_DISK} != "false" ]; then
# args="${args} --renderToDisk"
# fi
# # hugo server defaults to --environment development
# ./node_modules/.bin/hugo server ${args} &
# sleep 5

# if [ ${RUN_WEBPACK} == true ]; then
# echo "webpack watch..."
# gulp watch
# fi

else
exit 0
fi
32 changes: 0 additions & 32 deletions src/build/entries.js

This file was deleted.

33 changes: 2 additions & 31 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,8 @@ const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const WebpackAssetsManifest = require('webpack-assets-manifest');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const { isString } = require('lodash');
const config = require('./config-corp');
require('@babel/polyfill');

const { getEntry, getAllEntryNames } = require('./src/build/entries.js');

function getConfig() {
console.log('process.env.NODE_ENV: ', process.env.NODE_ENV);
if (process.env.NODE_ENV === 'production') {
return config['production'];
} else if (process.env.NODE_ENV === 'preview') {
return config['preview'];
} else {
return config['local'];
}
}

const entries = getAllEntryNames();
const entryNames = isString(entries) ? entries.split(',') : entries;

// const manifest2 = new WebpackAssetsManifest({
// customize(entry, original, manifest, asset) {
// console.log('manifest: ', manifest);
// }
// });
require('@babel/polyfill');

const commonConfig = env => {
const plugins = [
Expand Down Expand Up @@ -179,13 +156,7 @@ const commonConfig = env => {
},
resolve: {
extensions: ['.json', '.js', '.jsx']
},
externals: [
/^vendor\/.+\.js$/,
{
Config: JSON.stringify(getConfig())
}
]
}
};
};

Expand Down
1 change: 0 additions & 1 deletion webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const merge = require('webpack-merge');
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const common = require('./webpack.common');
Expand Down
2 changes: 1 addition & 1 deletion webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const prodConfig = (env) => merge(common(env), {
cleanOnceBeforeBuildPatterns: [
"dist/**/*.js",
"dist/**/*.css",
"site/data/manifest.json"
"data/manifest.json"
]})
]
}
Expand Down

0 comments on commit 58b661a

Please sign in to comment.