@tridion-sites/extensions-cli 0.3.2 → 0.3.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tridion-sites/extensions-cli
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 3886aff9f1: use the latest webpack and get rid of css
8
+
3
9
  ## 0.3.2
4
10
 
5
11
  ### Patch Changes
@@ -40,25 +40,19 @@
40
40
  "@types/styled-components": "5.1.26",
41
41
  "@typescript-eslint/eslint-plugin": "5.45.0",
42
42
  "@typescript-eslint/parser": "5.49.0",
43
- "autoprefixer": "10.4.13",
44
43
  "babel-loader": "9.1.2",
45
44
  "babel-plugin-styled-components": "2.0.7",
46
- "css-loader": "6.7.3",
47
- "cssnano": "5.1.14",
48
45
  "eslint": "8.32.0",
49
46
  "eslint-config-prettier": "8.6.0",
50
47
  "eslint-formatter-pretty": "4.1.0",
51
48
  "eslint-plugin-react": "7.32.1",
52
49
  "eslint-plugin-react-hooks": "4.6.0",
53
50
  "fork-ts-checker-webpack-plugin": "7.3.0",
54
- "mini-css-extract-plugin": "2.7.2",
55
- "postcss": "8.4.21",
56
- "postcss-loader": "7.0.2",
57
51
  "prettier": "2.8.3",
58
52
  "tsconfig-paths-webpack-plugin": "4.0.0",
59
53
  "typescript": "4.9.4",
60
- "webpack": "5.75.0",
61
- "webpack-cli": "5.0.1",
62
- "webpack-dev-server": "4.11.1"
54
+ "webpack": "5.82.1",
55
+ "webpack-cli": "5.1.1",
56
+ "webpack-dev-server": "4.15.0"
63
57
  }
64
58
  }
@@ -1,9 +1,7 @@
1
- import './index.css';
2
-
3
1
  import type { ExtensionModule, RuntimeInformation } from '@tridion-sites/extensions';
4
2
 
5
3
  import packageJson from '../package.json';
6
- import { initializeGlobals } from './globals';
4
+ import { initializeGlobals } from '@globals';
7
5
 
8
6
  const extensionModule: ExtensionModule = {
9
7
  runtimeInfo: packageJson as RuntimeInformation,
@@ -21,7 +21,10 @@
21
21
  "skipLibCheck": true,
22
22
  "strict": true,
23
23
  "allowJs": false,
24
- "downlevelIteration": true
24
+ "downlevelIteration": true,
25
+ "paths": {
26
+ "@globals": ["./src/globals"]
27
+ }
25
28
  },
26
29
 
27
30
  "include": ["./src/**/*.ts", "./src/**/*.tsx", "./types"]
@@ -1,8 +1,5 @@
1
1
  import { resolve, dirname } from 'path';
2
2
  import { fileURLToPath } from 'url';
3
- import autoprefixer from 'autoprefixer';
4
- import cssnano from 'cssnano';
5
- import MiniCssExtractPlugin from 'mini-css-extract-plugin';
6
3
  import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
7
4
  import { extensionsRequestBasePath } from '@tridion-sites/extensions-cli';
8
5
  import { getDevServerConfig } from './devServer.js';
