Skip to content

Commit

Permalink
change output folder back from dist back to public
Browse files Browse the repository at this point in the history
  • Loading branch information
zbayoff committed Aug 5, 2019
1 parent 58b661a commit b0d6d09
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Hugo
dist/
public/
data/integrations/
data/service_checks/

Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stages:
variables:
PREVIEW_CONFIG: "config/preview.yaml"
LIVE_CONFIG: "config/live.yaml"
ARTIFACT_RESOURCE: "dist"
ARTIFACT_RESOURCE: "public"
LIVE_DOMAIN: "https://docs.datadoghq.com/"
PREVIEW_DOMAIN: "https://docs-staging.datadoghq.com/"

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ clean-all: stop ## clean everything.
make clean-docker

clean-build: ## remove build artifacts.
@if [ -d dist ]; then rm -r dist; fi
@if [ -d public ]; then rm -r public; fi

clean-docker: ## remove image.
@if [[ `docker ps -a | grep docs` ]]; then printf "removing:" && docker rm -f docs; fi || true
Expand Down
8 changes: 4 additions & 4 deletions local/bin/js/pa11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { Parser } = require('json2csv');

const fileArray = [];

// some html files in dist have weird characters, pa11y fails to read them, must exclude.
// some html files in public/ have weird characters, pa11y fails to read them, must exclude.
const fileExclusions = [
// '&ap=434&fe=21625&dc=11210&at=GUdVQ18ZT08%3D&jsonp=NREUM.setToken',
// '%E2%80%8E',
Expand All @@ -17,7 +17,7 @@ const fileExclusions = [
];

// create array of all html files in starting folder
fromDir('./dist', '.html');
fromDir('./public', '.html');

function fromDir(startPath, filter) {
// console.log('Starting from dir '+startPath+'/');
Expand Down Expand Up @@ -61,8 +61,8 @@ function fromDir(startPath, filter) {
}

const testUrls = [
'./dist/about/press/index.html',
'./dist/about/team/index.html'
'./public/about/press/index.html',
'./public/about/team/index.html'
];

const pa11yConfig = {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"private": true,
"scripts": {
"preinstall": "bash local/bin/sh/preinstall.sh",
"prestart": "rimraf dist",
"prestart": "rimraf public",
"start": "run-p start:**",
"start:webpack": "webpack --config webpack.dev.js",
"start:hugo": "./node_modules/.bin/hugo server -D -d ./dist -s ./ --port 1313 --navigateToChanged --noHTTPCache",
"prebuild": "rimraf dist",
"start:hugo": "./node_modules/.bin/hugo server -D -d ./public -s ./ --port 1313 --navigateToChanged --noHTTPCache",
"prebuild": "rimraf public",
"build": "run-s build:webpack build:hugo",
"build:preview": "npm run build:webpack && npm run build:hugo:preview",
"build:hugo": "./node_modules/.bin/hugo -d ./dist -s ./ -v --minify",
"build:hugo": "./node_modules/.bin/hugo -d ./public -s ./ -v --minify",
"build:hugo:preview": "npm run build:hugo -- -D -F --environment preview",
"build:webpack": "NODE_ENV=production webpack --config webpack.prod.js",
"build:webpack:preview": "NODE_ENV=preview webpack --config webpack.prod.js",
Expand Down
2 changes: 1 addition & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const commonConfig = env => {
'main-dd-css': './styles/style.scss'
},
output: {
path: path.join(__dirname, 'dist', 'static'),
path: path.join(__dirname, 'public', 'static'),
publicPath: 'static'
},

Expand Down
4 changes: 2 additions & 2 deletions webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ module.exports = merge(common(), {
plugins: [
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: [
'dist/**/*.js',
'dist/**/*.css',
'public/**/*.js',
'public/**/*.css',
'data/manifest.json'
]
}),
Expand Down
4 changes: 2 additions & 2 deletions webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const prodConfig = (env) => merge(common(env), {
new OptimizeCSSAssetsPlugin({}),
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: [
"dist/**/*.js",
"dist/**/*.css",
"public/**/*.js",
"public/**/*.css",
"data/manifest.json"
]})
]
Expand Down

0 comments on commit b0d6d09

Please sign in to comment.