-
-
Notifications
You must be signed in to change notification settings - Fork 2
Rules for Writting Cross Plattform ESM Code
Frank Lemanschik edited this page Dec 1, 2018
·
5 revisions
- use NPM resolve Algo
- use CJS
- Create ESM via Babel or any programatic way out of CJS ESM needs Rethinking!
- use the Stealify esm patch for node https://github.com/standard-things/esm @std/esm
- don't use package managers create your own package self install able
- Simply paste this line sudo chown -R
$(whoami) $ (npm config get prefix)/{lib/node_modules,bin,share} before first command and remove sudo when using npm i -g
- use Always .mjs extension for ESM and .js for CJS
- If using package.json NPM use main without file ext and module with relativ path and file extension aka URL
- use Always Relative Paths and keep them intact or rewrite them when bundling or packaging.
- use ESM Versions where possible even fork and create them!
Project structure should look like
- src/*
- src/frontend (cli,interface, app)
- Should Contain also if needed SSR Code
- Should Contain Asset Managment
- src/backend (Data Storage,Api, access point, optional can serve)
- dist/
- should publish individual packages to get consumed directly
-
- repo tools and packaging as also documentation
- Guide Stealify Modules and CJS code.
- install gradle sudo apt-get install gradle
- Download https://developer.android.com/studio/#command-tools
- JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee' sdkmanager "platform-tools" "platforms;android-26" "build-tools;27.0.3"
- android list sdk --all
- android update sdk -u -a -t android-27
- JAVA_OPTS="" ANDROID_HOME="/home/frank/android-sdk" PATH="${PATH}:/home/frank/android-sdk/tools/bin:/home/frank/android-sdk/platform-tools" cordovabuild android --verbose
- avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"
LastEdited by Frank Lemanschik status Draft 2019