@changke/static-next-lib

Reusable JavaScripts for Static-Next (forked)

Usage no npm install needed!

<script type="module">
  import changkeStaticNextLib from 'https://cdn.skypack.dev/@changke/static-next-lib';
</script>

README

Library Files for Static-Next

Basis and utility JavaScript files for static-next, These files will be installed via npm.

Some TODOs:

  • Better unit-tests for Ajax
  • Able to bypass lazy-loading of module JS/CSS
  • Switch to TypeScript?

Changelog

1.2.5

  • Reverted: no more transpiling

1.2.4

  • Fixed: missing file

1.2.3

  • Transpile autoInit for IE11

1.2.2

  • Fixed: missing methods

1.2.0

  • Dedicated autoInit2 export for IE11, so no syntax error because of import()

1.1.9

  • Use native dynamic import
  • Use babel-eslint to support dynamic import

1.1.8

  • Fixed: Check for existing querystring before making GET request.

1.1.7

  • Added: @type JSDoc for module's root_ member

1.1.6

  • Added: subscribeOnce
  • Enhanced: Handling empty response more robustly

1.1.4

  • Removed JS Templating using Nunjucks (recommended: lit-html)

1.1.3

  • Added: Able to bypass loading of CSS or JS individually

1.1.2

  • Fixed missing import of Template in Module.

1.1.1

  • Fixed AjaxP to return the Promise also for DELETE request

1.1.0

  • New render() shorthand method in Module to call Template.render()
  • No more copy (and overwriting files) after npm install

1.0.11

  • New data-mod-bypass attribute to bypass module initialization
  • Reverted to loading external CSS always because in older browser all modules are internal

1.0.10

  • Config ESLint to support async/await syntax
  • Also lint unit-test files
  • Removed overlay.js
  • Load (external) module CSS file only if module is also external

1.0.9

  • Removed Babel for AVA testing, added esm for supporting ES6 module importing in node
  • New Ajax helper (AjaxP) uses Promise instead of callbacks

1.0.8

  • Fixed race condition in template file loading (runtime vs. other templates)

1.0.7

  • Better unit-testing for Ajax helper with fetch-mock

1.0.6

  • Refactored Ajax helper
  • Added fetch polyfill

1.0.5

  • Fixed getUrlPath not returning full URL

1.0.4

  • Use prepublishOnly in npm scripts

1.0.3

  • Disabled using global Babel configuration

1.0.2

  • More Ajax methods
  • Fix typo "corssorigin"

1.0.1

  • Added prepublish script

1.0.0

  • Initial commit