Permalink
Commits on Nov 16, 2018
  1. fix(bundler): use topological sort to ensure shim order

    huochunpeng committed Nov 16, 2018
    closes #955 again
Commits on Nov 15, 2018
  1. Merge branch 'master' into fix-generator-syntax-error

    huochunpeng committed Nov 15, 2018
Commits on Nov 14, 2018
  1. test: use travis ci to test on multiple OS

    huochunpeng committed Oct 16, 2018
  2. feat(esnext): use babel polyfill to enable async/await syntax for esn…

    huochunpeng committed Nov 14, 2018
    …ext projects
    
    closes #959
  3. fix(generator): fix babel syntax error when running "au generate"

    huochunpeng committed Nov 14, 2018
    closes #954
  4. fix(bundler): fix unstable sorting for shim modules

    huochunpeng committed Nov 14, 2018
    Previous sorting algorithm mixed alphabetical order and shim order, it could lead to rock-paper-scissor situation (means it could choose to honour alphabetical order above shim order). The new sorting takes two steps, first it sorts alphabetically, then sorts shims. This ensure we only breaks alphabetical order, not shim order.
    
    fixes #955
  5. feat(bundler): bundle json files by default for app skeletons of cli …

    huochunpeng committed Nov 14, 2018
    …bundler
    
    json files are processed especially without using loader-plugin. It supports three module id forms: "a.json", "text!a.json" (or "a.json!text" for systemjs), "json!a.json" (or "a.json!json" for systemjs).
Commits on Oct 17, 2018
  1. chore(bundler): use loose mode for amd/cjs transform

    huochunpeng committed Oct 17, 2018
    Since upgraded to babel7, preset-env uses "module":false, we have to explicitly pass "loose":true to additional amd/cjs transform plugin.
Commits on Oct 16, 2018
  1. test(bundler): cleanup test code on windows

    huochunpeng committed Oct 16, 2018
    Also fix a missed forceCjsWrap on windows.
  2. fix(bundler): support nodejs subfolder package.json

    huochunpeng committed Oct 15, 2018
    This fix implemented full algorithm described in https://nodejs.org/dist/latest-v8.x/docs/api/modules.html, after "high-level algorithm in pseudocode of what require.resolve() does".
Commits on Oct 14, 2018
  1. fix(webpack): use webpack4 hook that replaced deprecated plugin api

    huochunpeng committed Oct 14, 2018
    Thanks @oising for the fix. @jods4 recommended using a meaningful tap name.
    
    closes #923
  2. fix(bundler): bypass a nasty terser compress bug by using fast-minify…

    huochunpeng committed Oct 14, 2018
    …-mode
    
    The original code supposed to use fast-minify-mode, but somehow it did not. This fix turns on fast-minify-mode, that disables compress. The resulting minified size is surprisingly almost as small as normal mode, but it only uses a quarter of the time. https://github.com/terser-js/terser#terser-fast-minify-mode
    
    closes #928
Commits on Oct 13, 2018
  1. chore: readable error for unsupported nodejs version

    huochunpeng committed Oct 13, 2018
Commits on Oct 12, 2018
  1. fix(bundler): be resilient on malformed main/module/browser fields in…

    huochunpeng committed Oct 12, 2018
    … package.json
    
    closes #934
Commits on Oct 11, 2018
  1. feat: upgrade to babel7

    huochunpeng committed Oct 10, 2018
    Still compatible with existing apps in babel6. Also updated dependencies to latest version.
    
    closes #846
Commits on Oct 10, 2018
  1. fix(bundler): fix a regression on missing yaml file for some users

    huochunpeng committed Oct 10, 2018
    Additional files like yaml were not processed by any gulp tasks. Previously amodro-trace was able to pull them in directly from file system. This fix mimics the same behaviour.
    
    closes #930
Commits on Oct 9, 2018
  1. fix: fix html5 syntax

    huochunpeng committed Oct 8, 2018
Commits on Oct 7, 2018
  1. chore(doc): update cookbook on materialize-css as v1.0.0 is released …

    huochunpeng committed Oct 7, 2018
    …as latest version
Commits on Oct 6, 2018
Commits on Oct 4, 2018
  1. feat(bundler): use package.json "module" (es module format) over "main"

    huochunpeng committed Oct 4, 2018
    Improves compatibility with TypeScript generated code.
    Try 1.browser > 2.module > 3.main.
    The order is to target browser.
    When aurelia-cli introduces multi-targets build in future, it probably should use different order for electron app:
    For electron 1.module > 2.browser > 3.main
Commits on Oct 2, 2018
  1. doc: document auto-tracing bundler

    huochunpeng committed Aug 9, 2018
    Make clear webpack and built-in bundler are two options.
    Promote prepend over shim.
    Slice the long bundler doc into few chapters.
    Add cookbook of common usage like jquery and bootstrap.
    To be merged after #862.
Commits on Sep 27, 2018
  1. feat(bundler): build.options.cache turn on tracing cache and transpil…

    huochunpeng committed Sep 11, 2018
    …e cache
    
    Cache is centralized in OS temp dir.
    Tracing cache can be shared among apps.
    Transpile cache is only for esnext. Scoped to appName-env, to respect env based babelrc.
    No transpile cache for TS project, gulp-typescript does incremental build, not working with gulp-cache.
    New au command "au clear-cache" clear both caches.
    Reduce consecutive build time to about 1/5 for esnext app, based on preliminary benchmark.
    TODO benchmark on TS app.
  2. feat(bundler): support both 'json!f.json' and 'f.json' module id.

    huochunpeng committed Sep 9, 2018
    Be nice to requirejs/system JSON plugin users.
  3. feat(bundler): fully support package.json browser field

    huochunpeng committed Sep 6, 2018
    Support (1) alternative main, (2) replace specific files, (3) ignore a module.
    Cleanup dependency string ending in '/' or '.js'.
    
    closes #579, #581
  4. feat(bundler): support npm package shipped in native es module

    huochunpeng committed Sep 3, 2018
    Although Nodejs doesn't support es module by default, webpack supports it. Some npm packages like bpmn-js are shipped in native es module format. They are consumable by webpack but not Nodejs. This feature closes the gap between our built-in bundler and webpack.
    
    closes #872
  5. feat(bundler): support onRequiringModule(moduleId) callback

    huochunpeng committed Aug 9, 2018
    onRequiringModule callback is called before auto-tracing on a moduleId. It would not be called for any modules provided by app's src files or explicit dependencies config in aurelia.json.
    
    Three types possible result (all can be returned in promise):
    1. Boolean false: ignore this moduleId;
    2. Array of strings like ['a', 'b']: require module id "a" and "b" instead;
    3. A string: the full JavaScript content of this module
    4. All other returns are ignored and go onto performing auto-tracing.
  6. feat(bundler): auto tracing for requirejs/systemjs

    huochunpeng committed Mar 10, 2018
    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.
Commits on Sep 20, 2018
  1. fix: fix regression, panic on missing yarn

    huochunpeng committed Sep 20, 2018