Skip to content

Commit

Permalink
Merge pull request #18 from andrewpucci/17-migrate-to-11ty
Browse files Browse the repository at this point in the history
17 migrate to 11ty
  • Loading branch information
andrewpucci authored Mar 30, 2019
2 parents f0765d5 + 0a11630 commit c167068
Show file tree
Hide file tree
Showing 98 changed files with 9,599 additions and 2,433 deletions.
11 changes: 11 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
>= 1%
last 1 major version
not dead
Chrome >= 45
Firefox >= 38
Edge >= 12
Explorer 11
iOS >= 9
Safari >= 9
Android >= 4.4
Opera >= 30
37 changes: 37 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const cacheBuster = require('@mightyplow/eleventy-plugin-cache-buster');

module.exports = function(config) {
// Layout aliases can make templates more portable
config.addLayoutAlias('default', 'layouts/base.njk');

// Add some utility filters
config.addFilter("squash", require("./src/filters/squash.js") );

// minify the html output
config.addTransform("htmlmin", require("./src/utils/minify-html.js").default);

// fingerprint css and js files
config.addPlugin(cacheBuster({
outputDirectory: 'dist',
createResourceHash(outputDirectoy, url, target) {
return Date.now();
}
}));

// pass some assets right through
config.addPassthroughCopy("./src/site/assets");
config.addPassthroughCopy("./src/site/humans.txt");
config.addPassthroughCopy("./src/site/robots.txt");

return {
dir: {
input: "src/site",
output: "dist",
data: '_data'
},
templateFormats : ["njk", "md"],
htmlTemplateEngine : "njk",
markdownTemplateEngine : "njk",
passthroughFileCopy: true,
};
};
2 changes: 2 additions & 0 deletions .env-sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ROOT_URL='https://www.nwhl.zone/'
GTMID='GTM-XXXXXXX'
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
extends: [
'airbnb-base',
'plugin:security/recommended',
],
env: {
browser: true,
jquery: true,
node: true,
},
plugins: [
'security',
],
};
194 changes: 0 additions & 194 deletions .gitattributes

This file was deleted.

10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules
vendor
_site
.bundle/config
.jekyll-metadata
.sass-cache
dist
.env
yarn-error.log
src/site/assets/js/*
src/site/assets/css/*
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/carbon
Loading

0 comments on commit c167068

Please sign in to comment.