Skip to content

Commit

Permalink
Build and cache types using 11ty's cache helper (GoogleChrome#415)
Browse files Browse the repository at this point in the history
* swap to building types on-demand

* fix misc bad syntax

* remove refs to types

* fix test code
  • Loading branch information
samthor authored Feb 11, 2021
1 parent 7fb3b5c commit 62b2f14
Show file tree
Hide file tree
Showing 16 changed files with 629 additions and 643 deletions.
3 changes: 0 additions & 3 deletions .cloudbuild/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ steps:
- name: node
entrypoint: npm
args: ['ci']
- name: node
entrypoint: npm
args: ['run', 'postinstall']
- name: node
entrypoint: npm
args: ['run', 'cloud-secrets']
Expand Down
4 changes: 0 additions & 4 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ module.exports = eleventyConfig => {
eleventyConfig.addCollection('tags', tagsCollection);
eleventyConfig.addCollection('reference', extensionsReferenceCollection);

// Add static collections
// These are generated as a postinstall step as computation is slow
eleventyConfig.addCollection('types', () => require('./site/_collections/types'));

// Add filters
eleventyConfig.addFilter('absolute', absolute);
eleventyConfig.addFilter('trailingSlash', trailingSlash);
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ coverage
node_modules
dist
**/_includes/css
site/_collections/types.json

# Eleventy
# We generate our own .eleventyignore file dynamically during builds
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ git clone https://github.com/GoogleChrome/developer.chrome.com.git

```bash
npm ci
npm run types
```

### Set up build flags
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# unless otherwise overridden by more specific contexts.
[build]
publish = "dist/"
command = "npm run types && npm run production"
command = "npm run production"
# Don't build NaCl docs during Netlify preview builds.
# These take forever and we don't need them for PR previews.
environment = { CI = "true", ELEVENTY_IGNORE_NACL = "true" }
Expand Down
Loading

0 comments on commit 62b2f14

Please sign in to comment.