mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
Spelling (#2211)
* spelling: accidentally * spelling: activesupport * spelling: aggressive * spelling: attribute * spelling: background * spelling: callback * spelling: classes * spelling: duped * spelling: environment * spelling: forty * spelling: interrupt * spelling: javascript * spelling: localization * spelling: localized * spelling: recursive * spelling: registered * spelling: rendering * spelling: representation * spelling: successful * spelling: symbol
This commit is contained in:
parent
f2d23a6f6d
commit
b42e4edd66
25 changed files with 39 additions and 39 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,7 +1,7 @@
|
|||
master
|
||||
===
|
||||
|
||||
* i18n was accidently duplicating requests for extension-based template (file.es.html)
|
||||
* i18n was accidentally duplicating requests for extension-based template (file.es.html)
|
||||
|
||||
# 4.3.0.rc.3
|
||||
|
||||
|
@ -15,7 +15,7 @@ master
|
|||
* Update Rubocop and apply new lint rules
|
||||
* Do not create unnecessary array in IgnoreDescriptor (#2183)
|
||||
* Fix reload of watched sources with destination_dir (#2190)
|
||||
* Fix localisation and recursion issues of Traversal::parent. (#2188)
|
||||
* Fix localization and recursion issues of Traversal::parent. (#2188)
|
||||
* Use EnhancedHash for partial locals (#2169)
|
||||
|
||||
# 4.3.0.rc.1
|
||||
|
@ -30,11 +30,11 @@ master
|
|||
* Clear lazy map after resolving Tilt templates (#2132)
|
||||
* Fix ignore of I18n files (#2143)
|
||||
* Fix redirect destination lookup (#2140)
|
||||
* Add LD-JSON to MinifyJavascript content types allowed to be compressed (#2138)
|
||||
* Add LD-JSON to MinifyJavaScript content types allowed to be compressed (#2138)
|
||||
* chmod before closing file to fix compatibility with JRuby (#2133)
|
||||
* Keeps full file path for chained templates (#2117)
|
||||
* Use i18n fallbacks when looking up localized paths (#2116)
|
||||
* Compat with latest rails/activsupport < 5.2 (#2095)
|
||||
* Compat with latest rails/activesupport < 5.2 (#2095)
|
||||
* Update "Port in use"-message for PreviewServer (#2089)
|
||||
* I18n: Keep fragment and query in url_for (#2062)
|
||||
* Add support for locale suffixes to link_to (#2065)
|
||||
|
@ -46,7 +46,7 @@ master
|
|||
|
||||
# 4.2.0
|
||||
|
||||
Fix #1951. A failed build would "clean" all files in build. Possibly breaking change, "clean" and "after_build" are only run for sucessful builds.
|
||||
Fix #1951. A failed build would "clean" all files in build. Possibly breaking change, "clean" and "after_build" are only run for successful builds.
|
||||
|
||||
# 4.1.14
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ middleman server
|
|||
|
||||
The preview server allows you to build your site, by modifying the contents of the `source` directory, and see your changes reflected in the browser at: `http://localhost:4567/`
|
||||
|
||||
To get started, simply develop as you normally would by building HTML, CSS, and Javascript in the `source` directory. When you're ready to use more complex templates, simply add the templating engine's extension to the file and start writing in that format.
|
||||
To get started, simply develop as you normally would by building HTML, CSS, and JavaScript in the `source` directory. When you're ready to use more complex templates, simply add the templating engine's extension to the file and start writing in that format.
|
||||
|
||||
For example, say I am working on a stylesheet at `source/stylesheets/site.css` and I'd like to start using Sass. I would rename the file to `source/stylesheets/site.css.scss` and Middleman will automatically begin processing that file as Sass. The same would apply to CoffeeScript (`.js.coffee`), Haml (`.html.haml`) and any other templating engine you might want to use.
|
||||
|
||||
|
@ -57,7 +57,7 @@ Finally, you will want to build your project into a stand-alone site. From the p
|
|||
middleman build
|
||||
```
|
||||
|
||||
This will compile your templates and output a stand-alone site which can be easily hosted or delivered to your client. The build step can also compress images, employ Javascript & CSS dependency management, minify Javascript & CSS and run additional code of your choice. Take a look at the `config.rb` file to see some of the most common extensions which can be activated.
|
||||
This will compile your templates and output a stand-alone site which can be easily hosted or delivered to your client. The build step can also compress images, employ JavaScript & CSS dependency management, minify JavaScript & CSS and run additional code of your choice. Take a look at the `config.rb` file to see some of the most common extensions which can be activated.
|
||||
|
||||
## Learn More
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Feature: Support coffee-script
|
||||
In order to offer an alternative when writing Javascript
|
||||
In order to offer an alternative when writing JavaScript
|
||||
|
||||
Scenario: Rendering coffee script
|
||||
Given the Server is running at "coffeescript-app"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Feature: CSS and Javascripts which are minify shouldn't be re-minified
|
||||
Feature: CSS and JavaScripts which are minify shouldn't be re-minified
|
||||
|
||||
Scenario: JS files containing ".min" should not be re-compressed
|
||||
Given an empty app
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Feature: Minify Javascript
|
||||
Feature: Minify JavaScript
|
||||
In order reduce bytes sent to client and appease YSlow
|
||||
|
||||
Scenario: Rendering inline js with the feature disabled
|
||||
|
|
|
@ -11,7 +11,7 @@ Feature: Page IDs
|
|||
And I should see 'URL5: <a href="/implicit.html">Imp</a>'
|
||||
And I should see 'URL6: <a href="/folder/foldern.html">Foldern</a>'
|
||||
And I should see 'URL7: <a href="/feed.xml">Feed</a>'
|
||||
And I should see "URL8: /fourty-two.html"
|
||||
And I should see "URL8: /forty-two.html"
|
||||
|
||||
When I go to "/fm.html"
|
||||
Then I should see "I am: frontmatter"
|
||||
|
@ -46,7 +46,7 @@ Feature: Page IDs
|
|||
And I should see "URL2: /2.html"
|
||||
And I should see 'URL3: <a href="/3.html">Hi</a>'
|
||||
And I should see 'URL4: <a href="/overwrites/from-default.html">Sym</a>'
|
||||
And I should see "URL8: /fourty-two.html"
|
||||
And I should see "URL8: /forty-two.html"
|
||||
And I should see 'URL9: <a href="/implicit.html">Imp</a>'
|
||||
And I should see 'URL10: <a href="/folder/foldern.html">Foldern</a>'
|
||||
And I should see 'URL11: <a href="/feed.xml">Feed</a>'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
configure :build do
|
||||
# Minify Javascript on build
|
||||
# Minify JavaScript on build
|
||||
activate :minify_javascript
|
||||
activate :asset_hash
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
body {
|
||||
backgroud: red;
|
||||
background: red;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
configure :production do
|
||||
# activate :minify_css
|
||||
|
||||
# Minify Javascript
|
||||
# Minify JavaScript
|
||||
# activate :minify_javascript
|
||||
|
||||
# Enable cache buster
|
||||
|
|
|
@ -439,7 +439,7 @@ module Middleman
|
|||
#
|
||||
# @deprecated Prefer accessing settings through "config".
|
||||
#
|
||||
# @param [Symbol] key Name of the attribue
|
||||
# @param [Symbol] key Name of the attribute
|
||||
# @param value Attribute value
|
||||
# @return [void]
|
||||
def set(key, value = nil, &block)
|
||||
|
|
|
@ -100,10 +100,10 @@ Middleman::Extensions.register :minify_css do
|
|||
Middleman::Extensions::MinifyCss
|
||||
end
|
||||
|
||||
# MinifyJavascript compresses JS
|
||||
# MinifyJavaScript compresses JS
|
||||
Middleman::Extensions.register :minify_javascript do
|
||||
require 'middleman-core/extensions/minify_javascript'
|
||||
Middleman::Extensions::MinifyJavascript
|
||||
Middleman::Extensions::MinifyJavaScript
|
||||
end
|
||||
|
||||
# GZIP assets and pages during build
|
||||
|
|
|
@ -204,7 +204,7 @@ module Middleman
|
|||
# expose_to_application global_name: :local_name
|
||||
# @example with Array:
|
||||
# expose_to_application :method1, :method2
|
||||
# @param [Array<Sumbol>, Hash<Symbol, Symbol>] symbols An optional list of symbols representing instance methods to exposed.
|
||||
# @param [Array<Symbol>, Hash<Symbol, Symbol>] symbols An optional list of symbols representing instance methods to exposed.
|
||||
# @return [void]
|
||||
def expose_to_application(*symbols)
|
||||
self.exposed_to_application ||= {}
|
||||
|
@ -224,7 +224,7 @@ module Middleman
|
|||
# expose_to_config global_name: :local_name
|
||||
# @example with Array:
|
||||
# expose_to_config :method1, :method2
|
||||
# @param [Array<Sumbol>, Hash<Symbol, Symbol>] symbols An optional list of symbols representing instance methods to exposed.
|
||||
# @param [Array<Symbol>, Hash<Symbol, Symbol>] symbols An optional list of symbols representing instance methods to exposed.
|
||||
# @return [void]
|
||||
def expose_to_config(*symbols)
|
||||
self.exposed_to_config ||= {}
|
||||
|
@ -244,7 +244,7 @@ module Middleman
|
|||
# expose_to_template global_name: :local_name
|
||||
# @example with Array:
|
||||
# expose_to_template :method1, :method2
|
||||
# @param [Array<Sumbol>, Hash<Symbol, Symbol>] symbols An optional list of symbols representing instance methods to exposed.
|
||||
# @param [Array<Symbol>, Hash<Symbol, Symbol>] symbols An optional list of symbols representing instance methods to exposed.
|
||||
# @return [void]
|
||||
def expose_to_template(*symbols)
|
||||
self.exposed_to_template ||= {}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# This extension Gzips assets and pages when building.
|
||||
# Gzipped assets and pages can be served directly by Apache or
|
||||
# Nginx with the proper configuration, and pre-zipping means that we
|
||||
# can use a more agressive compression level at no CPU cost per request.
|
||||
# can use a more aggressive compression level at no CPU cost per request.
|
||||
#
|
||||
# Use Nginx's gzip_static directive, or AddEncoding and mod_rewrite in Apache
|
||||
# to serve your Gzipped files whenever the normal (non-.gz) filename is requested.
|
||||
|
|
|
@ -57,7 +57,7 @@ class Middleman::Extensions::MinifyCss < ::Middleman::Extension
|
|||
end
|
||||
|
||||
# Rack interface
|
||||
# @param [Rack::Environmemt] env
|
||||
# @param [Rack::Environment] env
|
||||
# @return [Array]
|
||||
def call(env)
|
||||
status, headers, response = @app.call(env)
|
||||
|
|
|
@ -2,8 +2,8 @@ require 'active_support/core_ext/object/try'
|
|||
require 'middleman-core/contracts'
|
||||
require 'memoist'
|
||||
|
||||
# Minify Javascript Extension
|
||||
class Middleman::Extensions::MinifyJavascript < ::Middleman::Extension
|
||||
# Minify JavaScript Extension
|
||||
class Middleman::Extensions::MinifyJavaScript < ::Middleman::Extension
|
||||
option :inline, false, 'Whether to minify JS inline within HTML files'
|
||||
option :ignore, [], 'Patterns to avoid minifying'
|
||||
option :compressor, proc {
|
||||
|
@ -49,7 +49,7 @@ class Middleman::Extensions::MinifyJavascript < ::Middleman::Extension
|
|||
end
|
||||
|
||||
# Rack interface
|
||||
# @param [Rack::Environmemt] env
|
||||
# @param [Rack::Environment] env
|
||||
# @return [Array]
|
||||
def call(env)
|
||||
status, headers, response = @app.call(env)
|
||||
|
|
|
@ -32,7 +32,7 @@ module Middleman
|
|||
def render(locs, opts, context, &block)
|
||||
path = @path.dup
|
||||
|
||||
# Detect the remdering engine from the extension
|
||||
# Detect the rendering engine from the extension
|
||||
extension = File.extname(path)
|
||||
engine = extension[1..-1].to_sym
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ module Middleman
|
|||
|
||||
if path_parts.size == 1
|
||||
sitemap_class = SitemapResource
|
||||
# Allow special sitemap resources to use custom metadata view calsses
|
||||
# Allow special sitemap resources to use custom metadata view classes
|
||||
sitemap_class = resource.meta_pages_class if resource.respond_to? :meta_pages_class
|
||||
|
||||
@children[first_part] = sitemap_class.new(resource)
|
||||
|
|
|
@ -212,7 +212,7 @@ module Middleman
|
|||
@cli_options[key] || config[key]
|
||||
end
|
||||
|
||||
# Trap some interupt signals and shut down smoothly
|
||||
# Trap some interrupt signals and shut down smoothly
|
||||
# @return [void]
|
||||
def register_signal_handlers
|
||||
%w[INT HUP TERM QUIT].each do |sig|
|
||||
|
|
|
@ -7,7 +7,7 @@ module Middleman
|
|||
# * server name
|
||||
# * site_addresses
|
||||
#
|
||||
# All information is "dupped" and the callback is not meant to be used to
|
||||
# All information is "duped" and the callback is not meant to be used to
|
||||
# modify these information.
|
||||
class ServerInformationCallbackProxy
|
||||
attr_reader :server_name, :port, :site_addresses, :listeners
|
||||
|
|
|
@ -28,8 +28,8 @@ module Middleman
|
|||
# Does the current page has the name of an index file?
|
||||
is_index = current_page == index_file
|
||||
# Is the `current_page` in the traversal root?
|
||||
# Note: `traversal_root` is `/` for non localised pages and `/[lang]/` for
|
||||
# localised pages.
|
||||
# Note: `traversal_root` is `/` for non localized pages and `/[lang]/` for
|
||||
# localized pages.
|
||||
at_traversal_root = !(child_path =~ /^#{traversal_root}#{current_page}$/).nil?
|
||||
|
||||
# Check that we have any path parts left after the pop because if we
|
||||
|
@ -66,8 +66,8 @@ module Middleman
|
|||
# E.g. `parts == ['en', 'blog']`, we try to find: `/en/blog.html`
|
||||
file_by_parts.call(parts)
|
||||
|
||||
# Try to find an non-localised parent instead if `traversal_root`
|
||||
# indicates the path is localised and there are still more parts
|
||||
# Try to find an non-localized parent instead if `traversal_root`
|
||||
# indicates the path is localized and there are still more parts
|
||||
# remaining, and return it.
|
||||
# E.g. `parts == ['en', 'blog']`, we try to find: `/blog.html`
|
||||
if traversal_root != '/' && parts.length > 1
|
||||
|
@ -80,7 +80,7 @@ module Middleman
|
|||
parts.pop if is_index
|
||||
index_by_parts.call(parts)
|
||||
|
||||
# Lastly, check for an non-localised index index file in the path
|
||||
# Lastly, check for an non-localized index index file in the path
|
||||
# above `current_page`'s path and return it.
|
||||
# E.g. `parts == ['en', 'blog']`, we try to find: `/index.html`
|
||||
if traversal_root == "#{parts.first}/"
|
||||
|
|
|
@ -121,7 +121,7 @@ module Middleman
|
|||
rebuild_resource_list!(:"registered_new_manipulator_#{name}")
|
||||
end
|
||||
|
||||
# Rebuild the list of resources from scratch, using registed manipulators
|
||||
# Rebuild the list of resources from scratch, using registered manipulators
|
||||
# @return [void]
|
||||
Contract Symbol => Any
|
||||
def rebuild_resource_list!(name)
|
||||
|
|
|
@ -301,7 +301,7 @@ module Middleman
|
|||
[valid_updates, valid_removes]
|
||||
end
|
||||
|
||||
# Convert a path to a file resprentation.
|
||||
# Convert a path to a file representation.
|
||||
#
|
||||
# @param [Pathname] path The path.
|
||||
# @return [Middleman::SourceFile]
|
||||
|
|
|
@ -6,7 +6,7 @@ module Middleman
|
|||
|
||||
module_function
|
||||
|
||||
# Get a recusive list of files inside a path.
|
||||
# Get a recursive list of files inside a path.
|
||||
# Works with symlinks.
|
||||
#
|
||||
# @param path Some path string or Pathname
|
||||
|
|
|
@ -87,7 +87,7 @@ describe Middleman::CoreExtensions::Data::DataStore do
|
|||
end
|
||||
|
||||
context 'given path matches callback data' do
|
||||
it 'returns value of calback lambda' do
|
||||
it 'returns value of callback lambda' do
|
||||
@subject.callbacks :foo, -> { { 'bar' => 'baz' } }
|
||||
@subject.callbacks :wu, -> { %i[tang clan] }
|
||||
|
||||
|
|
Loading…
Reference in a new issue