Skip to content

Commit 67569f0

Browse files
committed
Merge branch 'dev'
2 parents 48e04bb + de74534 commit 67569f0

File tree

11 files changed

+383
-5488
lines changed

11 files changed

+383
-5488
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
node_modules/
2-
dist/
3-
4-
spec/test_dist
1+
node_modules/
2+
dist/
3+
4+
spec/test_dist
5+
package-lock.json

.npmignore

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
src/
2-
spec/
3-
node_modules/
4-
.vscode/
5-
.gitignore
6-
npm-debug.log
7-
tsconfig.json
8-
.travis.yml
1+
src/
2+
spec/
3+
node_modules/
4+
.vscode/
5+
.gitignore
6+
npm-debug.log
7+
tsconfig.json
8+
.travis.yml

.travis.yml

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
language: node_js
2-
node_js:
3-
- "8"
4-
- "10"
5-
- "12"
6-
7-
env:
8-
- WEBPACK_VERSION=4 HTML_PLUGIN_VERSION=3
9-
- WEBPACK_VERSION=4 HTML_PLUGIN_VERSION=next
10-
# - WEBPACK_VERSION=5.0.0-alpha.12 HTML_PLUGIN_VERSION=next
11-
12-
install:
13-
- npm install
14-
- npm install -D webpack@$WEBPACK_VERSION || true
15-
- npm install -D html-webpack-plugin@$HTML_PLUGIN_VERSION || true
16-
17-
script:
18-
- npm test
19-
- npm run build
20-
21-
deploy:
22-
skip_cleanup: true
23-
on:
24-
repo: swimmadude66/webpack-nomodule-plugin
25-
node: "10"
26-
tags: true
27-
branch: master
28-
if: env(WEBPACK_VERSION)=4 AND env(HTML_PLUGIN_VERSION)=3
29-
provider: npm
30-
31-
api_key:
32-
secure: "KLe0spEfJBgExBmnB4fAo6L8s9CclKFKU8rcnsNhbuGsJdqowkmcj4ahNf5lAm94Acral+ui2Ir+McAvfi5R6KIysNFnhEtMfMTQQ+1IwhRD6AfOGdEsjWFuLb9yVwAVSq5NSxa/G/fIW+0Zp/bWWiltURLjsWwJhtBbaij4/16Chu5VHZ5LX2TU5F1TJCjJqNQfh2pZH6Xh05j+FvaIaC0WIre3ZKpm0mdJJY241+dzynXw3ctVSHopR2WvzVyXbtR+/M/S4NfrgGwk0RV8KHfGjGbIxwpfuzbTvcPfQkbso6Y6ysy6EwWXbPt9qIQP7okVU8nSI7rq5m3pKlq94dKENkeEGCcOzBvKzmNHwsLPIYBbwhkQZ4ELe1OOFe+9mLih6QU4e+/nALsORF28vTFd4b5jzJq0i/Fpx6EleKqh0yeL9rVuD4KDAEdVDyqGMzIBkleS3nJE+Hs+7EQmL6UXuKUh1ttpHMNQ8zPaDmo4lMy8MYM3kKoUUxKxZ8GcjdgDJSqLMg2oR2KDu1HItXl/M4JzbjzRAf1+T3jwprpJgIJoq4nHLQHFpgH26T3Ue4UCCztHe6NIE0qD+OId8fI+QTUo3Ju+sng/oR4NUdTaW7SSrrB4ts2g5CX/2cuGBv2yWTjcfhjtDLLcYAnONJS5mhO7aAGi4F+3JCJArms="
1+
language: node_js
2+
node_js:
3+
- "8"
4+
- "10"
5+
- "12"
6+
7+
env:
8+
- WEBPACK_VERSION=4 HTML_PLUGIN_VERSION=3
9+
- WEBPACK_VERSION=4 HTML_PLUGIN_VERSION=4
10+
- WEBPACK_VERSION=4 HTML_PLUGIN_VERSION=5
11+
- WEBPACK_VERSION=5 HTML_PLUGIN_VERSION=5
12+
13+
install:
14+
- npm install
15+
- npm install -D webpack@$WEBPACK_VERSION || true
16+
- npm install -D html-webpack-plugin@$HTML_PLUGIN_VERSION || true
17+
18+
script:
19+
- npm test
20+
- npm run build
21+
22+
deploy:
23+
skip_cleanup: true
24+
on:
25+
repo: swimmadude66/webpack-nomodule-plugin
26+
node: "10"
27+
tags: true
28+
branch: master
29+
if: env(WEBPACK_VERSION)=4 AND env(HTML_PLUGIN_VERSION)=3
30+
provider: npm
31+
32+
api_key:
33+
secure: "KLe0spEfJBgExBmnB4fAo6L8s9CclKFKU8rcnsNhbuGsJdqowkmcj4ahNf5lAm94Acral+ui2Ir+McAvfi5R6KIysNFnhEtMfMTQQ+1IwhRD6AfOGdEsjWFuLb9yVwAVSq5NSxa/G/fIW+0Zp/bWWiltURLjsWwJhtBbaij4/16Chu5VHZ5LX2TU5F1TJCjJqNQfh2pZH6Xh05j+FvaIaC0WIre3ZKpm0mdJJY241+dzynXw3ctVSHopR2WvzVyXbtR+/M/S4NfrgGwk0RV8KHfGjGbIxwpfuzbTvcPfQkbso6Y6ysy6EwWXbPt9qIQP7okVU8nSI7rq5m3pKlq94dKENkeEGCcOzBvKzmNHwsLPIYBbwhkQZ4ELe1OOFe+9mLih6QU4e+/nALsORF28vTFd4b5jzJq0i/Fpx6EleKqh0yeL9rVuD4KDAEdVDyqGMzIBkleS3nJE+Hs+7EQmL6UXuKUh1ttpHMNQ8zPaDmo4lMy8MYM3kKoUUxKxZ8GcjdgDJSqLMg2oR2KDu1HItXl/M4JzbjzRAf1+T3jwprpJgIJoq4nHLQHFpgH26T3Ue4UCCztHe6NIE0qD+OId8fI+QTUo3Ju+sng/oR4NUdTaW7SSrrB4ts2g5CX/2cuGBv2yWTjcfhjtDLLcYAnONJS5mhO7aAGi4F+3JCJArms="

