tntd 1.3.64 → 1.3.65

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/babel.config.js CHANGED
@@ -30,14 +30,24 @@ const plugins = [
30
30
  // ['babel-plugin-styless']
31
31
  ];
32
32
 
33
+ const isES = process.env.BUILD_ENV === 'es';
34
+
35
+ if (isES) {
36
+ presets[0] = [
37
+ presets[0],
38
+ {
39
+ modules: false
40
+ }
41
+ ];
42
+ }
43
+
33
44
  if (process.env.BUILD_ENV !== 'umd' && !process.env.WEBPACK_DEV_SERVER) {
34
45
  plugins.push([
35
46
  'import',
36
47
  {
37
48
  libraryName: 'antd',
38
- // libraryDirectory: 'es',
49
+ libraryDirectory: isES ? 'es' : 'lib',
39
50
  style: true,
40
-
41
51
  }
42
52
  ]);
43
53
  }
package/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "name": "tntd",
3
- "version": "1.3.64",
3
+ "version": "1.3.65",
4
4
  "description": "ued tnt design",
5
5
  "main": "lib/index.js",
6
+ "module": "es/index.js",
7
+ "unpkg": "dist/tntd.js",
6
8
  "scripts": {
7
9
  "start": "doc-scripts start --input docs",
8
10
  "dev": "doc-scripts start --input components/$NAME",
9
11
  "dev:single": "doc-scripts start --input",
10
12
  "build": "npx babel components --out-dir output",
11
13
  "postbuild": "./scripts/postbuild.sh",
14
+ "build:es": "cross-env BUILD_ENV=es npx babel components --out-dir output",
12
15
  "build:umd": "cross-env BUILD_ENV=umd npx webpack --config ./scripts/webpack.config.js",
13
16
  "analyzer": "webpack-bundle-analyzer --port 8888 ./dist/stats.json",
14
17
  "test": "echo \"Error: no test specified\" $* && exit 1"
@@ -3,6 +3,11 @@
3
3
  # *.less
4
4
  cp -rf components/ lib/
5
5
  cp -rf output/ lib/
6
+
7
+ npm run build:es
8
+ cp -rf components/ es/
9
+ cp -rf output/ es/
10
+
6
11
  rm -rf output
7
12
 
8
13
  npm run build:umd