File tree 33 files changed +167
-61
lines changed
mjml-head-html-attributes
33 files changed +167
-61
lines changed Original file line number Diff line number Diff line change
1
+ const ESM = process . env . ESM === 'true'
2
+
1
3
module . exports = {
2
4
presets : [ [ '@babel/env' , {
3
5
targets : { node : '10' } ,
4
6
include : [ 'transform-classes' ] ,
7
+ ...( ESM ? { modules : false } : { } ) ,
5
8
} ] ] ,
6
9
plugins : [
7
10
'@babel/proposal-class-properties' ,
Original file line number Diff line number Diff line change 3
3
"private" : true ,
4
4
"scripts" : {
5
5
"build:watch" : " lerna run build --parallel -- -- -w" ,
6
- "build" : " lerna run build --parallel --ignore mjml-browser" ,
6
+ "build" : " yarn run build:cjs && yarn run build:esm" ,
7
+ "build:cjs" : " lerna run build --parallel --ignore mjml-browser" ,
8
+ "build:esm" : " cross-env ESM=true lerna run build:esm --parallel --ignore mjml-browser --ignore mjml-cli --ignore mjml-migrate" ,
7
9
"build-browser" : " cd packages/mjml-browser && yarn build" ,
8
10
"lint" : " eslint ." ,
9
11
"lint:fix" : " eslint . --fix" ,
22
24
"babel-eslint" : " ^10.1.0" ,
23
25
"babel-plugin-add-module-exports" : " ^1.0.2" ,
24
26
"babel-plugin-lodash" : " ^3.3.4" ,
27
+ "cross-env" : " ^7.0.3" ,
25
28
"eslint" : " ^6.8.0" ,
26
29
"eslint-config-airbnb-base" : " ^14.1.0" ,
27
30
"eslint-config-prettier" : " ^6.11.0" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-accordion" ,
3
3
"description" : " mjml-accordion" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-body" ,
3
3
"description" : " mjml-body" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-button" ,
3
3
"description" : " mjml-button" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-carousel" ,
3
3
"description" : " mjml-carousel" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-column" ,
3
3
"description" : " mjml-column" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-core" ,
3
3
"description" : " mjml-core" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward" ,
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward" ,
22
24
"test" : " node ./tests/index.js"
23
25
},
24
26
"dependencies" : {
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-divider" ,
3
3
"description" : " mjml-divider" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-group" ,
3
3
"description" : " mjml-group" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-head-attributes" ,
3
3
"description" : " mjml-head-attributes" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-head-breakpoint" ,
3
3
"description" : " mjml-head-breakpoint" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-head-font" ,
3
3
"description" : " mjml-head-font" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-head-html-attributes" ,
3
3
"description" : " mjml-head-html-attributes" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-head-preview" ,
3
3
"description" : " mjml-head-preview" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-head-style" ,
3
3
"description" : " mjml-head-style" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-head-title" ,
3
3
"description" : " mjml-head-title" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-head" ,
3
3
"description" : " mjml-head" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-hero" ,
3
3
"description" : " mjml-hero" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
Original file line number Diff line number Diff line change 2
2
"name" : " mjml-image" ,
3
3
"description" : " mjml-image" ,
4
4
"version" : " 4.9.3" ,
5
- "main" : " lib/index.js" ,
5
+ "main" : " lib/cjs/index.js" ,
6
+ "module" : " lib/esm/index.js" ,
6
7
"files" : [
7
8
" lib"
8
9
],
18
19
"homepage" : " https://mjml.io" ,
19
20
"scripts" : {
20
21
"clean" : " rimraf lib" ,
21
- "build" : " babel src --out-dir lib --root-mode upward"
22
+ "build" : " babel src --out-dir lib/cjs --root-mode upward" ,
23
+ "build:esm" : " babel src --out-dir lib/esm --root-mode upward"
22
24
},
23
25
"dependencies" : {
24
26
"@babel/runtime" : " ^7.8.7" ,
You can’t perform that action at this time.
0 commit comments