Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added esnext as a build target. #3230

Merged
merged 3 commits into from
Jan 8, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Core styles & components",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, is there already an established precedent for using "esnext" for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I don't think so. would probably be good to settle on a precedent though for future packages

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen a reasonable amount of code on the web that has it this way. Webpack doesn't load esnext by default, which is good, because using it will require babel for most people. https://webpack.js.org/configuration/resolve/#resolve-mainfields

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best prior art, both from a top linked result from google as well as being referenced in the few other places I tried to find information: http://2ality.com/2017/04/transpiling-dependencies-babel.html

Its not "spec" but that shouldn't matter.

"typings": "lib/esm/index.d.ts",
"style": "lib/css/blueprint.css",
"unpkg": "dist/core.bundle.js",
Expand All @@ -19,6 +20,7 @@
"compile": "run-p \"compile:*\"",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:esnext": "tsc -p ./src/tsconfig.esnext.json",
"compile:css": "sass-compile ./src --functions ./scripts/sass-inline-svg.js",
"dev": "run-p \"compile:esm -- --watch\" \"compile:css -- --watch\"",
"dist": "run-s \"dist:*\"",
Expand Down
11 changes: 11 additions & 0 deletions packages/core/src/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"target": "esnext",
"lib": [
giladgray marked this conversation as resolved.
Show resolved Hide resolved
"dom",
"es2017"
],
"outDir": "../lib/esnext"
}
}
2 changes: 2 additions & 0 deletions packages/datetime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Components for interacting with dates and times",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
"style": "lib/css/blueprint-datetime.css",
"unpkg": "dist/datetime.bundle.js",
Expand All @@ -15,6 +16,7 @@
"compile": "run-p \"compile:*\"",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:esnext": "tsc -p ./src/tsconfig.esnext.json",
"compile:css": "sass-compile ./src",
"dev": "run-p \"compile:esm -- --watch\" \"compile:css -- --watch\"",
"dist": "run-s \"dist:*\"",
Expand Down
11 changes: 11 additions & 0 deletions packages/datetime/src/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"es2017"
],
"outDir": "../lib/esnext"
}
}
2 changes: 2 additions & 0 deletions packages/docs-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Blueprint theme for documentalist",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
"style": "lib/css/docs-theme.css",
"unpkg": "dist/docs-theme.bundle.js",
Expand All @@ -15,6 +16,7 @@
"compile": "run-p \"compile:*\"",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:esnext": "tsc -p ./src/tsconfig.esnext.json",
"compile:css": "sass-compile ./src",
"dev": "run-p \"compile:esm -- --watch\" \"compile:css -- --watch\"",
"dist": "run-s \"dist:*\"",
Expand Down
11 changes: 11 additions & 0 deletions packages/docs-theme/src/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"es2017"
],
"outDir": "../lib/esnext"
}
}
2 changes: 2 additions & 0 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Components, fonts, icons, and css files for creating and displaying icons.",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
"style": "lib/css/blueprint-icons.css",
"unpkg": "dist/icons.bundle.js",
Expand All @@ -16,6 +17,7 @@
"compile:pre": "generate-icons-source",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:esnext": "tsc -p ./src/tsconfig.esnext.json",
"compile:css": "sass-compile ./src",
"dev": "run-p \"compile:esm -- --watch\" \"compile:css -- --watch\"",
"dist": "run-s \"dist:*\"",
Expand Down
11 changes: 11 additions & 0 deletions packages/icons/src/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"es2017"
],
"outDir": "../lib/esnext"
}
}
2 changes: 2 additions & 0 deletions packages/labs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Incubator for unstable and in-development Blueprint components",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
"style": "lib/css/blueprint-labs.css",
"unpkg": "dist/labs.bundle.js",
Expand All @@ -15,6 +16,7 @@
"compile": "run-p \"compile:*\"",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:esnext": "tsc -p ./src/tsconfig.esnext.json",
"compile:css": "sass-compile ./src",
"dev": "run-p \"compile:esm -- --watch\" \"compile:css -- --watch\"",
"dist": "run-s \"dist:*\"",
Expand Down
11 changes: 11 additions & 0 deletions packages/labs/src/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"es2017"
],
"outDir": "../lib/esnext"
}
}
2 changes: 2 additions & 0 deletions packages/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Components related to selecting items from a list",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
"style": "lib/css/blueprint-select.css",
"unpkg": "dist/select.bundle.js",
Expand All @@ -15,6 +16,7 @@
"compile": "run-p \"compile:*\"",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:esnext": "tsc -p ./src/tsconfig.esnext.json",
"compile:css": "sass-compile ./src",
"dev": "run-p \"compile:esm -- --watch\" \"compile:css -- --watch\"",
"dist": "run-s \"dist:*\"",
Expand Down
11 changes: 11 additions & 0 deletions packages/select/src/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"es2017"
],
"outDir": "../lib/esnext"
}
}
2 changes: 2 additions & 0 deletions packages/table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Scalable interactive table component",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
"style": "lib/css/table.css",
"unpkg": "dist/table.bundle.js",
Expand All @@ -15,6 +16,7 @@
"compile": "run-p \"compile:*\"",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:esnext": "tsc -p ./src/tsconfig.esnext.json",
"compile:css": "sass-compile ./src",
"dev": "run-p \"compile:esm -- --watch\" \"compile:css -- --watch\"",
"dist": "run-s \"dist:*\"",
Expand Down
11 changes: 11 additions & 0 deletions packages/table/src/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"es2017"
],
"outDir": "../lib/esnext"
}
}
2 changes: 2 additions & 0 deletions packages/timezone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Components related to timezone selection and UI",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
"style": "lib/css/blueprint-timezone.css",
"unpkg": "dist/timezone.bundle.js",
Expand All @@ -15,6 +16,7 @@
"compile": "run-p \"compile:*\"",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:esnext": "tsc -p ./src/tsconfig.esnext.json",
giladgray marked this conversation as resolved.
Show resolved Hide resolved
"compile:css": "sass-compile ./src",
"dev": "run-p \"compile:esm -- --watch\" \"compile:css -- --watch\"",
"dist": "run-s \"dist:*\"",
Expand Down
11 changes: 11 additions & 0 deletions packages/timezone/src/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"es2017"
],
"outDir": "../lib/esnext"
}
}