npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fa-toolkit

v14.0.1-Stable.300

Published

a devtool for fast app

Downloads

83

Readme

fa-toolkit

How to Use

  1. Install fa-toolkit
npm install fa-toolkit -D
  1. Build the quick app

Before the compilation, ensure that the signature file exists in the project.

  1. Compile the project in the current path where fa-toolkit is installed.
node node_modules/webpack/bin/webpack.js --config ./node_modules/fa-toolkit/webpack.config.js

View the compilation progress.

node node_modules/webpack/bin/webpack.js --progress --config ./node_modules/fa-toolkit/webpack.config.js
  1. Compile the project in the specified path.

Install the dependency.

npm install cross-env -D

Specify the project root directory using projectRoot.

node ./node_modules/cross-env/src/bin/cross-env.js projectRoot=D:\com.quick.app node_modules/webpack/bin/webpack.js --config ./node_modules/fa-toolkit/webpack.config.js

Parameter description.

| Parameter| Data Type| Default Value| Description| | ------- | --------- | --------- | --------- | | projectRoot | string | Current path| Root directory, which must contain the src and sign directories and is the path where fa-toolkit is installed by default.| | versionType | debug | beta | release | debug | Compilation version. The code will be compressed and the signature file for release is needed except for the debug version.| | showtime | boolean | false | Indicates whether to display the compilation duration.| | norpk | boolean | false | Indicates whether to not generate an RPK file.| | --env privateKey | string | | Private key, which is a webpack compilation parameter. The private.pem file under the same directory of the certificate file is used by default if the certificate file matches the private key. However, if the private.pem is deleted, you can use this parameter to specify the private key. The private key is the string left after you delete the start line, end line, and line breaks. The characters contained in the private key string should match the regular expression of /[a-zA-Z0-9+/=]/.|

Example:

Compile the release version.

node ./node_modules/cross-env/src/bin/cross-env.js projectRoot=D:\com.quick.app versionType=release node_modules/webpack/bin/webpack.js --config ./node_modules/fa-toolkit/webpack.config.js

Use the specified private key.

node ./node_modules/cross-env/src/bin/cross-env.js projectRoot=D:\com.quick.app versionType=release node_modules/webpack/bin/webpack.js --config ./node_modules/fa-toolkit/webpack.config.js --env privateKey=***

OPEN SOURCE SOFTWARE NOTICE

  1. Convert WeChat project to QuickAPP project
node ./lib/bin/wx2qa.js input.json
  1. Please replace the input.json with the real file path, and the file's content should be like below
{
    "method": "convert",
    "projectConfig": {
        "sourceType": "wx",
        "path": "",
        "dist": ""
    },
    "appConfig":{
        "packageName": "", 
        "appName": "",
        "versionCode": "1",
        "versionName": "1.0.0",
        "icon": ""
    },
    "resConfig": {
        
    }
}
  1. Parameter description

| Parameter| Data Type| Default Value| Required | Description| | ------- | --------- | --------- | --------- | --------- | | method | string | convert| yes | could be [convert|check], which mean to convert or check if the input project is legal | | sourceType | string | wx | yes | The platform of the input project, only support [wx] now | | path | string | - | yes | the path of WeChat project | | dist | string | - | yes | the path of output QuickApp Project | | packageName | string | - | yes | package name | | appName | string | - | yes | app name | | versionCode | string | 1 | yes | version code | | versionName | string | 1.0.0 | yes | version name | | icon | string | - | yes | the path of icon file |

  1. Output

The result is output at console, there are two kinds of output based on method [convert|check].

When method is convert, the ouput is as below

{
    command: 'completeTransform',
    errorMessage: '...',
    folderUrl: '...'
}

| Parameter| Data Type| Default Value| Required | Description| | ------- | --------- | --------- | --------- | --------- | | command | string | completeTransform| yes | could be [completeTransform|failedTransform|notifyConfig], each mean success|failed|notify of loss of config file | | errorMessage | string | - | no | describe the reason when failed | | folderUrl | string | - | no | the path of output QuickApp Project |

When the method is check, the output should be like below

{
    command: 'postInputPath',
    data: {
        returnCode: true,
        outPath: '...'
    }
}

| Parameter| Data Type| Default Value| Required | Description| | ------- | --------- | --------- | --------- | --------- | | command | string | postInputPath| yes | only support postInputPath now | | returnCode | boolean | true | yes | the result of check | | outPath | string | - | no | the suggested path of output QuickApp Project |