mf-widgets
Last updated 3 months ago by joaopaulocmarra .
MIT · Original npm · Tarball · package.json
$ cnpm install mf-widgets 
SYNC missed versions from official npm registry.

Mortgage Finder - Widgets

Description

javascript widgets for mf projects using Mortgage Calculator Package

the project separate each widget in modules.

after you build first time, in the build folder, you will have:

build/js/[MODULE_NAME].min.js
build/css/[MODULE_NAME].min.css

all the static(images) will be inside the folder build/static/media

check the examples folder for each widget inside it's folder

Getting Started

Prerequisites

  • Node v8+
  • NPM v6+

Installation guide

all the dependencies will be installed with the command:

npm run install

Running the tests

npm run tests

Usage

you can build the widgets, using:

npm run build

this will build all widgets

or build specifics widgets, with the --modules param:

npm run build --modules=banner

or

npm run build --modules=banner,calculator

you can serve the build folder as a local CDN with:

npm run serve // it will host on http://localhost:9090, check package.json to change the port and update the demo index.html

you can run a widget demo with:

npm run demo --module=banner

or if you want to change the port, if not by package.json:

npm run demo --module=banner -p 8181

you can build and see the widget with the demo, using:

npm run start --module=banner

to change ports of the Demo and Content URL, you can go to package.json:

{
  ...
  "scripts": {
    ...
    "serve": "http-server -p 9090 ./build", // serve the content(JS, CSS, SVG, etc) on port 9090
    "demo": "node scripts/demo.js -p 8080", // the demo project on port 8080
    ...
  },
  ...
}

to add new modules:

create the module folder based on the mortgage-calculator-banner folder folder name should be $prefix-$moduleName

example: $prefix='mortgage-calculator-' $modulename='banner' result folder: mortgage-calculator-banner

the main file should be the module name capitalized, like, for banner, the main file should be Banner.tsx

in the package.json, specify the module name in the "jungle" property, like for banner and calculator:

{
  ...
  "jungle": {
    "modulesPrefix": "mortgage-calculator-",
    "modules": [
      "banner",
      "calculator",
    ]
  },
  ...
}

Deployment

you can update the npm package with the command:

npm publish

a new version of the package will be available and can be used with cdn like:

Banner Widget on version X.X.X (check latest version on package.json file)

https://cdn.jsdelivr.net/npm/mf-widgets@X.X.X/build/js/banner.min.js

https://cdn.jsdelivr.net/npm/mf-widgets@X.X.X/build/css/banner.min.css

Current Tags

  • 0.1.8                                ...           latest (3 months ago)

13 Versions

  • 0.1.8                                ...           3 months ago
  • 0.1.6                                ...           4 months ago
  • 0.1.5                                ...           4 months ago
  • 0.1.4                                ...           4 months ago
  • 0.1.3                                ...           4 months ago
  • 0.1.2                                ...           4 months ago
  • 0.1.1                                ...           4 months ago
  • 0.1.0                                ...           4 months ago
  • 0.0.9                                ...           4 months ago
  • 0.0.8                                ...           4 months ago
  • 0.0.7                                ...           4 months ago
  • 0.0.6                                ...           4 months ago
  • 0.0.5                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 13
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |