Permalink
Browse files

feat(bundler): auto tracing for requirejs/systemjs

remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue #831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede #853, #842, #831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.
  • Loading branch information...
huochunpeng committed Mar 10, 2018
1 parent c91fb3e commit c4ce02c265fa419ce01c0623bc45fd166ff6d1ee
Showing with 4,238 additions and 5,415 deletions.
  1. +4 −1 .eslintrc.json
  2. +0 −42 lib/build/amodro-trace/config.js
  3. +0 −260 lib/build/amodro-trace/index.js
  4. +0 −692 lib/build/amodro-trace/lib/loader/Loader.js
  5. +0 −2,142 lib/build/amodro-trace/lib/loader/require.js
  6. +13 −4 lib/build/amodro-trace/lib/parse.js
  7. +0 −228 lib/build/amodro-trace/lib/prim.js
  8. +0 −6 lib/build/amodro-trace/lib/prom.js
  9. +5 −1 lib/build/amodro-trace/lib/transform.js
  10. +13 −7 lib/build/amodro-trace/read/cjs.js
  11. +1 −3 lib/build/amodro-trace/write/all.js
  12. +55 −23 lib/build/amodro-trace/write/defines.js
  13. +0 −65 lib/build/amodro-trace/write/packages.js
  14. +0 −38 lib/build/amodro-trace/write/plugins.js
  15. +5 −11 lib/build/amodro-trace/write/stubs.js
  16. +325 −0 lib/build/ast-matcher.js
  17. +116 −51 lib/build/bundle.js
  18. +155 −158 lib/build/bundled-source.js
  19. +127 −81 lib/build/bundler.js
  20. +4 −0 lib/build/dependency-description.js
  21. +176 −42 lib/build/dependency-inclusion.js
  22. +273 −0 lib/build/find-deps.js
  23. +14 −2 lib/build/index.js
  24. +5 −6 lib/build/loader-plugin.js
  25. +2 −2 lib/build/loader.js
  26. +146 −43 lib/build/package-analyzer.js
  27. +52 −0 lib/build/package-installer.js
  28. +20 −42 lib/build/source-inclusion.js
  29. +4 −2 lib/cli.js
  30. +0 −2 lib/commands/alias.json
  31. +4 −2 lib/commands/config/configuration.js
  32. +2 −24 lib/commands/import/command.js
  33. +1 −7 lib/commands/import/command.json
  34. +1 −28 lib/commands/install/command.js
  35. +1 −7 lib/commands/install/command.json
  36. +0 −80 lib/commands/install/package-argument-parser.js
  37. +4 −32 lib/commands/new/buildsystems/cli/index.js
  38. +8 −5 lib/commands/new/project-template.js
  39. +0 −7 lib/commands/uninstall/command.js
  40. +0 −69 lib/importer/import-engine.js
  41. +0 −82 lib/importer/package-importer.js
  42. +0 −37 lib/importer/package-installer.js
  43. +0 −67 lib/importer/package.js
  44. +0 −17 lib/importer/registry/bootstrap/0.0.0.json
  45. +0 −5 lib/importer/registry/jquery/0.0.0.json
  46. +0 −161 lib/importer/services/metadata-service.js
  47. +0 −56 lib/importer/services/registry.js
  48. +0 −78 lib/importer/services/resource-inclusion.js
  49. +0 −74 lib/importer/services/tutorial.js
  50. +0 −100 lib/importer/strategies/amodro.js
  51. +0 −42 lib/importer/strategies/aurelia-registry.js
  52. +0 −41 lib/importer/strategies/browser-section.js
  53. +0 −59 lib/importer/strategies/custom-importer.js
  54. +0 −57 lib/importer/strategies/jspm-section.js
  55. +0 −42 lib/importer/strategies/metadata.js
  56. +0 −36 lib/importer/strategy-loader.js
  57. +1 −3 lib/resources/src/main-cli.js
  58. +1 −3 lib/resources/src/main-cli.ts
  59. +1 −3 lib/resources/src/main-webpack.js
  60. +1 −3 lib/resources/src/main-webpack.ts
  61. +5 −0 lib/resources/tasks/run.json
  62. +1 −1 lib/resources/test/require.aurelia-karma.js
  63. +1 −1 lib/resources/test/system.aurelia-karma.js
  64. +1 −0 package.json
  65. +315 −0 spec/lib/build/ast-matcher.spec.js
  66. +70 −38 spec/lib/build/bundle.spec.js
  67. +497 −0 spec/lib/build/bundled-source.spec.js
  68. +571 −1 spec/lib/build/bundler.spec.js
  69. +317 −33 spec/lib/build/dependency-inclusion.spec.js
  70. +375 −0 spec/lib/build/find-deps.spec.js
  71. +332 −52 spec/lib/build/package-analyzer.spec.js
  72. +66 −0 spec/lib/build/package-installer.spec.js
  73. +132 −0 spec/lib/build/source-inclusion.spec.js
  74. +0 −34 spec/lib/commands/install/package-argument-parser.spec.js
  75. +0 −74 spec/lib/importer/services/resource-inclusion.spec.js
  76. +11 −0 spec/mocks/bundler.js
  77. +4 −0 spec/mocks/cli-options.js
View
@@ -5,6 +5,7 @@
"strict": ["error", "global"],
"no-console": 0,
"no-inner-declarations": 0,
"no-undef": 2,
"comma-dangle": ["error", {
"arrays": "never",
"objects": "never",
@@ -20,6 +21,8 @@
}
},
"env": {
"node": true
"node": true,
"es6": true,
"jasmine": true
}
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit c4ce02c

Please sign in to comment.