@commercetools-frontend/mc-scripts 20.10.4 → 20.10.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.
File without changes
@@ -67,14 +67,16 @@ const generateStatic = async () => {
67
67
 
68
68
  if (flags.transformer) {
69
69
  try {
70
- require.resolve(flags.transformer);
70
+ const transformerPath = require.resolve(flags.transformer, {
71
+ paths: [appDirectory]
72
+ });
73
+
74
+ const transformerFn = require(transformerPath);
75
+
76
+ transformerFn(compiled);
71
77
  } catch (error) {
72
78
  throw new Error(`Could not load transformer module "${flags.transformer}"\n${error.stack}`);
73
79
  }
74
-
75
- const transformerFn = require(flags.transformer);
76
-
77
- transformerFn(compiled);
78
80
  } else {
79
81
  console.log(JSON.stringify(compiled.headers));
80
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/mc-scripts",
3
- "version": "20.10.4",
3
+ "version": "20.10.6",
4
4
  "description": "Configuration and scripts for developing a MC application",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -11,32 +11,28 @@
11
11
  "homepage": "https://docs.commercetools.com/custom-applications",
12
12
  "keywords": ["javascript", "frontend", "react", "toolkit"],
13
13
  "license": "MIT",
14
- "private": false,
15
14
  "publishConfig": {
16
15
  "access": "public"
17
16
  },
18
17
  "main": "./build/index.js",
19
18
  "files": ["build", "config", "package.json", "LICENSE", "README.md"],
20
- "bin": {
21
- "mc-scripts": "./bin/mc-scripts.js"
22
- },
19
+ "bin": "./bin/cli.js",
23
20
  "browserslist": {
24
21
  "production": [">1%", "not op_mini all", "not dead"],
25
22
  "development": ["last 2 firefox versions", "last 2 chrome versions"]
26
23
  },
27
24
  "scripts": {
28
- "prebuild": "rimraf build/**",
29
- "build": "babel src --out-dir build",
25
+ "build": "rimraf build && babel src --out-dir build",
30
26
  "build:bundles:watch": "yarn build -w"
31
27
  },
32
28
  "dependencies": {
33
29
  "@babel/runtime": "7.15.4",
34
30
  "@babel/runtime-corejs3": "7.15.4",
35
- "@commercetools-frontend/application-config": "20.10.4",
36
- "@commercetools-frontend/assets": "20.10.1",
37
- "@commercetools-frontend/babel-preset-mc-app": "20.10.4",
38
- "@commercetools-frontend/mc-dev-authentication": "20.10.3",
39
- "@commercetools-frontend/mc-html-template": "20.10.4",
31
+ "@commercetools-frontend/application-config": "20.10.6",
32
+ "@commercetools-frontend/assets": "20.10.6",
33
+ "@commercetools-frontend/babel-preset-mc-app": "20.10.6",
34
+ "@commercetools-frontend/mc-dev-authentication": "20.10.6",
35
+ "@commercetools-frontend/mc-html-template": "20.10.6",
40
36
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.1",
41
37
  "@svgr/webpack": "5.5.0",
42
38
  "autoprefixer": "10.3.7",
@@ -76,7 +72,8 @@
76
72
  },
77
73
  "devDependencies": {
78
74
  "@babel/plugin-transform-runtime": "7.15.8",
79
- "@babel/preset-env": "7.15.8"
75
+ "@babel/preset-env": "7.15.8",
76
+ "rimraf": "3.0.2"
80
77
  },
81
78
  "engines": {
82
79
  "node": ">=12 || >=14"