Skip to content

Commit

Permalink
Publish as es6
Browse files Browse the repository at this point in the history
  • Loading branch information
ger-benjamin committed Sep 13, 2024
1 parent f3fb8f9 commit 3806e8b
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/contribs/gmf/apps/build/
/contribs/gmf/examples/https.js
/dist/
/distlib/
/test/check-example/*.html.png
/examples/dist
/contribs/dist
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default [
sourceType: 'module',

parserOptions: {
project: ['tsconfig-eslint.json'],
project: ['tsconfig-all.json'],
},
},

Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"dist": "TARGET=dist webpack --mode=production --progress",
"dist-spinner": "svgo --config=svgo.js src/icons/spinner.svg --output=dist/spinner.svg",
"build-gmf-apps-profile": "TARGET=gmf-apps webpack --profile --json > profile.json",
"typecheck": "tsc --noEmit",
"prepare": "tsc --pretty",
"typecheck": "tsc --project tsconfig-all.json --noEmit",
"doc": "typedoc",
"build-storybook": "NODE_ENV=env TARGET=ngeo-examples storybook build --output-dir=.build/storybook",
"storybook": "NODE_ENV=env TARGET=ngeo-examples storybook dev --port=6006",
Expand Down Expand Up @@ -93,7 +94,6 @@
"@types/jquery": "3.5.30",
"@types/jquery.ui.datetimepicker": "0.3.35",
"@types/jqueryui": "1.12.23",
"@types/jsts": "0.17.24",
"@types/node": "20.16.3",
"@types/offscreencanvas": "2019.7.3",
"@types/proj4": "2.5.5",
Expand Down Expand Up @@ -160,7 +160,6 @@
"jquery-ui": "1.14.0",
"jquery-ui-touch-punch": "0.2.3",
"jscodeshift": "17.0.0",
"jsts": "2.11.3",
"karma": "6.4.4",
"karma-chrome-launcher": "3.2.0",
"karma-jasmine": "5.1.0",
Expand All @@ -174,7 +173,6 @@
"loc-i18next": "0.1.6",
"localforage": "1.10.0",
"magic-comments-loader": "2.1.3",
"mapillary-js": "4.1.2",
"minify-html-literals-loader": "1.1.1",
"moment": "2.30.1",
"neat-csv": "6.0.1",
Expand Down Expand Up @@ -211,5 +209,10 @@
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.0.4",
"webpack-merge": "6.0.1"
},
"peerDependencies": {
"@types/jsts": "^0.17.24",
"jsts": "^2.11.3",
"mapillary-js": "^4.1.2"
}
}
4 changes: 2 additions & 2 deletions src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ export function AbstractAppController($scope, $injector, mobile) {
this.hasEditableLayers = false;

/**
* @this {AbstractAppController}
* Check editable layers
*/
this.updateHasEditableLayers_ = function () {
this.updateHasEditableLayers_ = () => {
this.gmfThemes.hasEditableLayers().then((hasEditableLayers) => {
this.hasEditableLayers = hasEditableLayers;
});
Expand Down
28 changes: 28 additions & 0 deletions tsconfig-all.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"_description_": "Tsconfig to use lint on every ts files",
"extends": "./tsconfig.json",
"include": [
"*.js",
"*.ts",
"src/**/*.js",
"src/**/*.ts",
"utils/**/*.js",
"utils/**/*.ts",
"buildtools/**/*.js",
"buildtools/**/*.ts",
"cypress/**/*.js",
"cypress/**/*.ts",
"test/spec/**/*.js",
"test/spec/**/*.ts",
"examples/*.js",
"examples/*.ts",
"api/src/**/*.js",
"api/src/**/*.ts",
"contribs/gmf/apps/**/*.js",
"contribs/gmf/apps/**/*.ts",
"contribs/gmf/test/spec/**/*.js",
"contribs/gmf/test/spec/**/*.ts",
"contribs/gmf/examples/*.js",
"contribs/gmf/examples/*.ts"
]
}
10 changes: 0 additions & 10 deletions tsconfig-build.json

This file was deleted.

17 changes: 0 additions & 17 deletions tsconfig-eslint.json

This file was deleted.

25 changes: 9 additions & 16 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"_description_": "Tsconfig base for publishing TS/JS as ES6*/",
"compilerOptions": {
/* Basic Options */
"target": "ES2020",
"module": "commonjs",
"lib": ["es2020", "dom"],
"outDir": "distlib",
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "node",
"lib": ["es2023", "dom"],
"esModuleInterop": true,
"declaration": true,
"allowJs": true,
"noImplicitAny": true,
"noImplicitThis": true,
Expand All @@ -29,17 +32,7 @@
"resize-observer-polyfill": ["node_modules/resize-observer-polyfill/src/index.d.ts"]
}
},
"include": [
"cypress/**/*.ts",
"src/**/*.js",
"src/**/*.ts",
"lib/**/*.js",
"api/src/**/*.js",
"contribs/gmf/apps/**/*.js",
"test/spec/**/*.js",
"contribs/gmf/test/spec/**/*.js",
"examples/*.js",
"contribs/gmf/examples/*.js"
],
"include": ["src/**/*.js", "src/**/*.ts", "lib/**/*.js", "api/src/**/*.js", "contribs/gmf/apps/**/*.js"],
"exclude": ["./**/*.spec.ts", "./**/*.spec.js"],
"files": ["types/dom.d.ts", "types/custom.d.ts"]
}

0 comments on commit 3806e8b

Please sign in to comment.