Skip to content

Commit 096f75c

Browse files
Normalising with other plugins
1 parent 2162c64 commit 096f75c

4 files changed

Lines changed: 58 additions & 28 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
/index.*
1010
node_modules
1111
package-lock.json
12+
dist

.rollup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import babel from 'rollup-plugin-babel';
33
export default {
44
input: 'src/index.js',
55
output: [
6-
{ file: 'index.js', format: 'cjs', sourcemap: true, strict: false, exports: 'auto' },
7-
{ file: 'index.mjs', format: 'esm', sourcemap: true, strict: false, exports: 'auto' }
6+
{ file: 'dist/index.cjs', format: 'cjs', sourcemap: false, strict: false, exports: 'auto' },
7+
{ file: 'dist/index.mjs', format: 'esm', sourcemap: false, strict: false, exports: 'auto' }
88
],
99
plugins: [
1010
babel({

.tape.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const postcss = require('postcss');
22
const postcssNesting = require('postcss-nesting');
3-
const postcssExtends = require('.');
3+
const postcssExtends = require('./dist');
44

55
module.exports = {
66
'basic': {

package.json

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,90 @@
44
"description": "Use the @extend at-rule and functional selectors in CSS",
55
"author": "Jonathan Neal <[email protected]>",
66
"license": "CC0-1.0",
7-
"repository": "csstools/postcss-extend-rule",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/csstools/postcss-extend-rule.git"
10+
},
811
"homepage": "https://github.com/csstools/postcss-extend-rule#readme",
912
"bugs": "https://github.com/csstools/postcss-extend-rule/issues",
10-
"main": "index.js",
11-
"module": "index.mjs",
13+
"main": "dist/index.cjs",
14+
"module": "dist/index.mjs",
15+
"exports": {
16+
".": {
17+
"import": "./dist/index.mjs",
18+
"require": "./dist/index.cjs",
19+
"default": "./dist/index.mjs"
20+
}
21+
},
1222
"files": [
13-
"index.js",
14-
"index.js.map",
15-
"index.mjs",
16-
"index.mjs.map"
23+
"CHANGELOG.md",
24+
"LICENSE.md",
25+
"README.md",
26+
"dist"
1727
],
1828
"scripts": {
1929
"build": "rollup --config .rollup.js --silent",
20-
"prepublishOnly": "npm test",
21-
"pretest:tape": "npm run build",
22-
"test": "npm run test:js && npm run test:tape",
23-
"test:js": "eslint src/{*,**/*}.js --cache --ignore-path .gitignore --quiet",
30+
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"",
31+
"prepublishOnly": "npm run clean && npm run build && npm run test",
32+
"test": "npm run lint && npm run test:tape",
33+
"lint": "eslint src/{*,**/*}.js --cache --ignore-path .gitignore --quiet",
2434
"test:tape": "postcss-tape"
2535
},
2636
"engines": {
2737
"node": "^12 || ^14 || >=16"
2838
},
2939
"dependencies": {
30-
"postcss-nesting": "^10.1.2",
31-
"postcss-tape": "^6.0.1"
40+
"postcss-nesting": "^10.1.2"
3241
},
3342
"devDependencies": {
34-
"@babel/core": "^7.16.12",
43+
"@babel/core": "^7.17.2",
44+
"@babel/eslint-parser": "^7.17.0",
3545
"@babel/preset-env": "^7.16.11",
36-
"@babel/eslint-parser": "^7.16.5",
3746
"eslint": "^8.8.0",
38-
"postcss": "^8.4.5",
39-
"pre-commit": "^1.2.2",
40-
"rollup": "^2.66.1",
47+
"postcss": "^8.4.6",
48+
"postcss-tape": "^6.0.1",
49+
"rollup": "^2.67.2",
4150
"rollup-plugin-babel": "^4.4.0"
4251
},
4352
"peerDependencies": {
44-
"postcss": "^8.4.5"
53+
"postcss": "^8.4.6"
4554
},
4655
"postcssConfig": {
4756
"config": ".tape.js"
4857
},
4958
"eslintConfig": {
5059
"env": {
51-
"browser": true,
5260
"es6": true,
5361
"node": true
5462
},
5563
"extends": "eslint:recommended",
56-
"parser": "@babel/eslint-parser",
64+
"rules": {
65+
"quotes": [
66+
"error",
67+
"single"
68+
],
69+
"comma-dangle": [
70+
"error",
71+
"always-multiline"
72+
],
73+
"semi": [
74+
"error",
75+
"always"
76+
],
77+
"curly": "error",
78+
"brace-style": "error",
79+
"indent": [
80+
"error",
81+
"tab",
82+
{
83+
"SwitchCase": 1
84+
}
85+
],
86+
"radix": "error"
87+
},
5788
"parserOptions": {
58-
"ecmaVersion": 2018,
59-
"impliedStrict": true,
60-
"sourceType": "module",
61-
"requireConfigFile": false
89+
"ecmaVersion": 2020,
90+
"sourceType": "module"
6291
},
6392
"root": true
6493
},

0 commit comments

Comments
 (0)