1.0.3 • Published 2 years ago

@malrang-toy/wise-cat-saying v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@malrang-toy/wise-cat-saying · npm version

This is a toy projects. this module is shown The WiseSaying with cute cat

Table of Contents

Installation

Manually

Simply include main.umd.js in the <head>...

<head>
  ...
  <script src="main.umd.js"></script>
  <!-- 
  Or remotely via Unpkg CDN 
  <script src="https://unpkg.com/@malrang-toy/wise-cat-saying@1.0.2/dist/main.umd.js"></script>
  -->
</head>

If you downloaded the package via zip file from Github, these files are located in the dist folder. Otherwise, you can use the Unpkg CDN as shown in the examples above.

Via NPM

npm i @malrang-toy/wise-cat-saying

Files & locations:

FileFolderDescription
main.umd.jsnode_modules/@malrang-toy/wise-cat-saying/distold school version
main.esm.jsnode_modules/@malrang-toy/wise-cat-saying/distES module version

Basic Usage for old-school

Write the element in markup file:

<head>
  ...
  <script src="main.umd.js"></script>
  <!-- 
  Or remotely via Unpkg CDN 
  <script src="https://unpkg.com/@malrang-toy/wise-cat-saying@1.0.2/dist/main.umd.js"></script>
  -->
</head>
<body>
  ...
  <div id="my-cat-card"></div>
  <script>
    window.onload = function(){
      console.log('window.onload')      
      const theCat = new WiseCatSaying('my-cat-card')
      const theWord = theCat.actionSay()
      console.log('theWord : ', theWord)      
      theCat.render()
    }
  </script>
</body>

Importing the library for javascript:

import WiseCatSaying from '@malrang-toy/wise-cat-saying';

// 'my-cat-card' is markup elemt ID
// ex) <div id="my-cat-card"></div>
const theCat = new WiseCatSaying('my-cat-card')

Basic Usage for ES module

Write the element in markup file:

<body>
  ...
  <div id="my-cat-card"></div>
</body>

Importing the library for javascript:

import WiseCatSaying from '@malrang-toy/wise-cat-saying';

window.onload = function(){
  // 'my-cat-card' is markup elemt ID
  // ex) <div id="my-cat-card"></div>
  const theCat = new WiseCatSaying('my-cat-card')
  theCat.render()
}

Thank you !!

Origin Source From

Cat image : https://thecatapi.com/

WiseSaying : google(?)

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago