@kizmann/pico-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

pico-ui


A JS heleper library. Docs following soon

Installation

npm install @kizmann/pico-js [or] yarn add @kizmann/pico-js

Dependencies

This package is dependent of moment (Right now its required but will be optional or ditched soon).

CDN Usage

<script src="//unpkg.com/@kizmann/pico-js@latest/dist/pico-js.js"></script>
pi.Dom.ready(function () {
    console.log('Yeah :clap:');
});

Module Usage

import { Dom } from "@kizmann/pico-js";
Dom.ready(function () {
    console.log('Yeah :metal:');
});

ES5/6 Precompile

Incase you are not using the babel plugins (ES6) used in babel.config.js you will encounter errors while compiling. To prevent that its required to add an alias to your webpack.config.js.

webpack.config.js

module.exports = {
    resolve: {
        alias: {
            '@kizmann/pico-js': '@kizmann/pico-js/dist/pico-js.js'
        }
    }
}

webpack.mix.js

mix.webpackConfig({
    resolve: {
        alias: {
            '@kizmann/pico-js': '@kizmann/pico-js/dist/pico-js.js'
        }
    }
});

Visual Studio Code Autocomplete

When using VS Code with the ES5 fix from above you need to create or add to your existsing jsconfig.json this alias to enable correct autocomplete.

jsconfig.json

{
  "compilerOptions": {
    "paths": {
      "@kizmann/pico-js": ["node_modules/@kizmann/pico-js/src/index.js"]
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @kizmann/pico-js

Weekly Downloads

279

Version

1.0.5

License

MIT

Unpacked Size

438 kB

Total Files

48

Last publish

Collaborators

  • kizmann