Reenable minifier, disable Travis (#1473)

This commit is contained in:
Rico Sta. Cruz 2020-06-23 00:38:08 +10:00 committed by GitHub
parent c27d9bf443
commit f534ec6c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 73 deletions

View File

@ -1,29 +0,0 @@
language: ruby
rvm: [2.7.1]
before_install:
- nvm install 12
- nvm use 12
- node --version
- ruby --version
install:
- yarn --frozen-lockfile
- bundle --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle}
script:
- yarn build
- yarn test
- yarn test:smoke
cache:
bundler: true
yarn: true
notifications:
slack:
if: branch = master OR branch =~ ^.*slack.*$
rooms:
- secure: FN4trzyyUdtZ6DXj4G3A7YnhqkPyqi8jN9BIdA6S6D2eJEH1gPbZUfbqAW87LKckKZ9iYB5KDF5IuELhR3vv1DeHRqm3MKRU91JVBDT7EXbF86Z1J/JMJxNOcoWdCilcgpnm9NCkMAPFC9h6Y3txYhaLWLsnDaWlvehBsJg+Ql4=
on_success: change
on_failure: always

View File

@ -2,13 +2,13 @@
<meta charset='utf-8'>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<link href='{{ base }}/assets/favicon.png' rel='shortcut icon'>
<meta content='{{ page.url }}' name='app:pageurl'>
<meta content='{{ page.url | escape }}' name='app:pageurl'>
{% if meta_title %}
<title>{{ meta_title }}</title>
<meta content='{{ meta_title }}' property='og:title'>
<meta content='{{ meta_title }}' property='twitter:title'>
<meta content='{{ page.og_type | default: "article" }}' property='og:type'>
<title>{{ meta_title | escape }}</title>
<meta content='{{ meta_title | escape }}' property='og:title'>
<meta content='{{ meta_title | escape }}' property='twitter:title'>
<meta content='{{ page.og_type | default: "article" | escape }}' property='og:type'>
{% endif %}
{% if meta_image %}
@ -24,11 +24,11 @@
<meta content="{{ meta_description | escape }}" property="twitter:description">
{% endif %}
<link rel="canonical" href="{{ page_url }}">
<meta name="og:url" content="{{ page_url }}">
<link rel="canonical" href="{{ page_url | escape }}">
<meta name="og:url" content="{{ page_url | escape }}">
{% if page.url == '/' %}
<link rel="prefetch" href="{{ site.url }}">
<link rel="prerender" href="{{ site.url }}">
<link rel="prefetch" href="{{ site.url | escape }}">
<link rel="prerender" href="{{ site.url | escape }}">
{% endif %}
{% if page.author %}
@ -41,15 +41,15 @@
{% endif %}
{% if site.title %}
<meta content='{{ site.title }}' property='og:site_name'>
<meta content='{{ site.title | escape }}' property='og:site_name'>
{% endif %}
{% if site.facebook.app_id %}
<meta content='{{ site.facebook.app_id }}' property='fb:app_id'>
<meta content='{{ site.facebook.app_id | escape }}' property='fb:app_id'>
{% endif %}
{% if site.facebook.admin %}
<meta content='{{ site.facebook.admin }}' property='fb:admins'>
<meta content='{{ site.facebook.admin | escape }}' property='fb:admins'>
{% endif %}
{% if page.date %}
@ -57,12 +57,12 @@
{% endif %}
{% if page.category %}
<meta content='{{ page.category }}' property='article:section'>
<meta content='{{ page.category | escape }}' property='article:section'>
{% endif %}
{% if page.tags %}
{% for tag in page.tags %}
<meta content='{{ tag }}' property='article:tag'>
<meta content='{{ tag | escape }}' property='article:tag'>
{% endfor %}
{% endif %}

View File

@ -20,22 +20,24 @@ weight: -1
* foo('hello')
*/
function foo(n) { return n }
function foo(n) {
return n
}
```
See: <http://usejsdoc.org/index.html>
### Types
| Type | Description |
| --- | --- |
| `@param {string=} n` | Optional |
| `@param {string} [n]` | Optional |
| `@param {(string|number)} n` | Multiple types |
| `@param {*} n` | Any type |
| `@param {...string} n` | Repeatable arguments |
| `@param {string} [n="hi"]` | Optional with default |
| `@param {string[]} n` | Array of strings |
| Type | Description |
| ------------------------------- | ------------------------------------- |
| `@param {string=} n` | Optional |
| `@param {string} [n]` | Optional |
| `@param {(string|number)} n` | Multiple types |
| `@param {*} n` | Any type |
| `@param {...string} n` | Repeatable arguments |
| `@param {string} [n="hi"]` | Optional with default |
| `@param {string[]} n` | Array of strings |
| `@return {Promise<string[]>} n` | Promise fulfilled by array of strings |
See: <http://usejsdoc.org/tags-type.html>
@ -74,14 +76,15 @@ const FOO = 1
* @param {Song} song - The {@link Song} to be played
*/
function play (song) {
}
function play(song) {}
```
See: <http://usejsdoc.org/tags-typedef.html>
### Typedef Shorthand
{% raw %}
```js
/**
* A song
@ -89,14 +92,15 @@ See: <http://usejsdoc.org/tags-typedef.html>
*/
```
{% endraw %}
```js
/**
* Plays a song
* @param {Song} song - The {@link Song} to be played
*/
function play (song) {
}
function play(song) {}
```
See: <http://usejsdoc.org/tags-typedef.html>
@ -112,7 +116,7 @@ See: <http://usejsdoc.org/tags-typedef.html>
* @param {Bar} x
*/
function test(x) { }
function test(x) {}
```
This syntax is [TypeScript-specific](https://github.com/Microsoft/TypeScript/wiki/JsDoc-support-in-JavaScript#import-types).

View File

@ -3,18 +3,14 @@
publish = "_site/"
[[plugins]]
# https://www.npmjs.com/package/netlify-purge-cloudflare-on-deploy
package = "netlify-purge-cloudflare-on-deploy"
# [[plugins]]
# # https://www.npmjs.com/package/netlify-plugin-minify-html
# package = "netlify-plugin-minify-html"
#
# [plugins.inputs]
# contexts = [ 'production', 'branch-deploy', 'deploy-preview' ]
#
# # https://github.com/kangax/html-minifier#options-quick-reference
# [plugins.inputs.minifierOptions]
# removeComments = true
# minifyCSS = true
# minifyJS = true
# https://www.npmjs.com/package/netlify-plugin-minify-html
package = "netlify-plugin-minify-html"
[plugins.inputs]
contexts = [ 'production', 'branch-deploy', 'deploy-preview' ]
# https://github.com/kangax/html-minifier#options-quick-reference
[plugins.inputs.minifierOptions]
removeComments = true
minifyCSS = true
minifyJS = true