Start developing LIFF application with a simple CLI command.

Overview

@line/create-liff-app

License Node

Start developing LIFF application with a simple CLI command.

About

LIFF

LINE Front-end Framework (LIFF) is a platform for web apps provided by LINE. The web apps running on this platform are called LIFF apps.

Do you want to know more about LIFF? Learn more

Templates

create-liff-app provides JavaScript & TypeScript templates of LIFF application.

Available frameworks are: nextjs nuxtjs react vue svelte vanilla.

Getting Started

Create LIFF Channel

Before you run create-liff-app, we recommend creating a LIFF Channel first. See the documentation.

Installation

Run npm command like:

$ npx @line/create-liff-app

License

This project is licensed under the Apache license. See LICENSE for more information.

Also, using LIFF means you agree to the LINE Developers Agreement.

Comments
  • Add flags to the CLI

    Add flags to the CLI

    πŸ™‹ Feature Request

    Add flags to the CLI

    πŸ€” Expected Behavior

    Users can set their information as flags so they can skip the process of pressing enters several times.

    😯 Current Behavior

    There is no way to create-liff-app without pressing enters.

    πŸ’ Possible Solution

    There can be flags or args of all parameters. This is just an example ↓

    npx @line/create-liff-app <app_name> 
    
    1st argument: app_name
    -t or --template: template_name
    --js: use JavaScript
    --ts: use TypeScript
    -l or --liffid: liff_id
    --yarn: use yarn
    --npm: use npm
    -h or --help: tooltips for the create-liff-app
    -v or --version: version of create-liff-app
    

    We may use libraries like commander or yargs to implement this.

    πŸ’» Examples

    You can check the create-next-app implementation. https://github.com/vercel/next.js/blob/canary/packages/create-next-app/index.ts

    enhancement good first issue 
    opened by so99ynoodles 6
  • refactor: ensures dependencies are up-to-date

    refactor: ensures dependencies are up-to-date

    Fixes https://github.com/line/create-liff-app/issues/11

    This PR changes how create-liff-app install dependencies, ensuring that all dependencies used in generated projects are up-to-date. I'm not sure if this is fixing the issue or making it even worse, any feedback would be greatπŸ™

    Changes:

    • .eslinerc.js
      • removed 'linebreak-style': ['error', 'unix'] since all the linebreaks are in CRLF
    • removed dependencies and devDependencies fields in every package.json in /templates (except for nuxtjs templates)
    • removed @line/create-liff-app upgradation script
    • create-liff-app.ts
      • added templates object in the end of the file to store all the dependencies used by different frameworks
      • moved envPrefix and envFileNameVariants into templates object
      • install function now installs dependencies from templates object in runtime

    Problems that need to be discussed:

    • (not related to this PR) nuxtjs projects generated by the current version(1.0.4) of create-liff-app do not work as expected, as it always throws this error: Error: liffId is necessary for liff.init(). I do not know how to fix that.
    • under the current refactor, when a user selects no on the question install now, create-liff-app will first run npm install --package-lock-only to install the latest version of the packages without actually saving them to the node_modules, then use fs.rmSync to delete the generated package-lock.json. I do not think this is a good way of handling the problem and maybe it needs to be replaced? Below are two possible fixes that I came up with. What do you think?
      • remove the install now option and install the dependencies by default list create-next-app does. This is lesserror-prone.
      • bring back dependencies and devDependencies fields in every package.json in /templates. Use them to generate outdated dependencies as it does in the current version(1.0.4) of create-liff-app, then remind the user to upgrade the dependencies in the showDoneComments function.

    Notes:

    • Nuxtjs
      • dependencies used in create-nuxt-app are hardcoded into package.json, so this refactor followed the conversion and only @line/liff is installed in the runtime
    opened by BWsix 5
  • Hardcoded dependencies become outdated

    Hardcoded dependencies become outdated

    Hi, I really enjoy using this package to quickly generate liff projects, but I found some issues with outdated dependencies.

    Currently, dependencies are hardcoded into package.jsons and some have already become outdated. I looked into how create-next-app handles this issue and found that they install all the dependencies using spawn in runtime to get the latest versions of dependencies. Below is a demonstration of how they do it: (source code)

    const dependencies = ['react', 'react-dom', 'next'];
    spawn(packageManager, dependencies);
    

    You'll gain two benefits from implementing this method:

    1. Manual updates of the liff package are no longer needed
    2. Up-to-date dependencies

    If you think this is a good idea, just let me know and I could try to make a PR for this. Btw, all the linebreaks in this project are CRLF, not LF as defined in .eslint.js. And there is no configuration file for installed dev-dependency prettier.

    opened by BWsix 4
  • Feat: add flags to the CLI

    Feat: add flags to the CLI

    Add flags to the CLI (https://github.com/line/create-liff-app/issues/19)

    I added some flag descriptions, but I am unsure if they sound natural (I am not a native speaker). Please double-check the descriptions in README.md and the CLI help message!

    Changes:

    • create-liff-app now accepts one optional argument and various flags: @line/create-liff-app [project name] [options].
    • After running @line/create-liff-app -h, will print the following help message:
    Usage: @line/create-liff-app [project name] [options]
    
    Options:
      -v, --version              output the version number
      -t, --template <template>  Choose a template to bootstrap the app with (choices: "vanilla", "react", "vue", "svelte", "nextjs", "nuxtjs")
      -l, --liffid <liff id>     Liff id. For more information, please visit https://developers.line.biz/ja/docs/liff/getting-started/
      --js, --javascript         Initialize as a JavaScript project
      --ts, --typescript         Initialize as a TypeScript project
      --npm, --use-npm           Bootstrap the app using npm
      --yarn, --use-yarn         Bootstrap the app using yarn
      -h, --help                 display help for command
    

    NOTE:

    The answers object currently has no type, as I do not know how to automatically infer the values from questions. Rather than explicitly create a type for it I decided to leave it like that since answers will not be referenced by anything. But still, I'll make it full type-safe if that sounds better to you.

    opened by BWsix 3
  • Timing of LIFF.init

    Timing of LIFF.init

    In liff-playground, LIFF.init is called before DOM.render, but in the template of create-liff-app, LIFF.init is called in useEffect. Which is better?

    liff-playground https://github.com/line/liff-playground/blob/master/src/index.tsx

    create-liff-app template https://github.com/line/create-liff-app/blob/main/templates/react-ts/src/App.tsx

    opened by r-hirakawa 2
  • Fix TypeScript / eslinst error on NuxtJS templates

    Fix TypeScript / eslinst error on NuxtJS templates

    Closes #20

    βœ… Pull Request Checklist:

    • [x] Included link to corresponding GitHub Issue.
    • [x] Filled out test instructions.

    πŸ“ Test Instructions:

    • install both nuxtjs-ts/nuxtjs templates and see if there is no lint / ts error.
    opened by so99ynoodles 0
  • Solve TypeScript error and lint error on nuxt-js/nuxt-ts templates

    Solve TypeScript error and lint error on nuxt-js/nuxt-ts templates

    πŸ› Bug Report

    πŸ€” Expected Behavior

    • No TS error emission
    • No lint errors

    😯 Current Behavior

    Property '$liffInit' does not exist on type 'CombinedVueInstance<Vue, { message: string; error: string; }, unknown, unknown, Readonly<Record<never, any>>>'.
    

    πŸ’ Possible Solution

    • Lint template files as create-nuxt-app way.
    • Add TypeScript setting for the liffPlugin (https://typescript.nuxtjs.org/ja/cookbook/plugins/)
    good first issue 
    opened by so99ynoodles 0
  • Fix: generate `.env.local` instead of `.env` for next.js projects

    Fix: generate `.env.local` instead of `.env` for next.js projects

    Unlike other frameworks, projects generated by create-next-app use .env.local instead of .env. This can be verified by the fact that the .gitignore in the next.js template does not include .env.

    This PR updates the generator to generate .env.local instead of .env for next.js projects.

    opened by BWsix 0
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • fix  env next liffId

    fix env next liffId

    process.env.LIFF_ID in NEXT is incorrect. When I access the URL, the following error was displayed.

    LIFF init failed. Error: liffId is necessary for liff.init()

    So fixed it.

    opened by inoue2002 0
  • Update Vite using templates

    Update Vite using templates

    πŸ™‹ Feature Request

    • As Vite 3 was released, we need to change current templates to the newer version.
    • React / Vue / Svelte and Vanilla templates

    πŸ’ Possible Solution

    • Use the Vite command internally as NextJS / NuxtJS templates do

    πŸ’» Examples

    • You can check how NextJS / NuxtJS projects are created: https://github.com/line/create-liff-app/pull/15
    opened by so99ynoodles 0
  • Setup CI / CD settings

    Setup CI / CD settings

    πŸ™‹ Feature Request

    Setup CI / CD settings

    πŸ€” Expected Behavior

    • run test
    • run lint
    • run deploy

    😯 Current Behavior

    • no CI / CD are implemented

    πŸ’ Possible Solution

    • add CI settings to the project

    πŸ”¦ Context

    https://github.com/line/create-liff-app/pull/15#pullrequestreview-999023927

    πŸ’» Examples

    opened by so99ynoodles 0
Releases(v1.1.0)
Sandbox for developing and testing UI components in isolation

React Cosmos Sandbox for developing and testing UI components in isolation. Visual TDD. Develop one component at a time. Isolate the UI you're working

React Cosmos 7.7k Jan 3, 2023
Mini Social Media App with a liitle bit of facebook components (Still Developing)

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

KingNelxV2 2 Apr 11, 2022
Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.

Material-UI Quickly build beautiful React apps. Material-UI is a simple and customizable component library to build faster, beautiful, and more access

Material-UI 83.6k Dec 30, 2022
This box comes with everything you need to start using smart contracts from a react app

Truffle React Hooks TypeScript Template This box comes with everything you need to start using smart contracts from a react app. This is as barebones

Louis Aussedat 3 Mar 11, 2022
πŸ”„ Basic project to start studying React and Typescript. With it you can translate text to binary or morse language. This project addresses the creation of routes and components.

max-conversion Projeto criado para iniciar nos estudos de React e Typescript Basic project to gain knowledge in react Na plataforma Γ© possΓ­vel convert

Igor Neves 3 Feb 12, 2022
Safari-like start page

Safari-like Start Page Safari-like Start Page - Online Preview Installation clone this repo # Clone the repo # Using HTTPS git clone https://github.c

Louis 8 Dec 8, 2022
You shouldn't start a wonderful app from scratch every time.

React App Starter You shouldn't start a wonderful app from scratch every time. ~ TJ Features: Out of box API mocking. Out of box Authentication. Beaut

蒋继发 8 Nov 10, 2022
Run an Ethereum node β€” just press start

NiceNode "Run a node, just press start" Mission: 2x the number of Ethereum nodes by making a one-click-to-start Ethereum node Why?: The light client r

Johns Gresham 81 Jan 2, 2023
Set up a modern web app by running one command.

Create React App Create React apps with no build configuration. Creating an App – How to create a new app. User Guide – How to develop apps bootstrapp

Facebook 98.4k Jan 1, 2023
🌈 React for interactive command-line apps

React for CLIs. Build and test your CLI output using components. Ink provides the same component-based UI building experience that React offers in the

Vadim Demedes 19.7k Jan 3, 2023
Salesforce Commerce Cloud ODS Command Center

ODS Command center The On Demand Sandbox Command Center is a GUI tool which usessfcc-ci under the hood. It aims to provide a simple interface for runn

Sachin Upmanyu 18 Sep 20, 2022
Fill the boring catsalud covid vaccine form with a console command

vacunacovid-catsalud-autofullfill form Fill the boring catsalud covid vaccine form with a console command Manual use, pasting in the script in the con

null 18 Jul 27, 2021
This command line helps you create components, pages and even redux implementation for your react project

react-help-create This command line helps you create components, pages and even redux implementation for your react project. How to install it? To ins

Omar 27 Dec 10, 2022
shouganaiyo-loader is a cross-platform Frida-based Node.js command-line tool that forces Java processes to load a Java/JVMTI agent regardless of whether or not the JVM has disabled the agent attach API.

shouganaiyo-loader: Forced Entry for Java Agents shouganaiyo-loader is a cross-platform Frida-based Node.js command-line tool that forces Java process

NCC Group Plc 20 Sep 19, 2022
Set up a modern web app by running one command.

Create React App Create React apps with no build configuration. Creating an App – How to create a new app. User Guide – How to develop apps bootstrapp

Super St@r 10 Oct 16, 2022
Set up a modern web app with clean architecture by running one command.

Clean React App Create React apps using Clean Architecture with no build configuration. User Guide – How to develop apps bootstrapped with Clean React

Rubem Vasconcelos 45 Jan 7, 2023
A web application to search all the different countries in the world and get details about them which can include languages, currencies, population, domain e.t.c This application is built with CSS, React, Redux-Toolkit and React-Router.

A web application to search all the different countries in the world and get details about them which can include languages, currencies, population, domain e.t.c This application is built with CSS, React, Redux-Toolkit and React-Router. It also includes a theme switcher from light to dark mode.

Franklin Okolie 4 Jun 5, 2022
This is a calculator application. The user can do some calculations on this application.

Math Magicians This is a calculator application. The user can do some calculations on this application. Built with: Reactjs Redux Live Live demo deplo

Firdavs Allamurotov 4 May 15, 2022
A web application for a company that provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

Space Travelers' Hub A web application for a company that provides commercial and scientific space travel services. The application allows users to bo

Manel Hammouche 8 Oct 14, 2022