@modern-js/plugin-tailwindcss 1.2.3 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +10 -0
- package/CHANGELOG.md +40 -0
- package/dist/js/node/cli.js +45 -43
- package/dist/js/node/index.js +0 -2
- package/dist/types/cli.d.ts +3 -1
- package/dist/types/index.d.ts +0 -1
- package/jest.config.js +0 -1
- package/modern.config.js +7 -1
- package/package.json +5 -12
- package/dist/js/node/types.js +0 -3
- package/dist/types/types.d.ts +0 -6
package/.eslintrc.js
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
module.exports = {
|
2
|
+
root: true,
|
3
|
+
extends: ['@modern-js'],
|
4
|
+
parserOptions: {
|
5
|
+
// the base path used to search for `tsconfig.json`
|
6
|
+
tsconfigRootDir: __dirname,
|
7
|
+
// the relative path to sub-package's `tsconfig.json`
|
8
|
+
project: ['./tsconfig.json'],
|
9
|
+
},
|
10
|
+
};
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,45 @@
|
|
1
1
|
# @modern-js/plugin-tailwindcss
|
2
2
|
|
3
|
+
## 1.2.6
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- bebb39b6: chore: improve devDependencies and peerDependencies
|
8
|
+
- 132f7b53: feat: move config declarations to @modern-js/core
|
9
|
+
- Updated dependencies [bebb39b6]
|
10
|
+
- Updated dependencies [132f7b53]
|
11
|
+
- @modern-js/plugin-design-token@1.0.3
|
12
|
+
- @modern-js/utils@1.3.7
|
13
|
+
|
14
|
+
## 1.2.5
|
15
|
+
|
16
|
+
### Patch Changes
|
17
|
+
|
18
|
+
- b851d628: feat: convert to new plugin
|
19
|
+
- 61e3f623: feat: convert to new plugin
|
20
|
+
- Updated dependencies [c2046f37]
|
21
|
+
- Updated dependencies [10379961]
|
22
|
+
- Updated dependencies [61e3f623]
|
23
|
+
- @modern-js/utils@1.3.6
|
24
|
+
- @modern-js/plugin-design-token@1.0.2
|
25
|
+
|
26
|
+
## 1.2.4
|
27
|
+
|
28
|
+
### Patch Changes
|
29
|
+
|
30
|
+
- 83059b93: fix tailwindcss type reference
|
31
|
+
- 83059b93: fix tailwindcss generator
|
32
|
+
- Updated dependencies [969f172f]
|
33
|
+
- Updated dependencies [4c792f68]
|
34
|
+
- Updated dependencies [4b5d4bf4]
|
35
|
+
- Updated dependencies [62f5b8c8]
|
36
|
+
- Updated dependencies [55e18278]
|
37
|
+
- Updated dependencies [4499a674]
|
38
|
+
- Updated dependencies [403f5169]
|
39
|
+
- Updated dependencies [a7f42f48]
|
40
|
+
- @modern-js/core@1.4.4
|
41
|
+
- @modern-js/utils@1.3.3
|
42
|
+
|
3
43
|
## 1.2.3
|
4
44
|
|
5
45
|
### Patch Changes
|
package/dist/js/node/cli.js
CHANGED
@@ -7,54 +7,56 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _utils = require("@modern-js/utils");
|
9
9
|
|
10
|
-
var
|
11
|
-
|
12
|
-
const core = _utils.Import.lazy('@modern-js/core', require); // support designSystem.supportStyledComponents
|
13
|
-
|
14
|
-
|
15
|
-
core.usePlugins([require.resolve('@modern-js/plugin-design-token/cli')]);
|
10
|
+
var _cli = _interopRequireDefault(require("@modern-js/plugin-design-token/cli"));
|
16
11
|
|
17
|
-
var
|
18
|
-
validateSchema() {
|
19
|
-
return _utils.PLUGIN_SCHEMAS['@modern-js/plugin-tailwindcss'];
|
20
|
-
},
|
12
|
+
var _tailwind = require("./tailwind");
|
21
13
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
+
|
16
|
+
var _default = () => ({
|
17
|
+
name: '@modern-js/plugin-tailwindcss',
|
18
|
+
// support designSystem.supportStyledComponents
|
19
|
+
usePlugins: [(0, _cli.default)()],
|
20
|
+
setup: api => ({
|
21
|
+
validateSchema() {
|
22
|
+
return _utils.PLUGIN_SCHEMAS['@modern-js/plugin-tailwindcss'];
|
23
|
+
},
|
24
|
+
|
25
|
+
config() {
|
26
|
+
return {
|
27
|
+
tools: {
|
28
|
+
// TODO: Add interface about postcss config
|
29
|
+
// TODO: In module project, also is called, but should not be called.
|
30
|
+
postcss: config => {
|
31
|
+
const modernConfig = api.useResolvedConfigContext();
|
32
|
+
const tailwindConfig = (0, _tailwind.getTailwindConfig)(modernConfig, {
|
33
|
+
pureConfig: {
|
34
|
+
content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx', // about storybook
|
35
|
+
'./storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
|
36
|
+
}
|
37
|
+
});
|
38
|
+
|
39
|
+
if (Array.isArray(config.postcssOptions.plugins)) {
|
40
|
+
config.postcssOptions.plugins.push(require('tailwindcss')(tailwindConfig));
|
41
|
+
} else {
|
42
|
+
config.postcssOptions.plugins = [require('tailwindcss')(tailwindConfig)];
|
33
43
|
}
|
34
|
-
});
|
35
|
-
|
36
|
-
if (Array.isArray(config.postcssOptions.plugins)) {
|
37
|
-
config.postcssOptions.plugins.push(require('tailwindcss')(tailwindConfig));
|
38
|
-
} else {
|
39
|
-
config.postcssOptions.plugins = [require('tailwindcss')(tailwindConfig)];
|
40
44
|
}
|
41
45
|
}
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
}
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
}), {
|
57
|
-
name: '@modern-js/plugin-tailwindcss'
|
46
|
+
};
|
47
|
+
},
|
48
|
+
|
49
|
+
moduleTailwindConfig() {
|
50
|
+
const modernConfig = api.useResolvedConfigContext();
|
51
|
+
const tailwindConfig = (0, _tailwind.getTailwindConfig)(modernConfig, {
|
52
|
+
pureConfig: {
|
53
|
+
content: ['./src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx', './src/**/*.less', './src/**/*.css', './src/**/*.sass', './src/**/*.scss', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
|
54
|
+
}
|
55
|
+
});
|
56
|
+
return require('tailwindcss')(tailwindConfig);
|
57
|
+
}
|
58
|
+
|
59
|
+
})
|
58
60
|
});
|
59
61
|
|
60
62
|
exports.default = _default;
|
package/dist/js/node/index.js
CHANGED
package/dist/types/cli.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
package/jest.config.js
CHANGED
package/modern.config.js
CHANGED
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.2.
|
14
|
+
"version": "1.2.6",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/types/index.d.ts",
|
17
17
|
"main": "./dist/js/node/index.js",
|
@@ -33,13 +33,13 @@
|
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
35
|
"@babel/runtime": "^7",
|
36
|
-
"@modern-js/utils": "^1.3.
|
37
|
-
"@modern-js/plugin-design-token": "^1.0.
|
36
|
+
"@modern-js/utils": "^1.3.7",
|
37
|
+
"@modern-js/plugin-design-token": "^1.0.3",
|
38
38
|
"lodash.clonedeep": "^4.5.0",
|
39
39
|
"lodash.merge": "^4.6.2"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
|
-
"@modern-js/core": "
|
42
|
+
"@modern-js/core": "1.6.1",
|
43
43
|
"@scripts/build": "0.0.0",
|
44
44
|
"@types/jest": "^26",
|
45
45
|
"@types/lodash.clonedeep": "^4.5.6",
|
@@ -52,23 +52,16 @@
|
|
52
52
|
"@scripts/jest-config": "0.0.0"
|
53
53
|
},
|
54
54
|
"peerDependencies": {
|
55
|
-
"@modern-js/core": "^1.4.3",
|
56
55
|
"tailwindcss": "^2.0.4"
|
57
56
|
},
|
58
57
|
"sideEffects": false,
|
59
|
-
"modernConfig": {
|
60
|
-
"output": {
|
61
|
-
"packageFields": {
|
62
|
-
"main": "CJS+ES6"
|
63
|
-
}
|
64
|
-
}
|
65
|
-
},
|
66
58
|
"publishConfig": {
|
67
59
|
"registry": "https://registry.npmjs.org/",
|
68
60
|
"access": "public"
|
69
61
|
},
|
70
62
|
"scripts": {
|
71
63
|
"new": "modern new",
|
64
|
+
"dev": "modern build --watch",
|
72
65
|
"build": "modern build",
|
73
66
|
"test": "jest --passWithNoTests"
|
74
67
|
},
|
package/dist/js/node/types.js
DELETED