@@ -36,7 +33,7 @@ export default env => ({
36
33
  '@tridion-sites/open-api-client',
37
34
  ],
38
35
  resolve: {
39
- extensions: ['.tsx', '.ts', '.jsx', '.js', '.css'],
36
+ extensions: ['.tsx', '.ts', '.jsx', '.js'],
40
37
  plugins: [new TsconfigPathsPlugin()],
41
38
  },
42
39
  module: {
@@ -46,42 +43,9 @@ export default env => ({
46
43
  exclude: /node_modules/,
47
44
  use: [{ loader: 'babel-loader' }],
48
45
  },
49
- {
50
- test: /\.css$/,
51
- use: [
52
- {
53
- loader: MiniCssExtractPlugin.loader,
54
- },
55
- {
56
- loader: 'css-loader',
57
- options: {
58
- modules: {
59
- localIdentName: '[name]__[local]__[hash:base64]',
60
- exportLocalsConvention: 'camelCaseOnly',
61
- },
62
- },
63
- },
64
- {
65
- loader: 'postcss-loader',
66
- options: {
67
- postcssOptions: {
68
- plugins: [
69
- autoprefixer(),
70
- cssnano({
71
- safe: true,
72
- autoprefixer: false,
73
- }),
74
- ],
75
- },
76
- },
77
- },
78
- ],
79
- },
80
46
  ],
81
47
  },
82
48
  plugins: [
83
- new MiniCssExtractPlugin({ filename: '[name].css' }),
84
-
85
49
  new ForkTsCheckerWebpackPlugin({
86
50
  typescript: {
87
51
  diagnosticOptions: {
@@ -1,8 +1,5 @@
1
1
  import { resolve, dirname } from 'path';
2
2
  import { fileURLToPath } from 'url';
3
- import autoprefixer from 'autoprefixer';
4
- import cssnano from 'cssnano';
5
- import MiniCssExtractPlugin from 'mini-css-extract-plugin';
6
3
  import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
7
4
  import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
8
5
 
@@ -27,7 +24,7 @@ export default {
27
24
  '@tridion-sites/open-api-client',
28
25
  ],
29
26
  resolve: {
30
- extensions: ['.tsx', '.ts', '.jsx', '.js', '.css'],
27
+ extensions: ['.tsx', '.ts', '.jsx', '.js'],
31
28
  plugins: [new TsconfigPathsPlugin()],
32
29
  },
33
30
  module: {
@@ -37,42 +34,9 @@ export default {
37
34
  exclude: /node_modules/,
38
35
  use: [{ loader: 'babel-loader' }],
39
36
  },
40
- {
41
- test: /\.css$/,
42
- use: [
43
- {
44
- loader: MiniCssExtractPlugin.loader,
45
- },
46
- {
47
- loader: 'css-loader',
48
- options: {
49
- modules: {
50
- localIdentName: '[name]__[local]__[hash:base64]',
51
- exportLocalsConvention: 'camelCaseOnly',
52
- },
53
- },
54
- },
55
- {
56
- loader: 'postcss-loader',
57
- options: {
58
- postcssOptions: {
59
- plugins: [
60
- autoprefixer(),
61
- cssnano({
62
- safe: true,
63
- autoprefixer: false,
64
- }),
65
- ],
66
- },
67
- },
68
- },
69
- ],
70
- },
71
37
  ],
72
38
  },
73
39
  plugins: [
74
- new MiniCssExtractPlugin({ filename: '[name].css' }),
75
-
76
40
  new ForkTsCheckerWebpackPlugin({
77
41
  typescript: {
78
42
  diagnosticOptions: {
package/dist/cli.js CHANGED
@@ -76,9 +76,7 @@ const copyTemplate = ({ addonId, addonRootFolderPath, author, extensionDescripti
76
76
  'devServer.js',
77
77
  'tsconfig.json',
78
78
  'src/globals.ts',
79
- 'src/index.css',
80
79
  'src/index.tsx',
81
- 'types/css.d.ts',
82
80
  ].forEach(fileName => {
83
81
  createFileFromTemplate(resolve(templatePath, `extension/${fileName}.hbs`), resolve(extensionRootFolderPath, fileName));
84
82
  });
@@ -177,7 +175,7 @@ const createAddonRootFolder = ({ path, addonDescription, addonId, addonName, aut
177
175
  description: addonDescription,
178
176
  author: author,
179
177
  });
180
- manifest.addFrontendExtension(extensionName, [`dist\\${extensionName}\\main.js`, `dist\\${extensionName}\\main.css`], `dist\\${extensionName}\\main.js`);
178
+ manifest.addFrontendExtension(extensionName, [`dist\\${extensionName}\\main.js`], `dist\\${extensionName}\\main.js`);
181
179
  manifest.writeFile(addonFolderPath);
182
180
  return addonFolderPath;
183
181
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tridion-sites/extensions-cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "CLI to develop, build and package extensions for Tridion Experience Space",
5
5
  "author": "RWS",
6
6
  "homepage": "https://www.rws.com",
File without changes
@@ -1,4 +0,0 @@
1
- declare module '*.css' {
2
- const styles: { [className: string]: string };
3
- export default styles;
4
- }