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

Add transpiled ES Module build with microbundle #9

Merged
merged 5 commits into from
Feb 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/node_modules/
/package-lock.json
/dist/api
/dist/main.js
/dist/main.*
/dist/sources.*
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just /dist/?

Copy link
Author

@romanzoller romanzoller Feb 4, 2019

Choose a reason for hiding this comment

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

Because dist/index.html is (and was already before) part of the git source, it's the example entry point, so it should not be ignored. Ideally it should not be in dist IMHO, I can change that in a follow-up PR if you agree.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 :-)

7 changes: 0 additions & 7 deletions .npmignore

This file was deleted.

16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@
"name": "@geoblocks/sources",
"version": "0.1.3",
"description": "Geoblocks sources",
"module": "src/index.js",
"main": "dist/sources.js",
gberaudo marked this conversation as resolved.
Show resolved Hide resolved
"module": "dist/sources.js",
"source": "src/index.js",
"scripts": {
"eslint": "eslint src/*.js",
"eslint-fix": "eslint src/*.js --fix",
"build": "webpack --mode production",
"build-debug": "webpack --mode development",
"build": "microbundle --format es",
"build-example": "webpack --mode production",
"build-example-debug": "webpack --mode development",
"start": "webpack-dev-server --mode development --content-base dist/ --watch",
"typecheck": "tsc --pretty",
"lint": "npm run eslint && npm run typecheck",
"test": "npm run lint && npm run build && npm run build-debug",
"test": "npm run lint && npm run build && npm run build-example && npm run build-example-debug",
"doc": "typedoc --out dist/api --theme minimal --readme none --hideGenerator --listInvalidSymbolLinks --toc none"
},
"files": [
"/src",
"/dist/sources.*"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just /dist?

Copy link
Author

Choose a reason for hiding this comment

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

Same here, /dist/index.html and /dist/main.js[.map] are example / example build files that don't need to be included in the npm package.

],
"author": "",
"license": "bsd",
"peerDependencies": {
Expand All @@ -28,6 +35,7 @@
"@types/proj4": "^2.3.4",
"eslint": "5.9.0",
"eslint-config-openlayers": "11.0.0",
"microbundle": "^0.9.0",
"ol": "^5.2.0",
"proj4": "2.5.0",
"tsconfig-paths": "3.7.0",
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Swisstopo from './Swisstopo';

export {Swisstopo};