LICENSE

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
2-
3-
Copyright (c) 2019 Adam Yost
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
MIT License
2+
3+
Copyright (c) 2021 Adam Yost
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
1-
# Webpack Nomodule Plugin
2-
_Assigns the `nomodule` attribute to script tags injected by [Html Webpack Plugin](https://github.com/jantimon/html-webpack-plugin)_
3-
4-
## Configuration
5-
6-
1. Install via `npm i -D webpack-nomodule-plugin`
7-
1. Add to your webpack config AFTER HtmlWebpackPlugin
8-
```javascript
9-
var NoModulePlugin = require('webpack-nomodule-plugin').WebpackNoModulePlugin;
10-
// OR for import style
11-
import {WebpackNoModulePlugin} from 'webpack-nomodule-plugin'
12-
...
13-
plugins: [
14-
new HtmlWebpackPlugin({
15-
filename: join(OUTPUT_DIR, './dist/index.html'),
16-
hash: false,
17-
inject: 'body',
18-
minify: minifyOptions,
19-
showErrors: false
20-
template: join(__dirname, './src/index.html'),
21-
}),
22-
new WebpackNoModulePlugin({
23-
filePatterns: ['polyfill.**.js']
24-
})
25-
]
26-
```
27-
28-
The plugin takes a configuration argument with a key called `filePatterns`. This is an array of file globs (provided via [minimatch](https://github.com/isaacs/minimatch)) representing which injected script tags to flag as nomodule. **Scripts with this attribute will not be executed on newer browsers, so IE and other browser polyfills can be skipped if not needed.**
29-
30-
31-
## Testing
32-
Testing is done via ts-node and mocha. Test files can be found in `/spec`, and will be auto-discovered as long as the file ends in `.spec.ts`. Just run `npm test` after installing to see the tests run.
1+
# Webpack Nomodule Plugin
2+
_Assigns the `nomodule` attribute to script tags injected by [Html Webpack Plugin](https://github.com/jantimon/html-webpack-plugin)_
3+
4+
[![Build Status](https://travis-ci.org/swimmadude66/webpack-nomodule-plugin.svg?branch=master)](https://travis-ci.org/swimmadude66/webpack-nomodule-plugin)
5+
6+
## Configuration
7+
8+
1. Install via `npm i -D webpack-nomodule-plugin`
9+
1. Add to your webpack config AFTER HtmlWebpackPlugin
10+
```javascript
11+
var NoModulePlugin = require('webpack-nomodule-plugin').WebpackNoModulePlugin;
12+
// OR for import style
13+
import {WebpackNoModulePlugin} from 'webpack-nomodule-plugin'
14+
...
15+
plugins: [
16+
new HtmlWebpackPlugin({
17+
filename: join(OUTPUT_DIR, './dist/index.html'),
18+
hash: false,
19+
inject: 'body',
20+
minify: minifyOptions,
21+
showErrors: false
22+
template: join(__dirname, './src/index.html'),
23+
}),
24+
new WebpackNoModulePlugin({
25+
filePatterns: ['polyfill.**.js']
26+
})
27+
]
28+
```
29+
30+
The plugin takes a configuration argument with a key called `filePatterns`. This is an array of file globs (provided via [minimatch](https://github.com/isaacs/minimatch)) representing which injected script tags to flag as nomodule. **Scripts with this attribute will not be executed on newer browsers, so IE and other browser polyfills can be skipped if not needed.**
31+
32+
33+
## Testing
34+
Testing is done via ts-node and mocha. Test files can be found in `/spec`, and will be auto-discovered as long as the file ends in `.spec.ts`. Just run `npm test` after installing to see the tests run.

0 commit comments

Comments
 (0)