Skip to content

Commit 032232c

Browse files
chore: update module (#87)
1 parent c123fef commit 032232c

File tree

15 files changed

+78
-246
lines changed

15 files changed

+78
-246
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Common
2+
node_modules
3+
dist
4+
.nuxt
5+
coverage

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ node_modules
22
*.iml
33
.idea
44
*.log*
5-
.nuxt*
5+
.nuxt
66
.vscode
7-
.DS_STORE
7+
.DS_Store
88
coverage
99
dist

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export default {
4242

4343
:warning: If you are using Nuxt **< v2.9** you have to install the module as a `dependency` (No `--dev` or `--save-dev` flags) and use `modules` section in `nuxt.config.js` instead of `buildModules`.
4444

45-
4645
## Options
4746

4847
### Defaults
@@ -105,7 +104,6 @@ export default {
105104

106105
### Override a default value
107106

108-
109107
```js
110108
//nuxt.config.js
111109
export default {
@@ -121,7 +119,6 @@ export default {
121119

122120
### Append a value to the defaults
123121

124-
125122
```js
126123
//nuxt.config.js
127124
export default {
@@ -137,7 +134,6 @@ export default {
137134

138135
### Override a default value
139136

140-
141137
```js
142138
//nuxt.config.js
143139
export default {
@@ -152,6 +148,7 @@ export default {
152148
```
153149

154150
### Use custom extractors
151+
155152
Only one extractor can be applied to each file extention.
156153
If you want to apply a custom extractor to the extensions that the default extractor already covers, you have to override the default extractor. This is only possible with the functional notation.
157154

@@ -218,4 +215,3 @@ Copyright (c) Alexander Lichter
218215

219216
[license-src]: https://img.shields.io/npm/l/nuxt-purgecss.svg
220217
[license-href]: https://npmjs.com/package/nuxt-purgecss
221-

package.json

Lines changed: 18 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,36 @@
22
"name": "nuxt-purgecss",
33
"version": "1.0.0",
44
"description": "Drop superfluous CSS! A neat PurgeCSS wrapper for Nuxt.js",
5+
"keywords": [
6+
"nuxtjs",
7+
"nuxt",
8+
"nuxt-module",
9+
"purgecss",
10+
"css"
11+
],
12+
"repository": "Developmint/nuxt-purgecss",
513
"license": "MIT",
614
"contributors": [
715
{
816
"name": "Alexander Lichter <[email protected]>"
917
}
1018
],
1119
"main": "lib/module.js",
12-
"repository": {
13-
"mode": "git",
14-
"url": "git+https://github.com/Developmint/nuxt-purgecss"
15-
},
16-
"bugs": {
17-
"url": "https://github.com/Developmint/nuxt-purgecss/issues"
18-
},
19-
"publishConfig": {
20-
"access": "public"
21-
},
20+
"files": [
21+
"lib"
22+
],
2223
"scripts": {
2324
"dev": "nuxt --config-file test/fixture/configs/postcss/default.js",
2425
"lint": "eslint --ext .js,.vue .",
2526
"release": "yarn test && standard-version && git push --follow-tags && npm publish",
2627
"test": "yarn lint && jest"
2728
},
28-
"files": [
29-
"lib"
30-
],
31-
"keywords": [
32-
"nuxtjs",
33-
"nuxt",
34-
"nuxt-module",
35-
"purgecss",
36-
"css"
37-
],
38-
"engines": {
39-
"node": ">=10.0.0",
40-
"npm": ">=5.0.0"
41-
},
42-
"jest": {
43-
"testEnvironment": "node",
44-
"collectCoverage": true,
45-
"coveragePathIgnorePatterns": [
46-
"/node_modules/",
47-
"/test/fixture"
48-
],
49-
"forceExit": true
50-
},
5129
"dependencies": {
52-
"@fullhuman/postcss-purgecss": "^2.0.5",
53-
"consola": "^1.4.5",
54-
"glob-all": "^3.1.0",
55-
"purgecss": "^2.0.5",
56-
"purgecss-webpack-plugin": "^2.0.5"
30+
"@fullhuman/postcss-purgecss": "^2.1.2",
31+
"consola": "^2.11.3",
32+
"glob-all": "^3.2.1",
33+
"purgecss": "^2.1.2",
34+
"purgecss-webpack-plugin": "^2.1.2"
5735
},
5836
"devDependencies": {
5937
"@commitlint/cli": "latest",
@@ -63,14 +41,10 @@
6341
"eslint": "latest",
6442
"husky": "latest",
6543
"jest": "latest",
66-
"jsdom": "latest",
6744
"nuxt-edge": "latest",
6845
"standard-version": "latest"
6946
},
70-
"husky": {
71-
"hooks": {
72-
"pre-commit": "yarn run lint",
73-
"commit-msg": "yarn run commitlint"
74-
}
47+
"publishConfig": {
48+
"access": "public"
7549
}
7650
}

test/fixture/configs/postcss/custom-options-fn.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module.exports = {
88
resourceHints: false
99
},
1010
dev: false,
11-
modules: ['@@'],
11+
buildModules: [
12+
{ handler: require('../../../../') }
13+
],
1214
build: {
1315
quiet: false,
1416
optimization: {

test/fixture/configs/postcss/custom-options.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module.exports = {
88
resourceHints: false
99
},
1010
dev: false,
11-
modules: [['@@', { mode: 'postcss' }]],
11+
buildModules: [
12+
[require('../../../../'), { mode: 'postcss' }]
13+
],
1214
build: {
1315
quiet: false,
1416
optimization: {

test/fixture/configs/postcss/default.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module.exports = {
88
resourceHints: false
99
},
1010
dev: false,
11-
modules: ['@@'],
11+
buildModules: [
12+
{ handler: require('../../../../') }
13+
],
1214
build: {
1315
quiet: false,
1416
optimization: {

test/fixture/configs/postcss/disabled.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module.exports = {
88
resourceHints: false
99
},
1010
dev: false,
11-
modules: ['@@'],
11+
buildModules: [
12+
{ handler: require('../../../../') }
13+
],
1214
build: {
1315
quiet: false,
1416
optimization: {

test/fixture/configs/webpack/custom-options-fn.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module.exports = {
88
resourceHints: false
99
},
1010
dev: false,
11-
modules: ['@@'],
11+
buildModules: [
12+
{ handler: require('../../../../') }
13+
],
1214
build: {
1315
quiet: false,
1416
extractCSS: true,

test/fixture/configs/webpack/custom-options.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module.exports = {
88
resourceHints: false
99
},
1010
dev: false,
11-
modules: ['@@'],
11+
buildModules: [
12+
{ handler: require('../../../../') }
13+
],
1214
build: {
1315
quiet: false,
1416
extractCSS: true,

0 commit comments

Comments
 (0)