Coder Social home page Coder Social logo

alipay / goldfish Goto Github PK

View Code? Open in Web Editor NEW
80.0 10.0 15.0 4.98 MB

A development framework for Alipay Mini Program.

Home Page: https://alipay.github.io/goldfish/

License: MIT License

JavaScript 22.39% TypeScript 77.55% Shell 0.06%
typescript goldfish composition-api mini-program

goldfish's Introduction

Goldfish

Goldfish is an enterprise level Alipay mini program development framework and can also be called the best practice of Alipay mini program development solution.

Features

  • 🖇Response based state management.
  • 📐Perfect TypeScript support and ultimate type hint.
  • 🚀Composition API ready (refer to Vue Composition API).
    • More flexible logic reuse.
    • More powerful type inference.
    • Smaller packaging size.
  • 🕹Each module can be used independently without framework.

Why to use

  • The introduction of reactivity system makes codes more expressive and saves plenty of state synchronization codes, so the state management is easier.
  • In-depth support for TypeScript is added to the original Alipay mini program, improving greatly the development experience and productivity.
  • Like the Vue Composition API, brand-new method is used for the organization of state logic codes. Compare to the traditional Redux-like state manage system, the boilerplate codes are near to nothing, and it is more friendly to TypeScript.
  • With the function based coding style (Composition API) and inner supporting of Tree-Shaking, the useless codes will be fully shaken away.

Production

Refund Passion Made Possible Currency Exchange

Documentation

To check out docs, visit https://alipay.github.io/goldfish/.

License

MIT

Copyright (c) 2019-present, Alipay.

goldfish's People

Contributors

antfin-oss avatar dependabot[bot] avatar eagzzycsl avatar hollowman6 avatar likun7981 avatar msz0322 avatar nikogu avatar tngd-yq avatar xdoer avatar xxxxqq22 avatar yibuyisheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goldfish's Issues

官方useGlobalData例子运行报错

// file path: ./app.ts
import { setupApp, useState } from '@goldfishjs/composition-api';
import { IConfig } from '@goldfishjs/plugins';

const config: IConfig = {};

export interface IGlobalData {
name: string;
fullName: string;
}

App(setupApp(
config,
() => {
const state = useState({
name: '',
get fullName() {
return ${this.name}.heihei;
},
});
return state;
}),
);

// file path: ./pages/index/index.ts
import { setupPage, useGlobalData } from '@goldfishjs/composition-api';
import { IGlobalData } from '../app';

Page(setupPage(() => {
const globalData = useGlobalData();

// Get the name from global data.
const name = globalData.get('name');

// Set the value to name.
globalData.set('name', 'zs');
return {};
}));

name值为undefined

Dependency confusion

Hi
I have noticed that you have created a vulnerability to dependency confusion/supply chain attacks:

  • Goldfishjs is not registered as an npm package

This leaves the possibility for an attacker to register the package, push malware to anyone who mistakes the package, and push an updated version to anyone who adds your package as a dependency.

Best regards
Jamie

[Suggestion]Allow configure baseDir in mini.project.json

Currently the base directory of compileStream and copyStream are hard-coded. Although goldfish already provide process.env.BASE_DIR in the next release, but in my opinion I will like to have a single configuration entry, using official project config, instead of cross-env.

const baseDir = path.resolve(
  cwd,
  process.env.BASE_DIR || require(`${cwd}${path.sep}mini.project.json`).baseDir || '.',
);
exports.baseDir = baseDir;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.