Skip to content

Commit

Permalink
Merge pull request #1 from homer0/homer0_typos
Browse files Browse the repository at this point in the history
Typos
  • Loading branch information
Leonardo Apiwan committed Feb 11, 2018
2 parents c3143e3 + a4a4e8f commit eb1333f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 86 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -34,7 +34,7 @@ class MyService {
## Usage

1. You first need the build engine, so install [`woopack-plugin-webpack`](https://yarnpkg.com/en/package/woopack-plugin-webpack).
2. If you changed, set your target `engine` setting to `webpack`.
2. If you changed it, set your target `engine` setting to `webpack`.
3. Add a new setting to your target named `framework` and set its value to `angularjs`.
4. Done

Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -13,7 +13,7 @@

},
"devDependencies": {
"wootils": "^1.0.5",
"wootils": "^1.1.1",
"eslint": "4.16.0",
"eslint-config-airbnb-base": "12.1.0",
"eslint-plugin-import": "2.8.0",
Expand All @@ -25,7 +25,6 @@
"esdoc": "1.0.4",
"esdoc-standard-plugin": "1.0.0",
"esdoc-node": "1.0.3",
"leasot": "4.13.0",
"coveralls": "3.0.0"
},
"engine-strict": true,
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
@@ -1,7 +1,7 @@
const WoopackAngularJSPlugin = require('./plugin');
/**
* This is the method called by Woopack when loading the plugin and it takes care of creating
* a new instance of the plugin main class and using it to register on Woopack.
* This is the method called by Woopack when loading the plugin. It takes care of creating
* a new instance of the plugin class and use it to register for the required events.
* @param {Woopack} app The Woopack main container.
* @ignore
*/
Expand Down
20 changes: 10 additions & 10 deletions src/plugin.js
Expand Up @@ -9,13 +9,13 @@ class WoopackAngularJSPlugin {
*/
constructor() {
/**
* The name of the reducer event the service uses to reduce the rules configuration after
* creating it.
* The name of the reducer event this service uses to intercept a rules configuration in order
* to update it.
* @type {string}
*/
this.eventName = 'webpack-js-rules-configuration-for-browser';
/**
* The required value a target `framework` setting needs to have in order for the plugin to
* The required value a target `framework` setting needs to have in order for the service to
* take action.
* @type {string}
*/
Expand Down Expand Up @@ -58,9 +58,9 @@ class WoopackAngularJSPlugin {
* This method gets called when Woopack reduces the JS rules for browser targets. It
* validates the target, adds the plugin loader and modifies, if necessary, the configuration for
* Babel.
* @param {Array} currentRules The list of JS loaders for the Webpack configuration.
* @param {Array} currentRules The list of JS rules for the Webpack configuration.
* @param {Target} target The target information.
* @return {Array} The updated list of loaders.
* @return {Array} The updated list of rules.
*/
updateRules(currentRules, target) {
let updatedRules;
Expand All @@ -81,22 +81,22 @@ class WoopackAngularJSPlugin {
baseJSRule.use.unshift(this.loaderName);
// Get the index of the Babel loader.
const babelLoaderIndex = this._findBabelLoaderIndex(baseJSRule.use);
// If the Babel loader is present...
// If the Babel loader is preset...
if (babelLoaderIndex > -1) {
// ...replace it with an updated version.
baseJSRule.use[babelLoaderIndex] = this._updateBabelLoader(
baseJSRule.use[babelLoaderIndex]
);
}
} else {
// ...otherwise, just set to return the received loaders.
// ...otherwise, just set to return the received rules.
updatedRules = currentRules;
}

return updatedRules;
}
/**
* Finds the index of the Babel loader in a list of loaders.
* Finds the index of the Babel loader on a list of loaders.
* @param {Array} loaders The list of loaders.
* @return {number}
* @ignore
Expand Down Expand Up @@ -136,8 +136,8 @@ class WoopackAngularJSPlugin {
if (options.presets && options.presets.length) {
// ...find the index of the `env` preset.
envPresetIndex = options.presets.findIndex((preset) => {
const [presentName] = preset;
return presentName === 'env';
const [presetName] = preset;
return presetName === 'env';
});
// Validate that the `env` preset is on the options.
hasEnvPreset = envPresetIndex > -1;
Expand Down
80 changes: 9 additions & 71 deletions yarn.lock
Expand Up @@ -206,7 +206,7 @@ async@^1.4.0:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"

async@^2.1.2, async@^2.1.4:
async@^2.1.4:
version "2.6.0"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
dependencies:
Expand Down Expand Up @@ -871,7 +871,7 @@ chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"

chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0:
chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
dependencies:
Expand Down Expand Up @@ -1004,7 +1004,7 @@ commander@2.12.x:
version "2.12.2"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555"

commander@^2.9.0, commander@~2.13.0:
commander@~2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"

Expand Down Expand Up @@ -1190,13 +1190,6 @@ diff@^3.2.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"

dir-glob@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034"
dependencies:
arrify "^1.0.1"
path-type "^3.0.0"

doctrine@1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
Expand Down Expand Up @@ -1810,18 +1803,10 @@ get-caller-file@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"

get-line-from-pos@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/get-line-from-pos/-/get-line-from-pos-1.0.0.tgz#e3ca483035eef374ad40fff4d43df3fa2da328b3"

get-stdin@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"

get-stdin@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"

get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
Expand Down Expand Up @@ -1875,17 +1860,6 @@ globby@^5.0.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"

globby@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
dependencies:
array-union "^1.0.1"
dir-glob "^2.0.0"
glob "^7.1.2"
ignore "^3.3.5"
pify "^3.0.0"
slash "^1.0.0"

graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
Expand Down Expand Up @@ -2068,7 +2042,7 @@ iconv-lite@0.4.19, iconv-lite@^0.4.17:
version "0.4.19"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"

ignore@^3.3.3, ignore@^3.3.5, ignore@^3.3.6:
ignore@^3.3.3, ignore@^3.3.6:
version "3.3.7"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"

Expand Down Expand Up @@ -2710,10 +2684,6 @@ json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"

json2xml@^0.1.2:
version "0.1.3"
resolved "https://registry.yarnpkg.com/json2xml/-/json2xml-0.1.3.tgz#9ae7c220bedd7c66a668e26f7ac182f6704eca21"

json5@^0.5.0, json5@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
Expand Down Expand Up @@ -2775,22 +2745,6 @@ lcov-parse@^0.0.10:
version "0.0.10"
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"

leasot@4.13.0:
version "4.13.0"
resolved "https://registry.yarnpkg.com/leasot/-/leasot-4.13.0.tgz#59edc54bcb2fc5141a0bb3c5c8f69bb6a2a45d62"
dependencies:
async "^2.1.2"
chalk "^2.3.0"
commander "^2.9.0"
get-line-from-pos "^1.0.0"
get-stdin "^5.0.1"
globby "^7.1.1"
json2xml "^0.1.2"
lodash "^4.16.4"
log-symbols "^2.1.0"
strip-ansi "^4.0.0"
text-table "^0.2.0"

left-pad@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
Expand Down Expand Up @@ -2896,20 +2850,14 @@ lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"

lodash@^4.1.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.16.4, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0:
lodash@^4.1.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"

log-driver@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056"

log-symbols@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
dependencies:
chalk "^2.0.1"

longest@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
Expand Down Expand Up @@ -3330,12 +3278,6 @@ path-type@^2.0.0:
dependencies:
pify "^2.0.0"

path-type@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
dependencies:
pify "^3.0.0"

performance-now@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
Expand All @@ -3348,10 +3290,6 @@ pify@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"

pify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"

pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
Expand Down Expand Up @@ -4021,7 +3959,7 @@ test-exclude@^4.1.1:
read-pkg-up "^1.0.1"
require-main-filename "^1.0.1"

text-table@^0.2.0, text-table@~0.2.0:
text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"

Expand Down Expand Up @@ -4228,9 +4166,9 @@ window-size@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"

wootils@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/wootils/-/wootils-1.0.5.tgz#8e7c35b8d2167e93c967c6a3c6522712579172e7"
wootils@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/wootils/-/wootils-1.1.1.tgz#159e2bdd0f6249b07dce08f8ffc029874b631ca6"
dependencies:
colors "1.1.2"
fs-extra "5.0.0"
Expand Down

0 comments on commit eb1333f

Please sign in to comment.