@takeshape/ssg 8.251.2 → 8.255.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1) hide show
  1. package/package.json +7 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/ssg",
3
- "version": "8.251.2",
3
+ "version": "8.255.8",
4
4
  "description": "Static Site Generator",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -20,9 +20,6 @@
20
20
  "es"
21
21
  ],
22
22
  "dependencies": {
23
- "@takeshape/routing": "8.251.2",
24
- "@takeshape/streams": "8.251.2",
25
- "@takeshape/util": "8.251.2",
26
23
  "@takeshape/vm-nunjucks": "^0.3.1",
27
24
  "async-iterator-to-stream": "^1.2.0",
28
25
  "bluebird": "^3.7.2",
@@ -41,7 +38,10 @@
41
38
  "pluralize": "^8.0.0",
42
39
  "prismjs": "^1.22.0",
43
40
  "pumpify": "^2.0.1",
44
- "resolve": "^1.19.0"
41
+ "resolve": "^1.19.0",
42
+ "@takeshape/routing": "8.255.8",
43
+ "@takeshape/streams": "8.255.8",
44
+ "@takeshape/util": "8.255.8"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/bluebird": "^3.5.33",
@@ -73,8 +73,7 @@
73
73
  "build:js": "cross-env BABEL_MODULES=commonjs babel src --out-dir dist --extensions \".js,.ts\" --ignore '**/__tests__'",
74
74
  "build:es": "cross-env BABEL_MODULES=es babel src --out-dir es --extensions \".js,.ts\" --ignore '**/__tests__'",
75
75
  "build:copy": "cp -rf build/src/* dist/",
76
- "will-it-blend": "pnpm typecheck && pnpm lint -- --quiet && pnpm test -- --silent --coverage false",
76
+ "will-it-blend": "pnpm typecheck && pnpm lint --quiet && pnpm test --silent --coverage false",
77
77
  "todo": "leasot 'src/**/*.{js,jsx,ts,tsx}'"
78
- },
79
- "readme": "## Summary\n\nThis is the [TakeShape](https://takeshape.io) static site generator.\n\n#### `tsg.yml` Configuration Options\n\n```yml\ntemplatePath: src/templates #Sets the path to look for templates\nstaticPath: static #TS deploys this directory. All of your JS, CSS need to end up here. Files like robots.txt, humans.txt and other files that do not need processing should live here.\nbuildPath: build #Temporary build directory\n\nlocale: en-us #default\ndates:\n tz: America/New_York #default\n format: LLL #default\n\ncontext: #Global context available to all routes.\n assets: ../../static/assets/manifest.json\n [KEY]: [VALUE]\n ...\n\nroutes: #Routes tell TS which template to join with which context (graphql query) and the format of the resulting directory structure to generate\n homepage:\n path: /\n template: pages/homepage.html\n context: data/homepage.graphql\n...\n\nhtmlCompression: #Settings for compressing/minifying the generated html\n enabled: false #default\n options: #Refer to Html Compression section of readme to see options\n```\n\n## Templating\n\nTS uses the Nunjucks templating language. You can find detailed documentation on the Nunjucks site:\n(https://mozilla.github.io/nunjucks/templating.html\n\n### TS specific Nunjucks Filters\n\n- `route(routeName: String)`\n ```\n {{ post | route('posts') }}\n ```\n Returns a relative path to a piece of content as defined by the routes in `tsg.yml`. The input Object must have the\n necessary fields specified in the route path in order to construct the path properly.\n- `md`\n ```\n {{ markdown | md }}\n ```\n Markdown to safe HTML using the CommonMark spec http://commonmark.org/\n- `numberFormat(format: String)`\n ```\n {{ numberField | numberformat(',.2r') }}\n # grouped thousands with two significant digits, 4200 -> \"4,200\"\n ```\n Returns a number formatted according to the the format specifier string https://github.com/d3/d3-format\n- `code(language: String)`\n ```\n {{ codeField | code('javascript') }}\n ```\n Uses [prism.js](http://prismjs.com/) to return an HTML representation of the highlighted code. Takes an optional\n [language string](http://prismjs.com/#languages-list). You will need to manually include the corresponding\n [CSS](https://github.com/PrismJS/prism/tree/gh-pages/themes) in your project.\n- `image(params: Object)`\n ```\n {{ imageField | image({w: 320, h: 240, q: 90, crop: 'faces'}) }}\n ```\n Returns an imgix ready url. Takes an object of keys and values for any imgix filter https://docs.imgix.com/apis/url\n- `date(format: String|Object)`\n ```\n {{ date | date('MMM Do YYYY') }}\n {{ date | date({format: 'MMM Do YYYY', tz: 'America/Los_Angeles') }}\n {{ date | date({format: 'LLL', tz: 'America/Los_Angeles', locale: 'fr') }}\n ```\n Formats dates using [moment.js](https://momentjs.com/). `format` can be either a\n [format string](https://momentjs.com/docs/#/displaying/format/) or an object where you can specify a format and\n override the default timezone and locale (configured in `tsg.yml`).\n\n## Configuring Block Canvas imgix settings via `tsg.yml`\n\nSimilarly to how the Nunjucks image filter allows you to apply imgix settings by specifying an object of keys and\nvalues, TS also allows you to apply these same settings to images within `block canvas` elements using the `tsg.yml`\nconfiguration.\n\nImgix settings are applied per route using the following syntax:\n\n```yml\n---\nroutes:\n homepage:\n path: /\n template: pages/homepage.html\n context: #Context is defined as an object with a query and variables\n query: data/homepage.graphql\n variables:\n imageConfig: #Imgix settings must be specified in a variable named imageConfig\n w: 500\n h: 500\n```\n\nThen, wherever you make your GraphQL query, ensure that the imageConfig variable is passed to the `block canvas Html`\nquery:\n\n```\nquery($imageConfig: JSON){\n home {\n blockCanvasHtml(imageConfig: $imageConfig)\n }\n}\n```\n\nImgix settings objects may be defined once and reused in multiple routes in `tsg.yml` using `YAML anchors`:\n\n```yml\n---\nsmallImageConfig: &smallImageConfig\n w: 25\n h: 25\n\nlargeImageConfig: &largeImageConfig\n w: 500\n h: 500\n\nroutes:\n homepage:\n path: /\n template: pages/homepage.html\n context:\n query: data/homepage.graphql\n variables:\n imageConfig:\n <<: *smallImageConfig\n about:\n path: /\n template: pages/about.html\n context:\n query: data/about.graphql\n variables:\n imageConfig:\n <<: *smallImageConfig\n gallery:\n path: /\n template: pages/gallery.html\n context:\n query: data/gallery.graphql\n variables:\n imageConfig:\n <<: *largeImageConfig\n```\n\n## Html Compression\n\nTS uses Minimize, a highly configurable, well-tested, JavaScript-based HTML minifier. You can find detailed\ndocumentation on [the Minimize site](https://github.com/Swaagie/minimize).\n\n### Options\n\nAll options listed in [the Options section of the Minimize site](https://github.com/Swaagie/minimize#options-1) may be\nset:\n\n#### Example\n\nin `tsg.yml`:\n\n```yml\nhtmlCompression:\nenabled: true\noptions:\n empty: true\n comments: true\n```\n"
78
+ }
80
79
  }