Merpay での半年間

Self Introduction

ins0.jp

Merpay Frontend Team

  • CS Tool
  • Merpay Partners Admin Tool
  • Merchants Registration Form
  • Campaign LP
  • Coupon WebView

Campaign LP / Coupon WebView

Designers can operation by itself

  • Componentization
  • Encapsulation
  • Templating
  • Simplicity
export function denyProduction({ env, error }: Context) {
  if (env.APP_ENV === 'production') {
    return error({ statusCode: 404 });
  }
}
export function staticAssetsAccessControl(this: any, moduleOptions: ModuleOptions) {
  this.nuxt.hook('render:setupMiddleware', (app: Server) => {
    app.use((req: http.IncomingMessage, res: http.ServerResponse, next: (err?: any) => void) => {
      const { pathname } = parseUrl(req.url);

      if (/* check the `pathname` */) {
        return options.denyCallback(res);
      }

      return next();
    });
  });
  • $ npm ci --production
  • Ignore unnecessary files with .dockerignore
  • Execute test and build in parallel
jobs:
  upload_sourcemap:
    executor: sentry_cli
    steps:
      - checkout
      - attach_workspace:
          at: *workspace_root
      - run:
          shell: /bin/bash -euo pipefail
          command: |
            RELEASE_NAME=$(cat ./package.json | jq -r .version)
            URL_PREFIX=https://static-coupon.merpay.com/nuxt
            sentry-cli --auth-token=${SENTRY_AUTH_TOKEN} releases files ${RELEASE_NAME} \
              upload-sourcemaps .nuxt/dist/client --no-rewrite --url-prefix=${URL_PREFIX}

🙏