From d9b0c8e03408634203bd28734aa40f7942976c50 Mon Sep 17 00:00:00 2001 From: Luke Horvat Date: Sun, 19 Jan 2020 17:47:26 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Update=20readme=20=E2=80=93=20the=20`ignore?= =?UTF-8?q?`=20option=20is=20now=20a=20regex=20array?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 440d6d6..0b3d8b5 100644 --- a/README.md +++ b/README.md @@ -127,9 +127,9 @@ $ browserify -t [ babelify --sourceMapsAbsolute ] ```javascript browserify().transform(babelify.configure({ - // Optional ignore regex - if any filenames **do** match this regex then - // they aren't compiled - ignore: /regex/, + // Optional 'ignore' regex array - if any filenames **do** match a regex in + // this array, then they aren't compiled. + ignore: [/regex/], // Optional only regex - if any filenames **don't** match this regex // then they aren't compiled @@ -138,7 +138,7 @@ browserify().transform(babelify.configure({ ``` ```sh -$ browserify -t [ babelify --ignore regex --only my_es6_folder ] +$ browserify -t [ babelify --ignore [ regex ] --only my_es6_folder ] ``` #### Babel result (metadata and others) @@ -192,7 +192,7 @@ Another solution (proceed with caution!) is to run babelify as a [global](https: ```js browserify().transform("babelify", { global: true, - ignore: /\/node_modules\/(?!app\/)/ + ignore: [/\/node_modules\/(?!app\/)/] }); ``` From a3c351d378d8a17098c495dfedc76394ca24cef1 Mon Sep 17 00:00:00 2001 From: Luke Horvat Date: Sun, 19 Jan 2020 17:53:54 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Update=20readme=20=E2=80=93=20the=20`only`?= =?UTF-8?q?=20option=20is=20now=20a=20regex=20array?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0b3d8b5..87e434e 100644 --- a/README.md +++ b/README.md @@ -131,14 +131,14 @@ browserify().transform(babelify.configure({ // this array, then they aren't compiled. ignore: [/regex/], - // Optional only regex - if any filenames **don't** match this regex - // then they aren't compiled - only: /my_es6_folder/ + // Optional 'only' regex array - if any filenames **don't** match a regex in + // this array, then they aren't compiled. + only: [/my_es6_folder/] })) ``` ```sh -$ browserify -t [ babelify --ignore [ regex ] --only my_es6_folder ] +$ browserify -t [ babelify --ignore [ regex ] --only [ my_es6_folder ] ] ``` #### Babel result (metadata and others) From 4fbd8983d431944864f10c598a4937ca02746da4 Mon Sep 17 00:00:00 2001 From: Luke Horvat Date: Sun, 19 Jan 2020 18:07:37 +0100 Subject: [PATCH 3/3] https readme links --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 87e434e..5eb43d7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [Babel](https://github.com/babel/babel) [browserify](https://github.com/substack/node-browserify) transform. -As of [Babel 6.0.0](http://babeljs.io/blog/2015/10/29/6.0.0/) there are **no plugins included by default**. For babelify to be useful, you must also include some [presets](http://babeljs.io/docs/plugins/#presets) and/or [plugins](http://babeljs.io/docs/plugins/#transform). +As of [Babel 6.0.0](https://babeljs.io/blog/2015/10/29/6.0.0/) there are **no plugins included by default**. For babelify to be useful, you must also include some [presets](https://babeljs.io/docs/plugins/#presets) and/or [plugins](https://babeljs.io/docs/plugins/#transform). ## Installation @@ -33,7 +33,7 @@ browserify("./script.js") .pipe(fs.createWriteStream("bundle.js")); ``` -**NOTE:** [Presets and plugins](http://babeljs.io/docs/plugins/) need to be installed as separate modules. For the above examples to work, you'd need to also install [`@babel/preset-env`](https://www.npmjs.com/package/@babel/preset-env) and [`@babel/preset-react`](https://www.npmjs.com/package/@babel/preset-react): +**NOTE:** [Presets and plugins](https://babeljs.io/docs/plugins/) need to be installed as separate modules. For the above examples to work, you'd need to also install [`@babel/preset-env`](https://www.npmjs.com/package/@babel/preset-env) and [`@babel/preset-react`](https://www.npmjs.com/package/@babel/preset-react): ```sh $ npm install --save-dev @babel/preset-env @babel/preset-react @@ -41,7 +41,7 @@ $ npm install --save-dev @babel/preset-env @babel/preset-react ### Options -Selected options are discussed below. See the [babel](http://babeljs.io/) docs for the complete list of [options](http://babeljs.io/docs/usage/options/). +Selected options are discussed below. See the [babel](https://babeljs.io/) docs for the complete list of [options](https://babeljs.io/docs/usage/options/). Options may be passed in via standard [browserify](https://github.com/substack/node-browserify#btransformtr-opts) ways: @@ -187,7 +187,7 @@ specify options then you can use: } ``` -Another solution (proceed with caution!) is to run babelify as a [global](https://github.com/substack/node-browserify#btransformtr-opts) transform. Use the babel [`ignore` option](http://babeljs.io/docs/usage/options/) to narrow the number of files transformed: +Another solution (proceed with caution!) is to run babelify as a [global](https://github.com/substack/node-browserify#btransformtr-opts) transform. Use the babel [`ignore` option](https://babeljs.io/docs/usage/options/) to narrow the number of files transformed: ```js browserify().transform("babelify", {