diff --git a/.eleventy.js b/.eleventy.js index ac2eb64b7..281c0921e 100755 --- a/.eleventy.js +++ b/.eleventy.js @@ -59,6 +59,10 @@ module.exports = function (eleventyConfig) { // Directories eleventyConfig.addPassthroughCopy("./src/fonts"); + eleventyConfig.addPassthroughCopy({ + "./tmp/_dist/css": "css", + "./tmp/_dist/js": "js", + }); // Social Media eleventyConfig.addPassthroughCopy("./src/apple-touch-icon.png"); @@ -104,9 +108,7 @@ module.exports = function (eleventyConfig) { return content; }); - eleventyConfig.addWatchTarget("./dist/css/"); - eleventyConfig.addWatchTarget("./dist/img/"); - eleventyConfig.addWatchTarget("./dist/js/"); + eleventyConfig.setUseGitIgnore(false); return { templateFormats: [ diff --git a/package.json b/package.json index 7d956fbb3..150109702 100644 --- a/package.json +++ b/package.json @@ -33,17 +33,17 @@ "images:2-build-svg": "svgo dist/img/**/*.svg", "scripts": "run-s scripts:*", "scripts:0-lint": "jshint --reporter=node_modules/jshint-stylish src/js/", - "scripts:1-concat": "mkdir -p dist/js && concat-glob 'src/js/**/*.js' -o 'dist/js/main.js'", - "scripts:2-optimize": "mv dist/js/main.js dist/js/main.temp.js && optimize-js dist/js/main.temp.js > dist/js/main.js && rm dist/js/main.temp.js", - "scripts:3-minify": "uglifyjs --compress --mangle -o 'dist/js/main.min.js' -- 'dist/js/main.js' ", + "scripts:1-concat": "mkdir -p tmp/_temp/js && concat-glob 'src/js/**/*.js' -o 'tmp/_temp/js/main.js'", + "scripts:2-optimize": "mkdir -p tmp/_dist/js && mv tmp/_temp/js/main.js tmp/_temp/js/main.temp.js && optimize-js tmp/_temp/js/main.temp.js > tmp/_temp/js/main.js && rm tmp/_temp/js/main.temp.js", + "scripts:3-minify": "uglifyjs --compress --mangle -o 'tmp/_dist/js/main.min.js' -- 'tmp/_temp/js/main.js' ", "styleguide": "kss --source src/css --css ../css/screen.min.css --destination dist/styleguide --placeholder [modifier] --title 'Styleguide - The A11Y Project'", "styles": "run-s styles:*", "styles:0-lint": "stylelint \"src/css/**/*.scss\" --syntax scss", - "styles:1-sass": "node-sass src/css/screen.scss dist/css/temp/screen.css", - "styles:2-autoprefix": "npx postcss dist/css/temp/screen.css --use autoprefixer -d dist/css/temp/autoprefix", - "styles:3-purge": "mkdir -p dist/css/temp/purge && purgecss --css dist/css/temp/autoprefix/screen.css --content \"src/**/*.{njk,md}\" -o dist/css/temp/purge/", - "styles:4-minify": "npx postcss dist/css/temp/purge/screen.css > dist/css/screen.min.css --use cssnano", - "styles:5-cleanup": "rm -rf dist/css/temp/", + "styles:1-sass": "node-sass src/css/screen.scss tmp/_temp/css/temp/screen.css", + "styles:2-autoprefix": "npx postcss tmp/_temp/css/temp/screen.css --use autoprefixer -d tmp/_temp/css/temp/autoprefix", + "styles:3-purge": "mkdir -p tmp/_temp/css/temp/purge && purgecss --css tmp/_temp/css/temp/autoprefix/screen.css --content \"src/**/*.{njk,md}\" -o tmp/_temp/css/temp/purge/", + "styles:4-minify": "mkdir -p tmp/_dist/css && npx postcss tmp/_temp/css/temp/purge/screen.css > tmp/_dist/css/screen.min.css --use cssnano", + "styles:5-cleanup": "rm -rf tmp/_temp/css/temp/", "watch:images": "watch -p \"src/img/**/*.{jpg,jpeg,gif,webm,webp,png,svg}\" -c \"npm run images\"", "watch:scripts": "watch -p \"src/js/**/*.js\" -c \"npm run scripts\"", "watch:styles": "watch -p \"src/css/**/*.scss\" -c \"npm run styles\"" diff --git a/src/.eleventyignore b/src/.eleventyignore index bb5477828..c7fc39e06 100755 --- a/src/.eleventyignore +++ b/src/.eleventyignore @@ -1,2 +1,64 @@ css/ img/ + +# Project-specific files and folders +dist/ + +# Generic files to ignore +*~ +*.DS_Store +._* +*.lock +*.out +*.swp +.AppleDouble +.LSOverride +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + + +# Project Files +*.project +*.settings +*.tmproj +*.sublime-project +*.sublime-workspace +*.esproj +*.expressostorage +*.orig +_notes +codekit-config.json +dwsync.xml +node_modules +npm-debug.log + + +# Compiled source +*.com +*.class +*.dll +*.exe +*.o +*.so + + +# Logs and databases +*.log +*.sql +*.sqlite + + +# Packages (better to unpack these files and commit the raw source) +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Local Netlify folder +.netlify